Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 57341eed214e87582b93f6ee9ddc723b9641f6f2 https://github.com/WebKit/WebKit/commit/57341eed214e87582b93f6ee9ddc723b9641f6f2 Author: Said Abou-Hallawa <s...@apple.com> Date: 2025-09-15 (Mon, 15 Sep 2025)
Changed paths: M Source/WebCore/rendering/LayerFragment.h M Source/WebCore/rendering/RenderLayer.cpp M Source/WebCore/rendering/RenderLayer.h M Source/WebCore/rendering/RenderLayerScrollableArea.cpp M Source/WebCore/rendering/RenderTreeAsText.cpp Log Message: ----------- Apply the dirty rectangle to the ClipRects of LayerFragment only when they are requested https://bugs.webkit.org/show_bug.cgi?id=298845 rdar://160585141 Reviewed by Simon Fraser. LayerFragment::Rects will be added to hold the return of RenderLayer::calculateRects(). dirtyBackgroundRect() and dirtyForegroundRect() will return the intersection of their rectangles and the dirty rectangle. This will allow returning the un-dirty rectangles if needed. Also there is no need to calculate all the ClipRects and BoundingBoxes when only one rectangle is required. Refactoring LayerFragment::Rects should make this doable and cleaner. * Source/WebCore/rendering/LayerFragment.h: (WebCore::LayerFragment::Rects::Rects): (WebCore::LayerFragment::Rects::layerBounds const): (WebCore::LayerFragment::Rects::dirtyBackgroundRect const): (WebCore::LayerFragment::Rects::dirtyForegroundRect const): (WebCore::LayerFragment::Rects::boundingBox const): (WebCore::LayerFragment::Rects::moveBy): (WebCore::LayerFragment::Rects::intersect): (WebCore::LayerFragment::LayerFragment): (WebCore::LayerFragment::layerBounds const): (WebCore::LayerFragment::dirtyBackgroundRect const): (WebCore::LayerFragment::dirtyForegroundRect const): (WebCore::LayerFragment::boundingBox const): (WebCore::LayerFragment::moveBy): (WebCore::LayerFragment::intersect): (WebCore::LayerFragment::setRects): Deleted. * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayerContents): (WebCore::RenderLayer::collectFragments): (WebCore::RenderLayer::updatePaintingInfoForFragments): (WebCore::RenderLayer::paintTransformedLayerIntoFragments): (WebCore::RenderLayer::paintBackgroundForFragments): (WebCore::RenderLayer::paintForegroundForFragments): (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase): (WebCore::RenderLayer::paintOutlineForFragments): (WebCore::RenderLayer::paintMaskForFragments): (WebCore::RenderLayer::paintChildClippingMaskForFragments): (WebCore::RenderLayer::paintOverflowControlsForFragments): (WebCore::RenderLayer::collectEventRegionForFragments): (WebCore::RenderLayer::collectAccessibilityRegionsForFragments): (WebCore::RenderLayer::hitTestContentsForFragments const): (WebCore::RenderLayer::hitTestTransformedLayerInFragments): (WebCore::RenderLayer::calculateClipRects const): * Source/WebCore/rendering/RenderLayer.h: * Source/WebCore/rendering/RenderLayerScrollableArea.cpp: (WebCore::RenderLayerScrollableArea::hitTestResizerInFragments const): * Source/WebCore/rendering/RenderTreeAsText.cpp: (WebCore::writeLayers): Canonical link: https://commits.webkit.org/299967@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes