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

Commit dc3b802

Browse files
[LFC][Integration] Do not snap the vertical position of a render replaced to integral value
https://bugs.webkit.org/show_bug.cgi?id=217885 Reviewed by Antti Koivisto. Apparently legacy inline layout only snaps text content. * layout/integration/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::constructContent): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@268655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 4c3bff6 commit dc3b802

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Source/WebCore/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2020-10-18 Zalan Bujtas <[email protected]>
2+
3+
[LFC][Integration] Do not snap the vertical position of a render replaced to integral value
4+
https://bugs.webkit.org/show_bug.cgi?id=217885
5+
6+
Reviewed by Antti Koivisto.
7+
8+
Apparently legacy inline layout only snaps text content.
9+
10+
* layout/integration/LayoutIntegrationLineLayout.cpp:
11+
(WebCore::LayoutIntegration::LineLayout::constructContent):
12+
113
2020-10-18 Zalan Bujtas <[email protected]>
214

315
[LFC][IFC] Inline level boxes are at the incorrect position when line is horizontally aligned

Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ void LineLayout::constructContent()
155155
auto lineBoxLogicalRect = m_inlineFormattingState.lines()[lineIndex].lineBoxLogicalRect();
156156
runRect.moveBy({ lineBoxLogicalRect.left(), lineBoxLogicalRect.top() });
157157
// InlineTree rounds y position to integral value, see InlineFlowBox::placeBoxesInBlockDirection.
158-
runRect.setY(roundToInt(runRect.y()));
158+
auto needsLegacyIntegralPosition = !layoutBox.isReplacedBox();
159+
if (needsLegacyIntegralPosition)
160+
runRect.setY(roundToInt(runRect.y()));
159161

160162
WTF::Optional<Run::TextContent> textContent;
161163
if (auto text = lineRun.text())

0 commit comments

Comments
 (0)