Title: [267446] trunk/Source/WebCore
- Revision
- 267446
- Author
- [email protected]
- Date
- 2020-09-22 16:43:06 -0700 (Tue, 22 Sep 2020)
Log Message
[LFC][IFC] Used geometry for inline level boxes should be in the coordinate system of the formatting context root
https://bugs.webkit.org/show_bug.cgi?id=216854
Reviewed by Simon Fraser.
Convert inline level box geometry from relative to the line box to relative to the formatting context root.
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (267445 => 267446)
--- trunk/Source/WebCore/ChangeLog 2020-09-22 23:15:49 UTC (rev 267445)
+++ trunk/Source/WebCore/ChangeLog 2020-09-22 23:43:06 UTC (rev 267446)
@@ -1,3 +1,15 @@
+2020-09-22 Zalan Bujtas <[email protected]>
+
+ [LFC][IFC] Used geometry for inline level boxes should be in the coordinate system of the formatting context root
+ https://bugs.webkit.org/show_bug.cgi?id=216854
+
+ Reviewed by Simon Fraser.
+
+ Convert inline level box geometry from relative to the line box to relative to the formatting context root.
+
+ * layout/inlineformatting/InlineFormattingContext.cpp:
+ (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent):
+
2020-09-22 Chris Dumez <[email protected]>
Fix BiquadFilterNode's lowpass & highpass filters
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp (267445 => 267446)
--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2020-09-22 23:15:49 UTC (rev 267445)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2020-09-22 23:43:06 UTC (rev 267446)
@@ -444,10 +444,14 @@
continue;
}
auto& boxGeometry = formattingState.boxGeometry(layoutBox);
- auto marginBoxLogicalTopLeft = inlineBox->logicalRect().topLeft();
- auto borderBoxLogicalTopLeft = marginBoxLogicalTopLeft + InlineLayoutSize({ }, boxGeometry.marginBefore());
+ // Inline box coordinates are relative to the line box.
+ // Let's convert top/left relative to the formatting context root.
+ auto borderBoxLogicalTopLeft = lineLogicalRect.topLeft();
+ borderBoxLogicalTopLeft.move({ }, lineBoxVerticalOffset);
+ auto inlineBoxLogicalTopLeft = inlineBox->logicalRect().topLeft();
+ // Inline box height includes the margin box. Let's account for that.
+ borderBoxLogicalTopLeft.move(inlineBoxLogicalTopLeft.x(), inlineBoxLogicalTopLeft.y() + boxGeometry.marginBefore());
- borderBoxLogicalTopLeft.move({ }, lineBoxVerticalOffset);
if (layoutBox.isInFlowPositioned())
borderBoxLogicalTopLeft += geometry.inFlowPositionedPositionOffset(layoutBox, horizontalConstraints);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes