Changeset 275509 in webkit


Ignore:
Timestamp:
Apr 6, 2021 6:18:50 AM (3 years ago)
Author:
Antti Koivisto
Message:

[LFC][Integration] Disable LFC if paginated context has inline boxes
https://bugs.webkit.org/show_bug.cgi?id=224222

Reviewed by Zalan Bujtas.

There are no known problems with this combination but it is untested.

  • layout/integration/LayoutIntegrationCoverage.cpp:

(WebCore::LayoutIntegration::canUseForChild):

Pass in the RenderBlockFlow and move the existing test requiring it here too.

(WebCore::LayoutIntegration::canUseForLineLayoutWithReason):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r275508 r275509  
     12021-04-06  Antti Koivisto  <antti@apple.com>
     2
     3        [LFC][Integration] Disable LFC if paginated context has inline boxes
     4        https://bugs.webkit.org/show_bug.cgi?id=224222
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        There are no known problems with this combination but it is untested.
     9
     10        * layout/integration/LayoutIntegrationCoverage.cpp:
     11        (WebCore::LayoutIntegration::canUseForChild):
     12       
     13        Pass in the RenderBlockFlow and move the existing test requiring it here too.
     14       
     15        (WebCore::LayoutIntegration::canUseForLineLayoutWithReason):
     16       
    1172021-04-06  Keith Miller  <keith_miller@apple.com>
    218
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp

    r273626 r275509  
    599599}
    600600
    601 static OptionSet<AvoidanceReason> canUseForChild(const RenderObject& child, IncludeReasons includeReasons)
     601static OptionSet<AvoidanceReason> canUseForChild(const RenderBlockFlow& flow, const RenderObject& child, IncludeReasons includeReasons)
    602602{
    603603    OptionSet<AvoidanceReason> reasons;
     
    611611            SET_REASON_AND_RETURN_IF_NEEDED(FlowIncludesDocumentMarkers, reasons, includeReasons);
    612612        return reasons;
     613    }
     614   
     615    if (flow.containsFloats()) {
     616        // Non-text content may stretch the line and we don't yet have support for dynamic float avoiding (as the line grows).
     617        SET_REASON_AND_RETURN_IF_NEEDED(FlowHasUnsupportedFloat, reasons, includeReasons);
    613618    }
    614619
     
    688693        if (renderInline.requiresLayer())
    689694            SET_REASON_AND_RETURN_IF_NEEDED(InlineBoxNeedsLayer, reasons, includeReasons)
     695        if (flow.fragmentedFlowState() != RenderObject::NotInsideFragmentedFlow)
     696            SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonSupportedChild, reasons, includeReasons);
    690697
    691698        auto& style = renderInline.style();
     
    797804    // The <blockflow><inline>#text</inline></blockflow> case is also popular and should be relatively easy to cover.
    798805    for (auto walker = InlineWalker(const_cast<RenderBlockFlow&>(flow)); !walker.atEnd(); walker.advance()) {
    799         auto& child = *walker.current();
    800         if (!is<RenderText>(child) && flow.containsFloats()) {
    801             // Non-text content may stretch the line and we don't yet have support for dynamic float avoiding (as the line grows).
    802             SET_REASON_AND_RETURN_IF_NEEDED(FlowHasUnsupportedFloat, reasons, includeReasons);
    803         }
    804         auto childReasons = canUseForChild(child, includeReasons);
    805         if (childReasons)
     806        if (auto childReasons = canUseForChild(flow, *walker.current(), includeReasons))
    806807            ADD_REASONS_AND_RETURN_IF_NEEDED(childReasons, reasons, includeReasons);
    807808    }
Note: See TracChangeset for help on using the changeset viewer.