[webkit-changes] [WebKit/WebKit] 9dc96c: Simplify repainting logic in RenderLayer::recursiv...
Simon Fraser
noreply at github.com
Thu Nov 9 09:08:40 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9dc96cf594dd31247f37fa53d3cd000471be0882
https://github.com/WebKit/WebKit/commit/9dc96cf594dd31247f37fa53d3cd000471be0882
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2023-11-09 (Thu, 09 Nov 2023)
Changed paths:
M LayoutTests/fast/repaint/hidpi-box-with-subpixel-height-inflates-expected.txt
M Source/WebCore/rendering/RenderLayer.cpp
Log Message:
-----------
Simplify repainting logic in RenderLayer::recursiveUpdateLayerPositions()
https://bugs.webkit.org/show_bug.cgi?id=264461
rdar://118151709
Reviewed by Alan Baradlay.
The `NeedsFullRepaint` case previously duplicate some logic that exists in `RenderElement::repaintAfterLayoutIfNeeded()`,
which is that if we're doing a full repaint, we just need to paint the clippedOverflowRects.
This logic was optimized in 270370 at main to turn two repaints into one sometimes, and we can re-use it here. We know
that in the RequiresFullRepaint::Yes case, `RenderElement::repaintAfterLayoutIfNeeded()` only consults the clippedOverflowRects,
so we can fold this logic with the second `shouldRepaintAfterLayout()` clause. It's fine to pass empty oldRects if we didn't
have any.
`repaintAfterLayoutIfNeeded()` does the check for printing, so we can remove that. Also the comment duplicates comments
in that function too, so remove it.
* LayoutTests/fast/repaint/hidpi-box-with-subpixel-height-inflates-expected.txt:
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::recursiveUpdateLayerPositions):
(WebCore::RenderLayer::shouldRepaintAfterLayout const):
Canonical link: https://commits.webkit.org/270454@main
More information about the webkit-changes
mailing list