Title: [272648] trunk/Source/WebCore
- Revision
- 272648
- Author
- za...@apple.com
- Date
- 2021-02-10 06:49:45 -0800 (Wed, 10 Feb 2021)
Log Message
[LFC][IFC] Add inline box vertical border/padding to enclosing top and bottom
https://bugs.webkit.org/show_bug.cgi?id=221647
Reviewed by Antti Koivisto.
While inline boxes (<span>) don't stretch the line box vertically with their paddings and borders,
we need those boxes to be included in the enclosing top/bottom geometries.
This is also in preparation for supporting inline box overflow scroll.
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
* layout/integration/LayoutIntegrationCoverage.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (272647 => 272648)
--- trunk/Source/WebCore/ChangeLog 2021-02-10 14:37:20 UTC (rev 272647)
+++ trunk/Source/WebCore/ChangeLog 2021-02-10 14:49:45 UTC (rev 272648)
@@ -1,3 +1,18 @@
+2021-02-10 Zalan Bujtas <za...@apple.com>
+
+ [LFC][IFC] Add inline box vertical border/padding to enclosing top and bottom
+ https://bugs.webkit.org/show_bug.cgi?id=221647
+
+ Reviewed by Antti Koivisto.
+
+ While inline boxes (<span>) don't stretch the line box vertically with their paddings and borders,
+ we need those boxes to be included in the enclosing top/bottom geometries.
+ This is also in preparation for supporting inline box overflow scroll.
+
+ * layout/inlineformatting/InlineFormattingContext.cpp:
+ (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
+ * layout/integration/LayoutIntegrationCoverage.cpp:
+
2021-02-10 Xabier Rodriguez Calvar <calva...@igalia.com>
[GStreamer] Make m_client WeakPtr in AudioSourceProviderGStreamer
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp (272647 => 272648)
--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2021-02-10 14:37:20 UTC (rev 272647)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2021-02-10 14:49:45 UTC (rev 272648)
@@ -526,13 +526,16 @@
}
if (lineRun.isInlineBoxStart()) {
auto& boxGeometry = formattingState.boxGeometry(layoutBox);
- formattingState.addLineRun({ lineIndex, layoutBox, lineBox.logicalMarginRectForInlineLevelBox(layoutBox, boxGeometry), lineRun.expansion(), { } });
+ auto inlineBoxLogicalRect = lineBox.logicalMarginRectForInlineLevelBox(layoutBox, boxGeometry);
+ formattingState.addLineRun({ lineIndex, layoutBox, inlineBoxLogicalRect, lineRun.expansion(), { } });
inlineBoxStartSet.add(&layoutBox);
- // FIXME: Add enclosing top and bottom support.
+ enclosingTopAndBottom.top = std::min(enclosingTopAndBottom.top, inlineBoxLogicalRect.top());
continue;
}
if (lineRun.isInlineBoxEnd()) {
inlineBoxEndSet.add(&layoutBox);
+ auto inlineBoxLogicalRect = lineBox.logicalMarginRectForInlineLevelBox(layoutBox, formattingState.boxGeometry(layoutBox));
+ enclosingTopAndBottom.bottom = std::max(enclosingTopAndBottom.bottom, inlineBoxLogicalRect.bottom());
continue;
}
ASSERT(lineRun.isWordBreakOpportunity());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes