Changeset 276707 in webkit


Ignore:
Timestamp:
Apr 28, 2021, 6:30:36 AM (4 years ago)
Author:
Alan Bujtas
Message:

Remove unused RenderObject::isOutOfFlowRenderFragmentedFlow
https://bugs.webkit.org/show_bug.cgi?id=225133

Reviewed by Simon Fraser.

Out-of-flow fragmented flows were originally added for CSS regions (r91760) to provide
an anonymous container for the region content. This is not to be confused with a multi-column box with
"position: absolute/fixed" (such content would still generate an in-flow fragment container).

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeVisibleRectInContainer const):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint const):

  • rendering/RenderElement.h:

(WebCore::RenderElement::canContainFixedPositionObjects const):

  • rendering/RenderLayer.cpp:

(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::hitTestContents const):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayer.h:

(WebCore::RenderLayer::isRenderFragmentedFlow const):
(WebCore::RenderLayer::isOutOfFlowRenderFragmentedFlow const): Deleted.

  • rendering/RenderObject.h:

(WebCore::RenderObject::isInFlowRenderFragmentedFlow const):
(WebCore::RenderObject::isOutOfFlowRenderFragmentedFlow const): Deleted.

Location:
trunk/Source/WebCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r276705 r276707  
     12021-04-28  Zalan Bujtas  <zalan@apple.com>
     2
     3        Remove unused RenderObject::isOutOfFlowRenderFragmentedFlow
     4        https://bugs.webkit.org/show_bug.cgi?id=225133
     5
     6        Reviewed by Simon Fraser.
     7
     8        Out-of-flow fragmented flows were originally added for CSS regions (r91760) to provide
     9        an anonymous container for the region content. This is not to be confused with a multi-column box with
     10        "position: absolute/fixed" (such content would still generate an in-flow fragment container).
     11
     12        * rendering/RenderBox.cpp:
     13        (WebCore::RenderBox::computeVisibleRectInContainer const):
     14        * rendering/RenderBoxModelObject.cpp:
     15        (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint const):
     16        * rendering/RenderElement.h:
     17        (WebCore::RenderElement::canContainFixedPositionObjects const):
     18        * rendering/RenderLayer.cpp:
     19        (WebCore::accumulateOffsetTowardsAncestor):
     20        (WebCore::RenderLayer::hitTestContents const):
     21        (WebCore::RenderLayer::calculateClipRects const):
     22        * rendering/RenderLayer.h:
     23        (WebCore::RenderLayer::isRenderFragmentedFlow const):
     24        (WebCore::RenderLayer::isOutOfFlowRenderFragmentedFlow const): Deleted.
     25        * rendering/RenderObject.h:
     26        (WebCore::RenderObject::isInFlowRenderFragmentedFlow const):
     27        (WebCore::RenderObject::isOutOfFlowRenderFragmentedFlow const): Deleted.
     28
    1292021-04-28  Miguel Gomez  <magomez@igalia.com>
    230
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r276445 r276707  
    23692369        return adjustedRect;
    23702370   
    2371     // This code isn't necessary for in-flow RenderFragmentedFlows.
    2372     // Don't add the location of the fragment in the flow thread for absolute positioned
    2373     // elements because their absolute position already pushes them down through
    2374     // the fragments so adding this here and then adding the topLeft again would cause
    2375     // us to add the height twice.
    2376     // The same logic applies for elements flowed directly into the flow thread. Their topLeft member
    2377     // will already contain the portion rect of the fragment.
    2378     auto position = styleToUse.position();
    2379     if (localContainer->isOutOfFlowRenderFragmentedFlow() && position != PositionType::Absolute && containingBlock() != enclosingFragmentedFlow()) {
    2380         RenderFragmentContainer* firstFragment = nullptr;
    2381         RenderFragmentContainer* lastFragment = nullptr;
    2382         if (downcast<RenderFragmentedFlow>(*localContainer).getFragmentRangeForBox(this, firstFragment, lastFragment))
    2383             adjustedRect.moveBy(firstFragment->fragmentedFlowPortionRect().location());
    2384     }
    2385 
    23862371    if (isWritingModeRoot()) {
    23872372        if (!isOutOfFlowPositioned() || !context.dirtyRectIsFlipped) {
     
    24192404    // We are now in our parent container's coordinate space. Apply our transform to obtain a bounding box
    24202405    // in the parent's coordinate space that encloses us.
     2406    auto position = styleToUse.position();
    24212407    if (hasLayer() && layer()->transform()) {
    24222408        context.hasPositionFixedDescendant = position == PositionType::Fixed;
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r276182 r276707  
    26462646        return;
    26472647   
    2648     // FIXME: This code is wrong for named flow threads since it only works for content in the first region.
    2649     // We also don't want to run it for multicolumn flow threads, since we can use our knowledge of column
    2650     // geometry to actually get a better result.
    2651     // The point inside a box that's inside a region has its coordinates relative to the region,
    2652     // not the FragmentedFlow that is its container in the RenderObject tree.
    2653     if (is<RenderBox>(*this) && container->isOutOfFlowRenderFragmentedFlow()) {
    2654         RenderFragmentContainer* startFragment = nullptr;
    2655         RenderFragmentContainer* endFragment = nullptr;
    2656         if (downcast<RenderFragmentedFlow>(*container).getFragmentRangeForBox(downcast<RenderBox>(this), startFragment, endFragment))
    2657             container = startFragment;
    2658     }
    2659 
    26602648    container->mapAbsoluteToLocalPoint(mode, transformState);
    26612649
  • trunk/Source/WebCore/rendering/RenderElement.h

    r276627 r276707  
    432432        || (isRenderBlock() && style().willChange() && style().willChange()->createsContainingBlockForOutOfFlowPositioned())
    433433        || isSVGForeignObject()
    434         || shouldApplyLayoutContainment(*this)
    435         || isOutOfFlowRenderFragmentedFlow();
     434        || shouldApplyLayoutContainment(*this);
    436435}
    437436
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r276576 r276707  
    22762276    if (position == PositionType::Fixed && fixedFragmentedFlowContainer) {
    22772277        ASSERT(ancestorLayer);
    2278         if (ancestorLayer->isOutOfFlowRenderFragmentedFlow()) {
    2279             location += toLayoutSize(layer->location());
    2280             return ancestorLayer;
    2281         }
    2282 
    22832278        if (ancestorLayer == renderer.view().layer()) {
    22842279            // Add location in flow thread coordinates.
     
    23142309        // We should not reach RenderView layer past the RenderFragmentedFlow layer for any
    23152310        // children of the RenderFragmentedFlow.
    2316         if (renderer.enclosingFragmentedFlow() && !layer->isOutOfFlowRenderFragmentedFlow())
     2311        if (renderer.enclosingFragmentedFlow())
    23172312            ASSERT(parentLayer != renderer.view().layer());
    23182313
     
    43144309    // the tree.
    43154310    if (!result.innerNode() || !result.innerNonSharedNode()) {
    4316         if (isOutOfFlowRenderFragmentedFlow()) {
    4317             // The flowthread doesn't have an enclosing element, so when hitting the layer of the
    4318             // flowthread (e.g. the descent area of the RootInlineBox for the image flowed alone
    4319             // inside the flow thread) we're letting the hit testing continue so it will hit the region.
    4320             return false;
    4321         }
    4322 
    43234311        Element* e = enclosingElement();
    43244312        if (!result.innerNode())
     
    45634551
    45644552    LayoutSize offsetFromRootLocal = offsetFromRoot;
    4565 
    4566     if (clipRectsContext.rootLayer->isOutOfFlowRenderFragmentedFlow()) {
    4567         LayoutPoint absPos = LayoutPoint(renderer().view().localToAbsolute(FloatPoint(), IsFixed));
    4568         offsetFromRootLocal += toLayoutSize(absPos);
    4569     }
    45704553
    45714554    layerBounds = LayoutRect(toLayoutPoint(offsetFromRootLocal), size());
  • trunk/Source/WebCore/rendering/RenderLayer.h

    r275641 r276707  
    828828
    829829    bool isRenderFragmentedFlow() const { return renderer().isRenderFragmentedFlow(); }
    830     bool isOutOfFlowRenderFragmentedFlow() const { return renderer().isOutOfFlowRenderFragmentedFlow(); }
    831830    bool isInsideFragmentedFlow() const { return renderer().fragmentedFlowState() != RenderObject::NotInsideFragmentedFlow; }
    832831    bool isDirtyRenderFragmentedFlow() const
  • trunk/Source/WebCore/rendering/RenderObject.h

    r276331 r276707  
    263263    virtual bool isRenderGrid() const { return false; }
    264264    bool isInFlowRenderFragmentedFlow() const { return isRenderFragmentedFlow() && !isOutOfFlowPositioned(); }
    265     bool isOutOfFlowRenderFragmentedFlow() const { return isRenderFragmentedFlow() && isOutOfFlowPositioned(); }
    266265
    267266    virtual bool isMultiColumnBlockFlow() const { return false; }
Note: See TracChangeset for help on using the changeset viewer.