Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d7bab9d6f7c45b99da17d78a464eac1fedff0ead
      
https://github.com/WebKit/WebKit/commit/d7bab9d6f7c45b99da17d78a464eac1fedff0ead
  Author: Tim Nguyen <n...@apple.com>
  Date:   2022-11-02 (Wed, 02 Nov 2022)

  Changed paths:
    M Source/WebCore/css/CSSSelector.cpp
    M Source/WebCore/css/CSSSelector.h
    M Source/WebCore/css/SelectorChecker.cpp
    M Source/WebCore/css/SelectorCheckerTestFunctions.h
    M Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in
    M Source/WebCore/css/fullscreen.css
    M Source/WebCore/cssjit/SelectorCompiler.cpp
    M Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp

  Log Message:
  -----------
  Add temporary backdrop workaround for fullscreen elements
https://bugs.webkit.org/show_bug.cgi?id=247349
rdar://101600873

Reviewed by Tim Horton.

Removing RenderFullScreen introduced a regression, where content appears behind 
the fullscreen element.
RenderFullScreen used to solve that by wrapping the fullscreen element renderer 
with a renderer that has a black background.

The standard way of solving this issue is to add a ::backdrop that has such a 
background. This will be done once fullscreen
switches to use the top layer.

For now, add a pseudo-class that targets the parent of the fullscreen element, 
and use ::before to emulate the ::backdrop.
We specifically pick the parent, because it is guaranteed to be able to contain 
children (and ::before), and to avoid conflict
with any potential ::before on the fullscreen element itself.

* Source/WebCore/css/CSSSelector.cpp:
(WebCore::CSSSelector::selectorText const):
* Source/WebCore/css/CSSSelector.h:
* Source/WebCore/css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne const):
* Source/WebCore/css/SelectorCheckerTestFunctions.h:
(WebCore::matchesFullScreenParentPseudoClass):
* Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in:
* Source/WebCore/css/fullscreen.css:
(:-webkit-full-screen-parent::before):
* Source/WebCore/cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::JSC_DEFINE_JIT_OPERATION):
(WebCore::SelectorCompiler::addPseudoClassType):
* Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to