Skip to content

Commit 4ef5c80

Browse files
committed
[LFC][Integration] Take alignment offset into account when computing line iterator logicalLeft
https://bugs.webkit.org/show_bug.cgi?id=219197 Reviewed by Zalan Bujtas. This fixes editing/style/text-indent.html with LFC editing enabled. * layout/integration/LayoutIntegrationLineIteratorModernPath.h: (WebCore::LayoutIntegration::LineIteratorModernPath::logicalLeft const): Canonical link: https://commits.webkit.org/231821@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 1142236 commit 4ef5c80

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

Source/WebCore/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2020-11-20 Antti Koivisto <antti@apple.com>
2+
3+
[LFC][Integration] Take alignment offset into account when computing line iterator logicalLeft
4+
https://bugs.webkit.org/show_bug.cgi?id=219197
5+
6+
Reviewed by Zalan Bujtas.
7+
8+
This fixes editing/style/text-indent.html with LFC editing enabled.
9+
10+
* layout/integration/LayoutIntegrationLineIteratorModernPath.h:
11+
(WebCore::LayoutIntegration::LineIteratorModernPath::logicalLeft const):
12+
113
2020-11-20 Zalan Bujtas <zalan@apple.com>
214

315
[LFC] BoxGeometry only tracks the reserved horizontal/vertical space for the scrollbars

Source/WebCore/layout/integration/LayoutIntegrationLineIteratorModernPath.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class LineIteratorModernPath {
5959
LayoutUnit selectionTopForHitTesting() const { return top(); }
6060
LayoutUnit selectionBottom() const { return bottom(); }
6161

62-
float logicalLeft() const { return line().rect().x(); }
62+
float logicalLeft() const { return line().rect().x() + line().horizontalAlignmentOffset(); }
6363
float logicalRight() const { return logicalLeft() + line().lineBoxWidth(); }
6464
float y() const { return lineBoxTop(); }
6565
float logicalHeight() const { return line().rect().height(); }

0 commit comments

Comments
 (0)