Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify repainting logic in RenderLayer::recursiveUpdateLayerPositio…
…ns() 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
- Loading branch information