Changeset 149450 in webkit
- Timestamp:
- May 1, 2013, 1:37:04 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r149436 r149450 1 2013-05-01 Enrica Casucci <enrica@apple.com> 2 3 Incorrect layout for blocks containing ideographs with -webkit-linebox-contain: glyphs, font, inline-box. 4 https://bugs.webkit.org/show_bug.cgi?id=115478. 5 6 Reviewed by Dave Hyatt. 7 8 * fast/block/lineboxcontain/block-with-ideographs.xhtml: Added. 9 * platform/mac/fast/block/lineboxcontain/block-with-ideographs-expected.txt: Added. 10 * platform/mac/fast/block/lineboxcontain/block-with-ideographs-expected.png : Added. 11 1 12 2013-05-01 Per-Erik Brodin <per-erik.brodin@ericsson.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r149449 r149450 1 2013-05-01 Enrica Casucci <enrica@apple.com> 2 3 Incorrect layout for blocks containing ideographs with -webkit-linebox-contain: glyphs, font, inline-box. 4 https://bugs.webkit.org/show_bug.cgi?id=115478. 5 6 Reviewed by Dave Hyatt. 7 8 Test: fast/block/lineboxcontain/block-with-ideographs.xhtml 9 10 When computing ascent and descent we need to take into account 11 the baseline type. RootInlineBox::ascentAndDescentForBox failed 12 to do that in few cases. 13 14 * rendering/RootInlineBox.cpp: 15 (WebCore::RootInlineBox::ascentAndDescentForBox): 16 1 17 2013-05-01 Anders Carlsson <andersca@apple.com> 2 18 -
trunk/Source/WebCore/rendering/RootInlineBox.cpp
r149007 r149450 844 844 845 845 if (includeFontForBox(box) && !setUsedFont) { 846 int fontAscent = box->renderer()->style(isFirstLineStyle())->fontMetrics().ascent( );847 int fontDescent = box->renderer()->style(isFirstLineStyle())->fontMetrics().descent( );846 int fontAscent = box->renderer()->style(isFirstLineStyle())->fontMetrics().ascent(baselineType()); 847 int fontDescent = box->renderer()->style(isFirstLineStyle())->fontMetrics().descent(baselineType()); 848 848 setAscentAndDescent(ascent, descent, fontAscent, fontDescent, ascentDescentSet); 849 849 affectsAscent = fontAscent - box->logicalTop() > 0; … … 855 855 affectsAscent = glyphOverflow->top - box->logicalTop() > 0; 856 856 affectsDescent = glyphOverflow->bottom + box->logicalTop() > 0; 857 glyphOverflow->top = min(glyphOverflow->top, max(0, glyphOverflow->top - box->renderer()->style(isFirstLineStyle())->fontMetrics().ascent( )));858 glyphOverflow->bottom = min(glyphOverflow->bottom, max(0, glyphOverflow->bottom - box->renderer()->style(isFirstLineStyle())->fontMetrics().descent( )));857 glyphOverflow->top = min(glyphOverflow->top, max(0, glyphOverflow->top - box->renderer()->style(isFirstLineStyle())->fontMetrics().ascent(baselineType()))); 858 glyphOverflow->bottom = min(glyphOverflow->bottom, max(0, glyphOverflow->bottom - box->renderer()->style(isFirstLineStyle())->fontMetrics().descent(baselineType()))); 859 859 } 860 860 861 861 if (includeMarginForBox(box)) { 862 LayoutUnit ascentWithMargin = box->renderer()->style(isFirstLineStyle())->fontMetrics().ascent( );863 LayoutUnit descentWithMargin = box->renderer()->style(isFirstLineStyle())->fontMetrics().descent( );862 LayoutUnit ascentWithMargin = box->renderer()->style(isFirstLineStyle())->fontMetrics().ascent(baselineType()); 863 LayoutUnit descentWithMargin = box->renderer()->style(isFirstLineStyle())->fontMetrics().descent(baselineType()); 864 864 if (box->parent() && !box->renderer()->isText()) { 865 865 ascentWithMargin += box->boxModelObject()->borderBefore() + box->boxModelObject()->paddingBefore() + box->boxModelObject()->marginBefore();
Note:
See TracChangeset
for help on using the changeset viewer.