Title: [272142] trunk/Source/WebCore
Revision
272142
Author
[email protected]
Date
2021-02-01 07:11:08 -0800 (Mon, 01 Feb 2021)

Log Message

[LFC][Integration] RenderInline::offsetLeft needs to call ensureLineBoxes
https://bugs.webkit.org/show_bug.cgi?id=221196

Reviewed by Zalan Bujtas.

Use ensureLineBoxes for rare API calls before we implement them fully in LFC integration.

* layout/integration/LayoutIntegrationCoverage.cpp:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::absoluteQuadsForSelection const):
(WebCore::RenderInline::offsetLeft const):
(WebCore::RenderInline::offsetTop const):
(WebCore::RenderInline::nodeAtPoint):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (272141 => 272142)


--- trunk/Source/WebCore/ChangeLog	2021-02-01 13:33:22 UTC (rev 272141)
+++ trunk/Source/WebCore/ChangeLog	2021-02-01 15:11:08 UTC (rev 272142)
@@ -1,3 +1,19 @@
+2021-02-01  Antti Koivisto  <[email protected]>
+
+        [LFC][Integration] RenderInline::offsetLeft needs to call ensureLineBoxes
+        https://bugs.webkit.org/show_bug.cgi?id=221196
+
+        Reviewed by Zalan Bujtas.
+
+        Use ensureLineBoxes for rare API calls before we implement them fully in LFC integration.
+
+        * layout/integration/LayoutIntegrationCoverage.cpp:
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::absoluteQuadsForSelection const):
+        (WebCore::RenderInline::offsetLeft const):
+        (WebCore::RenderInline::offsetTop const):
+        (WebCore::RenderInline::nodeAtPoint):
+
 2021-02-01  Miguel Gomez  <[email protected]>
 
         [CoordGraphics] Avoid painting backing stores for zero-opacity layers

Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (272141 => 272142)


--- trunk/Source/WebCore/rendering/RenderInline.cpp	2021-02-01 13:33:22 UTC (rev 272141)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp	2021-02-01 15:11:08 UTC (rev 272142)
@@ -427,6 +427,10 @@
 #if PLATFORM(IOS_FAMILY)
 void RenderInline::absoluteQuadsForSelection(Vector<FloatQuad>& quads) const
 {
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+    if (auto* lineLayout = LayoutIntegration::LineLayout::containing(const_cast<RenderInline&>(*this)))
+        lineLayout->flow().ensureLineBoxes();
+#endif
     AbsoluteQuadsGeneratorContext context(this, quads);
     generateLineBoxRects(context);
 }
@@ -434,6 +438,10 @@
 
 LayoutUnit RenderInline::offsetLeft() const
 {
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+    if (auto* lineLayout = LayoutIntegration::LineLayout::containing(const_cast<RenderInline&>(*this)))
+        lineLayout->flow().ensureLineBoxes();
+#endif
     LayoutPoint topLeft;
     if (InlineBox* firstBox = firstLineBoxIncludingCulling())
         topLeft = flooredLayoutPoint(firstBox->topLeft());
@@ -442,6 +450,10 @@
 
 LayoutUnit RenderInline::offsetTop() const
 {
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+    if (auto* lineLayout = LayoutIntegration::LineLayout::containing(const_cast<RenderInline&>(*this)))
+        lineLayout->flow().ensureLineBoxes();
+#endif
     LayoutPoint topLeft;
     if (InlineBox* firstBox = firstLineBoxIncludingCulling())
         topLeft = flooredLayoutPoint(firstBox->topLeft());
@@ -516,6 +528,10 @@
 bool RenderInline::nodeAtPoint(const HitTestRequest& request, HitTestResult& result,
                                 const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestAction)
 {
+#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
+    if (auto* lineLayout = LayoutIntegration::LineLayout::containing(const_cast<RenderInline&>(*this)))
+        lineLayout->flow().ensureLineBoxes();
+#endif
     return m_lineBoxes.hitTest(this, request, result, locationInContainer, accumulatedOffset, hitTestAction);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to