Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2a5bd0ff38736fcfe4df01b8098012b8d0a1fbff
      
https://github.com/WebKit/WebKit/commit/2a5bd0ff38736fcfe4df01b8098012b8d0a1fbff
  Author: Tim Nguyen <[email protected]>
  Date:   2022-12-07 (Wed, 07 Dec 2022)

  Changed paths:
    M LayoutTests/TestExpectations
    M 
LayoutTests/compositing/no-compositing-when-full-screen-is-present-expected.txt
    M LayoutTests/compositing/no-compositing-when-full-screen-is-present.html
    M LayoutTests/fullscreen/full-screen-layer-dump-expected.txt
    M LayoutTests/fullscreen/full-screen-layer-dump.html
    M 
LayoutTests/platform/gtk/compositing/no-compositing-when-full-screen-is-present-expected.txt
    M Source/WebCore/rendering/RenderElement.cpp
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.cpp
    M Source/WebCore/rendering/RenderObject.h

  Log Message:
  -----------
  Make ::backdrop renderers use background layers when possible
https://bugs.webkit.org/show_bug.cgi?id=248148
rdar://102566049

Reviewed by Simon Fraser.

Right now, when rotating in fullscreen on iPad, there are white gaps around the 
edges. This was avoided by RenderFullscreen using
"background layers" that are 3x the size with a negative offset. Now that 
RenderFullscreen is gone, we need to target ::backdrop
pseudo elements that have:

- The same rect as the RenderView
- position: fixed, since position: absolute can allow scrolling away from the 
::backdrop, since the containing block is the ICB
- No transforms/clips/masks (since they intentionally do not cover the whole 
screen)

Also clean up remainders of RenderFullscreen which has been removed in 
255641@main.

* 
LayoutTests/compositing/no-compositing-when-full-screen-is-present-expected.txt:
* LayoutTests/compositing/no-compositing-when-full-screen-is-present.html:
* 
LayoutTests/platform/gtk/compositing/no-compositing-when-full-screen-is-present-expected.txt:
Update test expectations to reflect that ::backdrop is now layer backed in 
fullscreen.

* LayoutTests/TestExpectations:
* LayoutTests/fullscreen/full-screen-layer-dump-expected.txt:
* LayoutTests/fullscreen/full-screen-layer-dump.html:
Make test expectation more clear in the description to avoid regressing this 
test again, and update test expectation to reflect that "background layers" now 
work again.

* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::propagateStyleToAnonymousChildren):
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::isDescendantOfFullScreenLayer):
Consider the fullscreen element's associated ::backdrop as fullscreen layer, 
otherwise the renderer is never layer-backed meaning we can't use "background 
layers".
We avoid backing non-fullscreen layers to optimize for power usage.

* Source/WebCore/rendering/RenderObject.h:
(WebCore::RenderObject::isAttachment const):
(WebCore::RenderObject::isAnonymousBlock const):
(WebCore::RenderObject::isRenderFullScreen const): Deleted.
(WebCore::RenderObject::isRenderFullScreenPlaceholder const): Deleted.

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to