[webkit-changes] [WebKit/WebKit] 5c239a: Clean up RenderElement::repaintAfterLayoutIfNeeded()

Simon Fraser noreply at github.com
Sat Dec 2 23:30:52 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5c239a3e46973761ff7d8a20b5a4ce27c0e8bd2d
      https://github.com/WebKit/WebKit/commit/5c239a3e46973761ff7d8a20b5a4ce27c0e8bd2d
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-12-02 (Sat, 02 Dec 2023)

  Changed paths:
    M LayoutTests/editing/caret/insert-paragraph-does-not-paint-stale-carets-expected.txt
    M LayoutTests/platform/gtk/editing/caret/insert-paragraph-does-not-paint-stale-carets-expected.txt
    M LayoutTests/platform/gtk/fast/repaint/4776765-expected.txt
    M LayoutTests/platform/ios-wk2/compositing/repaint/invalidations-on-composited-layers-expected.txt
    M LayoutTests/platform/mac-monterey-wk2/fast/repaint/4776765-expected.txt
    M LayoutTests/platform/mac-monterey/editing/caret/insert-paragraph-does-not-paint-stale-carets-expected.txt
    M LayoutTests/platform/mac-ventura-wk2/fast/repaint/4776765-expected.txt
    M LayoutTests/platform/mac-ventura/editing/caret/insert-paragraph-does-not-paint-stale-carets-expected.txt
    M LayoutTests/platform/mac-wk1/fast/repaint/4776765-expected.txt
    M LayoutTests/platform/mac/compositing/repaint/invalidations-on-composited-layers-expected.txt
    M LayoutTests/platform/mac/editing/caret/insert-paragraph-does-not-paint-stale-carets-expected.txt
    M LayoutTests/platform/mac/fast/repaint/4776765-expected.txt
    M Source/WebCore/rendering/RenderElement.cpp

  Log Message:
  -----------
  Clean up RenderElement::repaintAfterLayoutIfNeeded()
https://bugs.webkit.org/show_bug.cgi?id=265726
rdar://119077478

Reviewed by Alan Baradlay.

Tidy up RenderElement::repaintAfterLayoutIfNeeded() by using a couple of lambda functions; one to replace
the standalone `mustRepaintBackgroundOrBorder()`, and a second to clarify the computation of `fullRepaint`.

There's one behavior change from:
        if (oldClippedOverflowRect.isEmpty() || newClippedOverflowRect.isEmpty())
            return true;

which removes some redundant repaints in fast/repaint/4776765.html.

* LayoutTests/editing/caret/insert-paragraph-does-not-paint-stale-carets-expected.txt:
* LayoutTests/platform/gtk/editing/caret/insert-paragraph-does-not-paint-stale-carets-expected.txt:
* LayoutTests/platform/gtk/fast/repaint/4776765-expected.txt:
* LayoutTests/platform/ios-wk2/compositing/repaint/invalidations-on-composited-layers-expected.txt:
* LayoutTests/platform/mac-monterey-wk2/fast/repaint/4776765-expected.txt:
* LayoutTests/platform/mac-monterey/editing/caret/insert-paragraph-does-not-paint-stale-carets-expected.txt:
* LayoutTests/platform/mac-ventura-wk2/fast/repaint/4776765-expected.txt:
* LayoutTests/platform/mac-ventura/editing/caret/insert-paragraph-does-not-paint-stale-carets-expected.txt:
* LayoutTests/platform/mac-wk1/fast/repaint/4776765-expected.txt:
* LayoutTests/platform/mac/compositing/repaint/invalidations-on-composited-layers-expected.txt:
* LayoutTests/platform/mac/editing/caret/insert-paragraph-does-not-paint-stale-carets-expected.txt:
* LayoutTests/platform/mac/fast/repaint/4776765-expected.txt:
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::repaintAfterLayoutIfNeeded):
(WebCore::mustRepaintBackgroundOrBorder): Deleted.

Canonical link: https://commits.webkit.org/271435@main




More information about the webkit-changes mailing list