Changeset 181528 in webkit
- Timestamp:
- Mar 16, 2015, 1:42:25 AM (11 years ago)
- Location:
- releases/WebKitGTK/webkit-2.8
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/text/baseline-inline-block-block-children-expected.html (added)
-
LayoutTests/fast/text/baseline-inline-block-block-children.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBlockFlow.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog
r181370 r181528 1 2015-03-11 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Inline block children do not have correct baselines if their children are also block elements 4 https://bugs.webkit.org/show_bug.cgi?id=142559 5 6 Reviewed by Darin Adler. 7 8 * fast/text/baseline-inline-block-block-children-expected.html: Added. 9 * fast/text/baseline-inline-block-block-children.html: Added. 10 1 11 2015-03-09 Myles C. Maxfield <mmaxfield@apple.com> 2 12 -
releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog
r181527 r181528 1 2015-03-11 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Inline block children do not have correct baselines if their children are also block elements 4 https://bugs.webkit.org/show_bug.cgi?id=142559 5 6 Reviewed by Darin Adler. 7 8 Perform the same computation on child block elements as child inline elements. 9 10 Test: fast/text/baseline-inline-block-block-children.html 11 12 * rendering/RenderBlockFlow.cpp: 13 (WebCore::RenderBlockFlow::inlineBlockBaseline): 14 1 15 2015-03-11 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 16 -
releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/RenderBlockFlow.cpp
r181370 r181528 3003 3003 return -1; 3004 3004 3005 if (!childrenInline())3006 return RenderBlock::inlineBlockBaseline(lineDirection);3007 3008 if (!hasLines()) {3009 if (!hasLineIfEmpty())3010 return -1;3011 const FontMetrics& fontMetrics = firstLineStyle().fontMetrics();3012 return fontMetrics.ascent()3013 + (lineHeight(true, lineDirection, PositionOfInteriorLineBoxes) - fontMetrics.height()) / 23014 + (lineDirection == HorizontalLine ? borderTop() + paddingTop() : borderRight() + paddingRight());3015 }3016 3017 3005 // Note that here we only take the left and bottom into consideration. Our caller takes the right and top into consideration. 3018 3006 float boxHeight = lineDirection == HorizontalLine ? height() + m_marginBox.bottom() : width() + m_marginBox.left(); 3019 3007 float lastBaseline; 3020 if ( auto simpleLineLayout = this->simpleLineLayout())3021 lastBaseline = SimpleLineLayout::computeFlowLastLineBaseline(*this, *simpleLineLayout);3008 if (!childrenInline()) 3009 lastBaseline = RenderBlock::inlineBlockBaseline(lineDirection); 3022 3010 else { 3023 bool isFirstLine = lastRootBox() == firstRootBox(); 3024 const RenderStyle& style = isFirstLine ? firstLineStyle() : this->style(); 3025 lastBaseline = lastRootBox()->logicalTop() + style.fontMetrics().ascent(lastRootBox()->baselineType()); 3011 if (!hasLines()) { 3012 if (!hasLineIfEmpty()) 3013 return -1; 3014 const auto& fontMetrics = firstLineStyle().fontMetrics(); 3015 return fontMetrics.ascent() 3016 + (lineHeight(true, lineDirection, PositionOfInteriorLineBoxes) - fontMetrics.height()) / 2 3017 + (lineDirection == HorizontalLine ? borderTop() + paddingTop() : borderRight() + paddingRight()); 3018 } 3019 3020 if (auto simpleLineLayout = this->simpleLineLayout()) 3021 lastBaseline = SimpleLineLayout::computeFlowLastLineBaseline(*this, *simpleLineLayout); 3022 else { 3023 bool isFirstLine = lastRootBox() == firstRootBox(); 3024 const auto& style = isFirstLine ? firstLineStyle() : this->style(); 3025 lastBaseline = lastRootBox()->logicalTop() + style.fontMetrics().ascent(lastRootBox()->baselineType()); 3026 } 3026 3027 } 3027 3028 // According to the CSS spec http://www.w3.org/TR/CSS21/visudet.html, we shouldn't be performing this min, but should
Note:
See TracChangeset
for help on using the changeset viewer.