Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 9dc96cf594dd31247f37fa53d3cd000471be0882 https://github.com/WebKit/WebKit/commit/9dc96cf594dd31247f37fa53d3cd000471be0882 Author: Simon Fraser <simon.fra...@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@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 _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes