⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 272142 in webkit


Ignore:
Timestamp:
Feb 1, 2021, 7:11:08 AM (6 years ago)
Author:
Antti Koivisto
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r272141 r272142  
     12021-02-01  Antti Koivisto  <antti@apple.com>
     2
     3        [LFC][Integration] RenderInline::offsetLeft needs to call ensureLineBoxes
     4        https://bugs.webkit.org/show_bug.cgi?id=221196
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        Use ensureLineBoxes for rare API calls before we implement them fully in LFC integration.
     9
     10        * layout/integration/LayoutIntegrationCoverage.cpp:
     11        * rendering/RenderInline.cpp:
     12        (WebCore::RenderInline::absoluteQuadsForSelection const):
     13        (WebCore::RenderInline::offsetLeft const):
     14        (WebCore::RenderInline::offsetTop const):
     15        (WebCore::RenderInline::nodeAtPoint):
     16
    1172021-02-01  Miguel Gomez  <magomez@igalia.com>
    218
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r272062 r272142  
    428428void RenderInline::absoluteQuadsForSelection(Vector<FloatQuad>& quads) const
    429429{
     430#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
     431    if (auto* lineLayout = LayoutIntegration::LineLayout::containing(const_cast<RenderInline&>(*this)))
     432        lineLayout->flow().ensureLineBoxes();
     433#endif
    430434    AbsoluteQuadsGeneratorContext context(this, quads);
    431435    generateLineBoxRects(context);
    … …  
    435439LayoutUnit RenderInline::offsetLeft() const
    436440{
     441#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
     442    if (auto* lineLayout = LayoutIntegration::LineLayout::containing(const_cast<RenderInline&>(*this)))
     443        lineLayout->flow().ensureLineBoxes();
     444#endif
    437445    LayoutPoint topLeft;
    438446    if (InlineBox* firstBox = firstLineBoxIncludingCulling())
    … …  
    443451LayoutUnit RenderInline::offsetTop() const
    444452{
     453#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
     454    if (auto* lineLayout = LayoutIntegration::LineLayout::containing(const_cast<RenderInline&>(*this)))
     455        lineLayout->flow().ensureLineBoxes();
     456#endif
    445457    LayoutPoint topLeft;
    446458    if (InlineBox* firstBox = firstLineBoxIncludingCulling())
    … …  
    517529                                const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestAction)
    518530{
     531#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
     532    if (auto* lineLayout = LayoutIntegration::LineLayout::containing(const_cast<RenderInline&>(*this)))
     533        lineLayout->flow().ensureLineBoxes();
     534#endif
    519535    return m_lineBoxes.hitTest(this, request, result, locationInContainer, accumulatedOffset, hitTestAction);
    520536}
Note: See TracChangeset for help on using the changeset viewer.