Changeset 267446 in webkit
- Timestamp:
- Sep 22, 2020, 4:43:06 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
layout/inlineformatting/InlineFormattingContext.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r267444 r267446 1 2020-09-22 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Used geometry for inline level boxes should be in the coordinate system of the formatting context root 4 https://bugs.webkit.org/show_bug.cgi?id=216854 5 6 Reviewed by Simon Fraser. 7 8 Convert inline level box geometry from relative to the line box to relative to the formatting context root. 9 10 * layout/inlineformatting/InlineFormattingContext.cpp: 11 (WebCore::Layout::InlineFormattingContext::computeGeometryForLineContent): 12 1 13 2020-09-22 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
r267437 r267446 445 445 } 446 446 auto& boxGeometry = formattingState.boxGeometry(layoutBox); 447 auto marginBoxLogicalTopLeft = inlineBox->logicalRect().topLeft();448 auto borderBoxLogicalTopLeft = marginBoxLogicalTopLeft + InlineLayoutSize({ }, boxGeometry.marginBefore());449 447 // Inline box coordinates are relative to the line box. 448 // Let's convert top/left relative to the formatting context root. 449 auto borderBoxLogicalTopLeft = lineLogicalRect.topLeft(); 450 450 borderBoxLogicalTopLeft.move({ }, lineBoxVerticalOffset); 451 auto inlineBoxLogicalTopLeft = inlineBox->logicalRect().topLeft(); 452 // Inline box height includes the margin box. Let's account for that. 453 borderBoxLogicalTopLeft.move(inlineBoxLogicalTopLeft.x(), inlineBoxLogicalTopLeft.y() + boxGeometry.marginBefore()); 454 451 455 if (layoutBox.isInFlowPositioned()) 452 456 borderBoxLogicalTopLeft += geometry.inFlowPositionedPositionOffset(layoutBox, horizontalConstraints);
Note:
See TracChangeset
for help on using the changeset viewer.