Changeset 269828 in webkit
- Timestamp:
- Nov 15, 2020 8:03:20 AM (3 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r269827 r269828 1 2020-11-15 Zalan Bujtas <zalan@apple.com> 2 3 "Typo" in r269821 (by std::numeric_limits<>::min I really meant std::numeric_limits<>::lowest (got tricked by the floating-point type behavior)) 4 5 Unreviewed. 6 7 * layout/inlineformatting/InlineFormattingContextGeometry.cpp: 8 (WebCore::Layout::LineBoxBuilder::computeLineBoxHeightAndalignInlineLevelBoxesVertically): 9 1 10 2020-11-15 Philippe Normand <pnormand@igalia.com> 2 11 -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp
r269821 r269828 405 405 inlineLevelBoxAbsoluteBaselineOffsetMap.add(&rootInlineBox, InlineLayoutUnit { }); 406 406 407 auto maximumTopOffsetFromRootInlineBoxBaseline = rootInlineBox.isEmpty() ? std::numeric_limits<InlineLayoutUnit>::min() : rootInlineBox.layoutBounds().ascent; 407 auto maximumTopOffsetFromRootInlineBoxBaseline = Optional<InlineLayoutUnit> { }; 408 if (!rootInlineBox.isEmpty()) 409 maximumTopOffsetFromRootInlineBoxBaseline = rootInlineBox.layoutBounds().ascent; 408 410 409 411 for (auto& inlineLevelBox : lineBox.nonRootInlineLevelBoxes()) { … … 464 466 auto affectsRootInlineBoxVerticalPosition = quirks.shouldInlineLevelBoxStretchLineBox(lineBox, *inlineLevelBox); 465 467 if (affectsRootInlineBoxVerticalPosition) 466 maximumTopOffsetFromRootInlineBoxBaseline = std::max(maximumTopOffsetFromRootInlineBoxBaseline , absoluteBaselineOffset + inlineLevelBox->layoutBounds().ascent);467 } 468 auto rootInlineBoxLogicalTop = maximumTopOffsetFromRootInlineBoxBaseline - rootInlineBox.baseline();468 maximumTopOffsetFromRootInlineBoxBaseline = std::max(maximumTopOffsetFromRootInlineBoxBaseline.valueOr(std::numeric_limits<InlineLayoutUnit>::lowest()), absoluteBaselineOffset + inlineLevelBox->layoutBounds().ascent); 469 } 470 auto rootInlineBoxLogicalTop = maximumTopOffsetFromRootInlineBoxBaseline.valueOr(0.f) - rootInlineBox.baseline(); 469 471 rootInlineBox.setLogicalTop(rootInlineBoxLogicalTop); 470 472 };
Note: See TracChangeset
for help on using the changeset viewer.