Changeset 276707 in webkit
- Timestamp:
- Apr 28, 2021, 6:30:36 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r276705 r276707 1 2021-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 1 29 2021-04-28 Miguel Gomez <magomez@igalia.com> 2 30 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r276445 r276707 2369 2369 return adjustedRect; 2370 2370 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 positioned2373 // elements because their absolute position already pushes them down through2374 // the fragments so adding this here and then adding the topLeft again would cause2375 // us to add the height twice.2376 // The same logic applies for elements flowed directly into the flow thread. Their topLeft member2377 // 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 2386 2371 if (isWritingModeRoot()) { 2387 2372 if (!isOutOfFlowPositioned() || !context.dirtyRectIsFlipped) { … … 2419 2404 // We are now in our parent container's coordinate space. Apply our transform to obtain a bounding box 2420 2405 // in the parent's coordinate space that encloses us. 2406 auto position = styleToUse.position(); 2421 2407 if (hasLayer() && layer()->transform()) { 2422 2408 context.hasPositionFixedDescendant = position == PositionType::Fixed; -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r276182 r276707 2646 2646 return; 2647 2647 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 column2650 // 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 2660 2648 container->mapAbsoluteToLocalPoint(mode, transformState); 2661 2649 -
trunk/Source/WebCore/rendering/RenderElement.h
r276627 r276707 432 432 || (isRenderBlock() && style().willChange() && style().willChange()->createsContainingBlockForOutOfFlowPositioned()) 433 433 || isSVGForeignObject() 434 || shouldApplyLayoutContainment(*this) 435 || isOutOfFlowRenderFragmentedFlow(); 434 || shouldApplyLayoutContainment(*this); 436 435 } 437 436 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r276576 r276707 2276 2276 if (position == PositionType::Fixed && fixedFragmentedFlowContainer) { 2277 2277 ASSERT(ancestorLayer); 2278 if (ancestorLayer->isOutOfFlowRenderFragmentedFlow()) {2279 location += toLayoutSize(layer->location());2280 return ancestorLayer;2281 }2282 2283 2278 if (ancestorLayer == renderer.view().layer()) { 2284 2279 // Add location in flow thread coordinates. … … 2314 2309 // We should not reach RenderView layer past the RenderFragmentedFlow layer for any 2315 2310 // children of the RenderFragmentedFlow. 2316 if (renderer.enclosingFragmentedFlow() && !layer->isOutOfFlowRenderFragmentedFlow())2311 if (renderer.enclosingFragmentedFlow()) 2317 2312 ASSERT(parentLayer != renderer.view().layer()); 2318 2313 … … 4314 4309 // the tree. 4315 4310 if (!result.innerNode() || !result.innerNonSharedNode()) { 4316 if (isOutOfFlowRenderFragmentedFlow()) {4317 // The flowthread doesn't have an enclosing element, so when hitting the layer of the4318 // flowthread (e.g. the descent area of the RootInlineBox for the image flowed alone4319 // inside the flow thread) we're letting the hit testing continue so it will hit the region.4320 return false;4321 }4322 4323 4311 Element* e = enclosingElement(); 4324 4312 if (!result.innerNode()) … … 4563 4551 4564 4552 LayoutSize offsetFromRootLocal = offsetFromRoot; 4565 4566 if (clipRectsContext.rootLayer->isOutOfFlowRenderFragmentedFlow()) {4567 LayoutPoint absPos = LayoutPoint(renderer().view().localToAbsolute(FloatPoint(), IsFixed));4568 offsetFromRootLocal += toLayoutSize(absPos);4569 }4570 4553 4571 4554 layerBounds = LayoutRect(toLayoutPoint(offsetFromRootLocal), size()); -
trunk/Source/WebCore/rendering/RenderLayer.h
r275641 r276707 828 828 829 829 bool isRenderFragmentedFlow() const { return renderer().isRenderFragmentedFlow(); } 830 bool isOutOfFlowRenderFragmentedFlow() const { return renderer().isOutOfFlowRenderFragmentedFlow(); }831 830 bool isInsideFragmentedFlow() const { return renderer().fragmentedFlowState() != RenderObject::NotInsideFragmentedFlow; } 832 831 bool isDirtyRenderFragmentedFlow() const -
trunk/Source/WebCore/rendering/RenderObject.h
r276331 r276707 263 263 virtual bool isRenderGrid() const { return false; } 264 264 bool isInFlowRenderFragmentedFlow() const { return isRenderFragmentedFlow() && !isOutOfFlowPositioned(); } 265 bool isOutOfFlowRenderFragmentedFlow() const { return isRenderFragmentedFlow() && isOutOfFlowPositioned(); }266 265 267 266 virtual bool isMultiColumnBlockFlow() const { return false; }
Note:
See TracChangeset
for help on using the changeset viewer.