Changeset 205519 in webkit
- Timestamp:
- Sep 6, 2016 4:12:15 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r205515 r205519 1 2016-09-06 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Strikethrough positions are erroneously snapped twice 4 https://bugs.webkit.org/show_bug.cgi?id=161647 5 <rdar://problem/11542470> 6 7 Reviewed by Zalan Bujtas. 8 9 * fast/css3-text/css3-text-decoration/text-decoration-line-through-mispositioned-expected.html: Updated. 10 * fast/text/strikethrough-int-expected-mismatch.html: Added. 11 * fast/text/strikethrough-int.html: Added. 12 1 13 2016-09-06 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-line-through-mispositioned-expected.html
r194465 r205519 8 8 position: absolute; 9 9 left: 20px; 10 top: 3 3px;10 top: 34px; 11 11 width: 120px; 12 12 height: 1px; -
trunk/Source/WebCore/ChangeLog
r205516 r205519 1 2016-09-06 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Strikethrough positions are erroneously snapped twice 4 https://bugs.webkit.org/show_bug.cgi?id=161647 5 <rdar://problem/11542470> 6 7 Reviewed by Zalan Bujtas. 8 9 Because we're using an int for the position of the baseline, the math to calculate the 10 strikethrough position is snapped. Then, we snap it again inside GraphicsContext. 11 12 Test: fast/text/strikethrough-int.html 13 14 * rendering/InlineTextBox.cpp: 15 (WebCore::InlineTextBox::paintDecoration): 16 * rendering/TextDecorationPainter.h: 17 (WebCore::TextDecorationPainter::setBaseline): 18 1 19 2016-09-06 David Kilzer <ddkilzer@apple.com> 2 20 -
trunk/Source/WebCore/rendering/InlineTextBox.cpp
r204531 r205519 716 716 mirrorRTLSegment(m_logicalWidth, direction(), start, width); 717 717 } 718 719 int baseline = lineStyle().fontMetrics().ascent(); 718 720 719 TextDecorationPainter decorationPainter(context, decoration, renderer(), isFirstLine()); 721 720 decorationPainter.setInlineTextBox(this); 722 721 decorationPainter.setFont(font); 723 722 decorationPainter.setWidth(width); 724 decorationPainter.setBaseline( baseline);723 decorationPainter.setBaseline(lineStyle().fontMetrics().ascent()); 725 724 decorationPainter.setIsHorizontal(isHorizontal()); 726 725 decorationPainter.addTextShadow(shadow); -
trunk/Source/WebCore/rendering/TextDecorationPainter.h
r194447 r205519 46 46 void setIsHorizontal(bool isHorizontal) { m_isHorizontal = isHorizontal; } 47 47 void setWidth(float width) { m_width = width; } 48 void setBaseline( int baseline) { m_baseline = baseline; }48 void setBaseline(float baseline) { m_baseline = baseline; } 49 49 void addTextShadow(const ShadowData* textShadow) { m_shadow = textShadow; } 50 50 … … 57 57 bool m_isPrinting { false }; 58 58 float m_width { 0 }; 59 int m_baseline { 0 };59 float m_baseline { 0 }; 60 60 FloatPoint m_boxOrigin; 61 61 bool m_isHorizontal { true };
Note: See TracChangeset
for help on using the changeset viewer.