[webkit-changes] [WebKit/WebKit] 7ca99f: REGRESSION (251025 at main): Language setting dropdow...

Alan Baradlay noreply at github.com
Fri Dec 9 07:50:12 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7ca99fc4ae5fbb20a005c45c4bb8bdc577b53dc7
      https://github.com/WebKit/WebKit/commit/7ca99fc4ae5fbb20a005c45c4bb8bdc577b53dc7
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2022-12-09 (Fri, 09 Dec 2022)

  Changed paths:
    A LayoutTests/fast/repaint/incorrect-repaint-when-child-layer-overflows-expected.txt
    A LayoutTests/fast/repaint/incorrect-repaint-when-child-layer-overflows.html
    M Source/WebCore/rendering/RenderObject.cpp

  Log Message:
  -----------
  REGRESSION (251025 at main): Language setting dropdown menu is empty in Rise of the Tomb Raider
https://bugs.webkit.org/show_bug.cgi?id=249006
<rdar://102032344>

Reviewed by Simon Fraser.

251025 at main introduced a repaint optimization where we try to avoid to issue redundant repaints by
checking if an ancestor layer is already tagged with "full repaint".
The idea here is that if an ancestor layer issues a full repaint, it's guaranteed that descendent
renderers will be painted as well (i.e. descendent renderer is assumed to be "enclosed").

This is mostly true and works through the concept of visual overflow.
Visual overflow (not to be confused with ink overflow) provides enclosing geometry for (some of) the descendant content and used as the base for issuing full repaints.
e.g
<div id=has_layer style="width: 10px; height: 10px;">
  <div style="width: 100px; height: 100px;></div>
</div>
"has_layer"'s full repaint covers the 100x100 child content (even though the layer itself is only 10x10).

-and this is where 251025 at main regressed. The repaint logic incorrectly assumed that _all_ descendant content is covered by this visual overflow.
However in case of self-repaint layers
e.g
<div id=has_layer style="width: 10px; height: 10px;">
  <div id=has_self_repaint_layer style="width: 100px; height: 100px;></div>
</div>
a full repaint on _has_layer only includes the 10x10 area (and it leaves most of the child content "unpainted").

This patch ensures that we only use this optimization when the descendant content is guaranteed to be painted through the ancestor layer's full repaint.

* LayoutTests/fast/repaint/incorrect-repaint-when-child-layer-overflows-expected.txt: Added.
* LayoutTests/fast/repaint/incorrect-repaint-when-child-layer-overflows.html: Added.
* Source/WebCore/rendering/RenderObject.cpp:
(WebCore::canRelyOnAncestorLayerFullRepaint):
(WebCore::RenderObject::containerForRepaint const):
(WebCore::fullRepaintIsScheduled):

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




More information about the webkit-changes mailing list