Title: [268655] trunk/Source/WebCore
- Revision
- 268655
- Author
- za...@apple.com
- Date
- 2020-10-18 05:48:08 -0700 (Sun, 18 Oct 2020)
Log Message
[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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (268654 => 268655)
--- trunk/Source/WebCore/ChangeLog 2020-10-18 12:42:22 UTC (rev 268654)
+++ trunk/Source/WebCore/ChangeLog 2020-10-18 12:48:08 UTC (rev 268655)
@@ -1,5 +1,17 @@
2020-10-18 Zalan Bujtas <za...@apple.com>
+ [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):
+
+2020-10-18 Zalan Bujtas <za...@apple.com>
+
[LFC][IFC] Inline level boxes are at the incorrect position when line is horizontally aligned
https://bugs.webkit.org/show_bug.cgi?id=217887
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp (268654 => 268655)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2020-10-18 12:42:22 UTC (rev 268654)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2020-10-18 12:48:08 UTC (rev 268655)
@@ -155,7 +155,9 @@
auto lineBoxLogicalRect = m_inlineFormattingState.lines()[lineIndex].lineBoxLogicalRect();
runRect.moveBy({ lineBoxLogicalRect.left(), lineBoxLogicalRect.top() });
// InlineTree rounds y position to integral value, see InlineFlowBox::placeBoxesInBlockDirection.
- runRect.setY(roundToInt(runRect.y()));
+ auto needsLegacyIntegralPosition = !layoutBox.isReplacedBox();
+ if (needsLegacyIntegralPosition)
+ runRect.setY(roundToInt(runRect.y()));
WTF::Optional<Run::TextContent> textContent;
if (auto text = lineRun.text())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes