Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit 4c3bff6

Browse files
[LFC][IFC] Inline level boxes are at the incorrect position when line is horizontally aligned
https://bugs.webkit.org/show_bug.cgi?id=217887 Reviewed by Antti Koivisto. Inline boxes (as opposed to runs) are constructed after the horizontal alignment is computed so their position already includes the horizontal offset. No need to offset the again at logicalRectForInlineLevelBox. * layout/inlineformatting/InlineLineBox.cpp: (WebCore::Layout::LineBox::logicalRectForInlineLevelBox const): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent dfa69b4 commit 4c3bff6

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Source/WebCore/ChangeLog

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2020-10-18 Zalan Bujtas <[email protected]>
2+
3+
[LFC][IFC] Inline level boxes are at the incorrect position when line is horizontally aligned
4+
https://bugs.webkit.org/show_bug.cgi?id=217887
5+
6+
Reviewed by Antti Koivisto.
7+
8+
Inline boxes (as opposed to runs) are constructed after the horizontal alignment is computed so their position
9+
already includes the horizontal offset. No need to offset the again at logicalRectForInlineLevelBox.
10+
11+
* layout/inlineformatting/InlineLineBox.cpp:
12+
(WebCore::Layout::LineBox::logicalRectForInlineLevelBox const):
13+
114
2020-10-18 Zalan Bujtas <[email protected]>
215

316
[LFC][IFC] Add quirks mode for root inline box height stretching

Source/WebCore/layout/inlineformatting/InlineLineBox.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ InlineRect LineBox::logicalRectForInlineLevelBox(const Box& layoutBox) const
9191
ASSERT(inlineBox->isInlineBox());
9292
inlineBoxAbsolutelogicalTop += inlineBox->logicalTop();
9393
}
94-
return { inlineBoxAbsolutelogicalTop, m_horizontalAlignmentOffset.valueOr(InlineLayoutUnit { }) + inlineBoxLogicalRect.left(), inlineBoxLogicalRect.width(), inlineBoxLogicalRect.height() };
94+
return { inlineBoxAbsolutelogicalTop, inlineBoxLogicalRect.left(), inlineBoxLogicalRect.width(), inlineBoxLogicalRect.height() };
9595
}
9696

9797
}

0 commit comments

Comments
 (0)