Title: [269828] trunk/Source/WebCore
- Revision
- 269828
- Author
- [email protected]
- Date
- 2020-11-15 08:03:20 -0800 (Sun, 15 Nov 2020)
Log Message
"Typo" in r269821 (by std::numeric_limits<>::min I really meant std::numeric_limits<>::lowest (got tricked by the floating-point type behavior))
Unreviewed.
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::LineBoxBuilder::computeLineBoxHeightAndalignInlineLevelBoxesVertically):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (269827 => 269828)
--- trunk/Source/WebCore/ChangeLog 2020-11-15 15:38:57 UTC (rev 269827)
+++ trunk/Source/WebCore/ChangeLog 2020-11-15 16:03:20 UTC (rev 269828)
@@ -1,3 +1,12 @@
+2020-11-15 Zalan Bujtas <[email protected]>
+
+ "Typo" in r269821 (by std::numeric_limits<>::min I really meant std::numeric_limits<>::lowest (got tricked by the floating-point type behavior))
+
+ Unreviewed.
+
+ * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
+ (WebCore::Layout::LineBoxBuilder::computeLineBoxHeightAndalignInlineLevelBoxesVertically):
+
2020-11-15 Philippe Normand <[email protected]>
[GStreamer] WebAudio to MediaStream support
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp (269827 => 269828)
--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp 2020-11-15 15:38:57 UTC (rev 269827)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp 2020-11-15 16:03:20 UTC (rev 269828)
@@ -404,7 +404,9 @@
HashMap<LineBox::InlineLevelBox*, InlineLayoutUnit> inlineLevelBoxAbsoluteBaselineOffsetMap;
inlineLevelBoxAbsoluteBaselineOffsetMap.add(&rootInlineBox, InlineLayoutUnit { });
- auto maximumTopOffsetFromRootInlineBoxBaseline = rootInlineBox.isEmpty() ? std::numeric_limits<InlineLayoutUnit>::min() : rootInlineBox.layoutBounds().ascent;
+ auto maximumTopOffsetFromRootInlineBoxBaseline = Optional<InlineLayoutUnit> { };
+ if (!rootInlineBox.isEmpty())
+ maximumTopOffsetFromRootInlineBoxBaseline = rootInlineBox.layoutBounds().ascent;
for (auto& inlineLevelBox : lineBox.nonRootInlineLevelBoxes()) {
auto absoluteBaselineOffset = InlineLayoutUnit { };
@@ -463,9 +465,9 @@
inlineLevelBoxAbsoluteBaselineOffsetMap.add(inlineLevelBox.get(), absoluteBaselineOffset);
auto affectsRootInlineBoxVerticalPosition = quirks.shouldInlineLevelBoxStretchLineBox(lineBox, *inlineLevelBox);
if (affectsRootInlineBoxVerticalPosition)
- maximumTopOffsetFromRootInlineBoxBaseline = std::max(maximumTopOffsetFromRootInlineBoxBaseline, absoluteBaselineOffset + inlineLevelBox->layoutBounds().ascent);
+ maximumTopOffsetFromRootInlineBoxBaseline = std::max(maximumTopOffsetFromRootInlineBoxBaseline.valueOr(std::numeric_limits<InlineLayoutUnit>::lowest()), absoluteBaselineOffset + inlineLevelBox->layoutBounds().ascent);
}
- auto rootInlineBoxLogicalTop = maximumTopOffsetFromRootInlineBoxBaseline - rootInlineBox.baseline();
+ auto rootInlineBoxLogicalTop = maximumTopOffsetFromRootInlineBoxBaseline.valueOr(0.f) - rootInlineBox.baseline();
rootInlineBox.setLogicalTop(rootInlineBoxLogicalTop);
};
computeRootInlineBoxVerticalPosition();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes