Title: [294641] trunk
Revision
294641
Author
[email protected]
Date
2022-05-23 08:02:52 -0700 (Mon, 23 May 2022)

Log Message

[css-ui] Remove support for appearance: media-controls-{dark/light}-bar-background
https://bugs.webkit.org/show_bug.cgi?id=240756

Reviewed by Antoine Quint.

Reverts r180965 (adapted with new code), this was originally added for old media controls, but was never used.

Marked relevant WPT as passing.

* LayoutTests/compositing/media-controls-bar-appearance-big-expected.txt: Removed.
* LayoutTests/compositing/media-controls-bar-appearance-big.html: Removed.
* LayoutTests/compositing/media-controls-bar-appearance-expected.txt: Removed.
* LayoutTests/compositing/media-controls-bar-appearance.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
* LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt:
* LayoutTests/platform/ios/compositing/media-controls-bar-appearance-expected.txt: Removed.
* Source/WebCore/css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/CSSValueKeywords.in:
* Source/WebCore/platform/ThemeTypes.cpp:
(WebCore::operator<<):
* Source/WebCore/platform/ThemeTypes.h:
* Source/WebCore/platform/graphics/GraphicsLayer.cpp:
(WebCore::operator<<):
* Source/WebCore/platform/graphics/GraphicsLayer.h:
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::changeLayerTypeTo):
(WebCore::layerTypeForCustomBackdropAppearance): Deleted.
(WebCore::isCustomBackdropLayerType): Deleted.
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h:
* Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::operator<<):
* Source/WebCore/platform/graphics/ca/PlatformCALayer.h:
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):
(WebCore::PlatformCALayerCocoa::updateCustomAppearance):
* Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp:
(printLayer):
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateConfigurationAfterStyleChange):
(WebCore::RenderLayerBacking::updateCustomAppearance): Deleted.
* Source/WebCore/rendering/RenderLayerBacking.h:
* Source/WebKit/Platform/spi/ios/UIKitSPI.h:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm:
(WebKit::updateCustomAppearance):
(WebKit::RemoteLayerTreePropertyApplier::applyHierarchyUpdates):
(WebKit::RemoteLayerTreePropertyApplier::updateMask):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::makeNode):
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::makeNode):
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h:
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm:
(-[WKBackdropView hitTest:withEvent:]): Deleted.
(-[WKBackdropView description]): Deleted.

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

Modified Paths

Removed Paths

Diff

Deleted: trunk/LayoutTests/compositing/media-controls-bar-appearance-big-expected.txt (294640 => 294641)


--- trunk/LayoutTests/compositing/media-controls-bar-appearance-big-expected.txt	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/LayoutTests/compositing/media-controls-bar-appearance-big-expected.txt	2022-05-23 15:02:52 UTC (rev 294641)
@@ -1,23 +0,0 @@
-(GraphicsLayer
-  (anchor 0.00 0.00)
-  (bounds 2056.00 4117.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 2056.00 4117.00)
-      (contentsOpaque 1)
-      (children 2
-        (GraphicsLayer
-          (position 8.00 8.00)
-          (bounds 2048.00 2048.00)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (position 8.00 2056.00)
-          (bounds 2048.00 2048.00)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-

Deleted: trunk/LayoutTests/compositing/media-controls-bar-appearance-big.html (294640 => 294641)


--- trunk/LayoutTests/compositing/media-controls-bar-appearance-big.html	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/LayoutTests/compositing/media-controls-bar-appearance-big.html	2022-05-23 15:02:52 UTC (rev 294641)
@@ -1,56 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <style>
-        div {
-            position: relative;
-            height: 100px;
-            width: 100px;
-        }
-        .big {
-            width: 2048px;
-            height: 2048px;
-        }
-        .media-controls {
-            -webkit-transform: translate3d(0, 0, 0); /* The element has to request a layer for the appearance to work */
-        }
-        .dark {
-            -webkit-appearance: media-controls-dark-bar-background;
-        }
-        .light {
-            -webkit-appearance: media-controls-light-bar-background;
-        }
-    </style>
-    <script>
-        if (window.testRunner) {
-            testRunner.dumpAsText();
-            testRunner.waitUntilDone();
-        }
-
-        function change()
-        {
-            var elements = document.querySelectorAll(".media-controls");
-            for (var i = 0; i < elements.length; ++i)
-                elements[i].classList.add("big");
-            setTimeout(dumpLayers, 0);
-        }
-
-        function dumpLayers()
-        {
-            var layersResult = document.getElementById('layers');
-            if (window.testRunner) {
-                layersResult.innerText = window.internals.layerTreeAsText(document);
-                testRunner.notifyDone();
-            }
-        }
-        window.addEventListener('load', change, false)
-    </script>
-</head>
-<body>
-    <div class="media-controls dark">
-    </div>
-    <div class="media-controls light">
-    </div>
-<pre id="layers"></pre>
-</body>
-</html>

Deleted: trunk/LayoutTests/compositing/media-controls-bar-appearance-expected.txt (294640 => 294641)


--- trunk/LayoutTests/compositing/media-controls-bar-appearance-expected.txt	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/LayoutTests/compositing/media-controls-bar-appearance-expected.txt	2022-05-23 15:02:52 UTC (rev 294641)
@@ -1,27 +0,0 @@
-These elements should not get their own layers.
-
-These elements explicitly request layers.
-
-(GraphicsLayer
-  (anchor 0.00 0.00)
-  (bounds 800.00 600.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 800.00 600.00)
-      (contentsOpaque 1)
-      (children 2
-        (GraphicsLayer
-          (position 8.00 300.00)
-          (bounds 100.00 100.00)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (position 8.00 400.00)
-          (bounds 100.00 100.00)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-

Deleted: trunk/LayoutTests/compositing/media-controls-bar-appearance.html (294640 => 294641)


--- trunk/LayoutTests/compositing/media-controls-bar-appearance.html	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/LayoutTests/compositing/media-controls-bar-appearance.html	2022-05-23 15:02:52 UTC (rev 294641)
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <style>
-        div {
-            position: relative;
-            height: 100px;
-            width: 100px;
-        }
-        .media-controls-dark {
-            -webkit-appearance: media-controls-dark-bar-background;
-        }
-        .media-controls-light {
-            -webkit-appearance: media-controls-light-bar-background;
-        }
-        .with-layer {
-            -webkit-transform: translate3d(0, 0, 0);
-        }
-    </style>
-    <script>
-        if (window.testRunner)
-            testRunner.dumpAsText();
-
-        function dumpLayers()
-        {
-            var layersResult = document.getElementById('layers');
-            if (window.testRunner)
-                layersResult.innerText = window.internals.layerTreeAsText(document);
-
-        }
-        window.addEventListener('load', dumpLayers, false)
-    </script>
-</head>
-<body>
-    <p>These elements should not get their own layers.</p>
-    <div class="media-controls-dark">
-    </div>
-    <div class="media-controls-light">
-    </div>
-    <p>These elements explicitly request layers.</p>
-    <div class="media-controls-dark with-layer">
-    </div>
-    <div class="media-controls-light with-layer">
-    </div>
-<pre id="layers"></pre>
-</body>
-</html>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt (294640 => 294641)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt	2022-05-23 15:02:52 UTC (rev 294641)
@@ -41,9 +41,9 @@
 PASS -webkit-appearance: list-button (invalid)
 PASS -webkit-appearance: listitem (invalid)
 PASS -webkit-appearance: media-controls-background (invalid)
-FAIL -webkit-appearance: media-controls-dark-bar-background (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-controls-dark-bar-background"
+PASS -webkit-appearance: media-controls-dark-bar-background (invalid)
 PASS -webkit-appearance: media-controls-fullscreen-background (invalid)
-FAIL -webkit-appearance: media-controls-light-bar-background (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-controls-light-bar-background"
+PASS -webkit-appearance: media-controls-light-bar-background (invalid)
 PASS -webkit-appearance: media-current-time-display (invalid)
 PASS -webkit-appearance: media-enter-fullscreen-button (invalid)
 PASS -webkit-appearance: media-exit-fullscreen-button (invalid)
@@ -204,9 +204,9 @@
 PASS appearance: list-button (invalid)
 PASS appearance: listitem (invalid)
 PASS appearance: media-controls-background (invalid)
-FAIL appearance: media-controls-dark-bar-background (invalid) assert_equals: style.appearance expected "" but got "media-controls-dark-bar-background"
+PASS appearance: media-controls-dark-bar-background (invalid)
 PASS appearance: media-controls-fullscreen-background (invalid)
-FAIL appearance: media-controls-light-bar-background (invalid) assert_equals: style.appearance expected "" but got "media-controls-light-bar-background"
+PASS appearance: media-controls-light-bar-background (invalid)
 PASS appearance: media-current-time-display (invalid)
 PASS appearance: media-enter-fullscreen-button (invalid)
 PASS appearance: media-exit-fullscreen-button (invalid)

Modified: trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt (294640 => 294641)


--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt	2022-05-23 15:02:52 UTC (rev 294641)
@@ -41,9 +41,9 @@
 PASS -webkit-appearance: list-button (invalid)
 PASS -webkit-appearance: listitem (invalid)
 PASS -webkit-appearance: media-controls-background (invalid)
-FAIL -webkit-appearance: media-controls-dark-bar-background (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-controls-dark-bar-background"
+PASS -webkit-appearance: media-controls-dark-bar-background (invalid)
 PASS -webkit-appearance: media-controls-fullscreen-background (invalid)
-FAIL -webkit-appearance: media-controls-light-bar-background (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-controls-light-bar-background"
+PASS -webkit-appearance: media-controls-light-bar-background (invalid)
 PASS -webkit-appearance: media-current-time-display (invalid)
 PASS -webkit-appearance: media-enter-fullscreen-button (invalid)
 PASS -webkit-appearance: media-exit-fullscreen-button (invalid)
@@ -204,9 +204,9 @@
 PASS appearance: list-button (invalid)
 PASS appearance: listitem (invalid)
 PASS appearance: media-controls-background (invalid)
-FAIL appearance: media-controls-dark-bar-background (invalid) assert_equals: style.appearance expected "" but got "media-controls-dark-bar-background"
+PASS appearance: media-controls-dark-bar-background (invalid)
 PASS appearance: media-controls-fullscreen-background (invalid)
-FAIL appearance: media-controls-light-bar-background (invalid) assert_equals: style.appearance expected "" but got "media-controls-light-bar-background"
+PASS appearance: media-controls-light-bar-background (invalid)
 PASS appearance: media-current-time-display (invalid)
 PASS appearance: media-enter-fullscreen-button (invalid)
 PASS appearance: media-exit-fullscreen-button (invalid)

Deleted: trunk/LayoutTests/platform/ios/compositing/media-controls-bar-appearance-expected.txt (294640 => 294641)


--- trunk/LayoutTests/platform/ios/compositing/media-controls-bar-appearance-expected.txt	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/LayoutTests/platform/ios/compositing/media-controls-bar-appearance-expected.txt	2022-05-23 15:02:52 UTC (rev 294641)
@@ -1,27 +0,0 @@
-These elements should not get their own layers.
-
-These elements explicitly request layers.
-
-(GraphicsLayer
-  (anchor 0.00 0.00)
-  (bounds 800.00 600.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 800.00 600.00)
-      (contentsOpaque 1)
-      (children 2
-        (GraphicsLayer
-          (position 8.00 304.00)
-          (bounds 100.00 100.00)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (position 8.00 404.00)
-          (bounds 100.00 100.00)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-

Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (294640 => 294641)


--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h	2022-05-23 15:02:52 UTC (rev 294641)
@@ -490,12 +490,6 @@
     case MediaFullScreenVolumeSliderThumbPart:
         m_value.valueID = CSSValueMediaFullscreenVolumeSliderThumb;
         break;
-    case MediaControlsLightBarBackgroundPart:
-        m_value.valueID = CSSValueMediaControlsLightBarBackground;
-        break;
-    case MediaControlsDarkBarBackgroundPart:
-        m_value.valueID = CSSValueMediaControlsDarkBarBackground;
-        break;
     case MenulistPart:
         m_value.valueID = CSSValueMenulist;
         break;

Modified: trunk/Source/WebCore/css/CSSProperties.json (294640 => 294641)


--- trunk/Source/WebCore/css/CSSProperties.json	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/css/CSSProperties.json	2022-05-23 15:02:52 UTC (rev 294641)
@@ -5166,8 +5166,6 @@
                 "button",
                 "default-button",
                 "listbox",
-                "media-controls-dark-bar-background",
-                "media-controls-light-bar-background",
                 "media-fullscreen-volume-slider",
                 "media-fullscreen-volume-slider-thumb",
                 "media-slider",

Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (294640 => 294641)


--- trunk/Source/WebCore/css/CSSValueKeywords.in	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in	2022-05-23 15:02:52 UTC (rev 294641)
@@ -841,8 +841,6 @@
 button
 default-button
 listbox
-media-controls-dark-bar-background
-media-controls-light-bar-background
 media-fullscreen-volume-slider
 media-fullscreen-volume-slider-thumb
 media-slider

Modified: trunk/Source/WebCore/platform/ThemeTypes.cpp (294640 => 294641)


--- trunk/Source/WebCore/platform/ThemeTypes.cpp	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/platform/ThemeTypes.cpp	2022-05-23 15:02:52 UTC (rev 294641)
@@ -43,8 +43,6 @@
     case DefaultButtonPart: ts << "default-button-part"; break;
     case InnerSpinButtonPart: ts << "inner-spin-button-part"; break;
     case ListboxPart: ts << "listbox-part"; break;
-    case MediaControlsDarkBarBackgroundPart: ts << "media-controls-dark-bar-background-part"; break;
-    case MediaControlsLightBarBackgroundPart: ts << "media-controls-light-bar-background-part"; break;
     case MediaFullScreenVolumeSliderPart: ts << "media-full-screen-volume-slider-part"; break;
     case MediaFullScreenVolumeSliderThumbPart: ts << "media-full-screen-volume-slider-thumb-part"; break;
     case MediaSliderPart: ts << "media-slider-part"; break;

Modified: trunk/Source/WebCore/platform/ThemeTypes.h (294640 => 294641)


--- trunk/Source/WebCore/platform/ThemeTypes.h	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/platform/ThemeTypes.h	2022-05-23 15:02:52 UTC (rev 294641)
@@ -42,8 +42,6 @@
     ButtonPart,
     DefaultButtonPart,
     ListboxPart,
-    MediaControlsDarkBarBackgroundPart,
-    MediaControlsLightBarBackgroundPart,
     MediaFullScreenVolumeSliderPart,
     MediaFullScreenVolumeSliderThumbPart,
     MediaSliderPart,

Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (294640 => 294641)


--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp	2022-05-23 15:02:52 UTC (rev 294641)
@@ -983,8 +983,6 @@
     case GraphicsLayer::CustomAppearance::None: ts << "none"; break;
     case GraphicsLayer::CustomAppearance::ScrollingOverhang: ts << "scrolling-overhang"; break;
     case GraphicsLayer::CustomAppearance::ScrollingShadow: ts << "scrolling-shadow"; break;
-    case GraphicsLayer::CustomAppearance::LightBackdrop: ts << "light-backdrop"; break;
-    case GraphicsLayer::CustomAppearance::DarkBackdrop: ts << "dark-backdrop"; break;
     }
     return ts;
 }

Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (294640 => 294641)


--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h	2022-05-23 15:02:52 UTC (rev 294641)
@@ -567,9 +567,7 @@
     enum class CustomAppearance : uint8_t {
         None,
         ScrollingOverhang,
-        ScrollingShadow,
-        LightBackdrop,
-        DarkBackdrop
+        ScrollingShadow
     };
     virtual void setCustomAppearance(CustomAppearance customAppearance) { m_customAppearance = customAppearance; }
     CustomAppearance customAppearance() const { return m_customAppearance; }
@@ -810,9 +808,7 @@
         WebCore::GraphicsLayer::CustomAppearance,
         WebCore::GraphicsLayer::CustomAppearance::None,
         WebCore::GraphicsLayer::CustomAppearance::ScrollingOverhang,
-        WebCore::GraphicsLayer::CustomAppearance::ScrollingShadow,
-        WebCore::GraphicsLayer::CustomAppearance::LightBackdrop,
-        WebCore::GraphicsLayer::CustomAppearance::DarkBackdrop
+        WebCore::GraphicsLayer::CustomAppearance::ScrollingShadow
     >;
 };
 

Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (294640 => 294641)


--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2022-05-23 15:02:52 UTC (rev 294641)
@@ -429,7 +429,6 @@
 GraphicsLayerCA::GraphicsLayerCA(Type layerType, GraphicsLayerClient& client)
     : GraphicsLayer(layerType, client)
     , m_needsFullRepaint(false)
-    , m_usingBackdropLayerType(false)
     , m_allowsBackingStoreDetaching(true)
     , m_intersectsCoverageRect(false)
     , m_hasEverPainted(false)
@@ -1920,16 +1919,6 @@
     m_contentsDisplayDelegate->display(*layer);
 }
 
-static PlatformCALayer::LayerType layerTypeForCustomBackdropAppearance(GraphicsLayer::CustomAppearance appearance)
-{
-    return appearance == GraphicsLayer::CustomAppearance::LightBackdrop ? PlatformCALayer::LayerTypeLightSystemBackdropLayer : PlatformCALayer::LayerTypeDarkSystemBackdropLayer;
-}
-
-static bool isCustomBackdropLayerType(PlatformCALayer::LayerType layerType)
-{
-    return layerType == PlatformCALayer::LayerTypeLightSystemBackdropLayer || layerType == PlatformCALayer::LayerTypeDarkSystemBackdropLayer;
-}
-
 void GraphicsLayerCA::commitLayerChangesBeforeSublayers(CommitState& commitState, float pageScaleFactor, const FloatPoint& positionRelativeToBase, bool& layerChanged)
 {
     SetForScope committingChangesChange(m_isCommittingChanges, true);
@@ -1941,16 +1930,13 @@
     }
 
     bool needTiledLayer = requiresTiledLayer(pageScaleFactor);
-    bool needBackdropLayerType = (customAppearance() == CustomAppearance::LightBackdrop || customAppearance() == CustomAppearance::DarkBackdrop);
 
     PlatformCALayer::LayerType currentLayerType = m_layer->layerType();
     PlatformCALayer::LayerType neededLayerType = currentLayerType;
 
-    if (needBackdropLayerType)
-        neededLayerType = layerTypeForCustomBackdropAppearance(customAppearance());
-    else if (needTiledLayer)
+    if (needTiledLayer)
         neededLayerType = PlatformCALayer::LayerTypeTiledBackingLayer;
-    else if (currentLayerType == PlatformCALayer::LayerTypeTiledBackingLayer || isCustomBackdropLayerType(m_layer->layerType()))
+    else if (currentLayerType == PlatformCALayer::LayerTypeTiledBackingLayer)
         neededLayerType = PlatformCALayer::LayerTypeWebLayer;
 
     if (neededLayerType != m_layer->layerType()) {
@@ -4403,8 +4389,6 @@
     RefPtr<PlatformCALayer> oldLayer = m_layer;
     m_layer = createPlatformCALayer(newLayerType, this);
 
-    m_usingBackdropLayerType = isCustomBackdropLayerType(newLayerType);
-
     m_layer->adoptSublayers(*oldLayer);
 
 #ifdef VISIBLE_TILE_WASH

Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (294640 => 294641)


--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h	2022-05-23 15:02:52 UTC (rev 294641)
@@ -661,7 +661,6 @@
     bool m_isCommittingChanges { false };
 
     bool m_needsFullRepaint : 1;
-    bool m_usingBackdropLayerType : 1;
     bool m_allowsBackingStoreDetaching : 1;
     bool m_intersectsCoverageRect : 1;
     bool m_hasEverPainted : 1;

Modified: trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp (294640 => 294641)


--- trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp	2022-05-23 15:02:52 UTC (rev 294641)
@@ -249,12 +249,6 @@
     case PlatformCALayer::LayerTypeCustom:
         ts << "custom-layer";
         break;
-    case PlatformCALayer::LayerTypeLightSystemBackdropLayer:
-        ts << "light-system-backdrop-layer";
-        break;
-    case PlatformCALayer::LayerTypeDarkSystemBackdropLayer:
-        ts << "dark-system-backdrop-layer";
-        break;
 #if ENABLE(MODEL_ELEMENT)
     case PlatformCALayer::LayerTypeModelLayer:
         ts << "model-layer";

Modified: trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h (294640 => 294641)


--- trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h	2022-05-23 15:02:52 UTC (rev 294641)
@@ -83,8 +83,6 @@
         LayerTypeContentsProvidedLayer,
         LayerTypeBackdropLayer,
         LayerTypeShapeLayer,
-        LayerTypeLightSystemBackdropLayer,
-        LayerTypeDarkSystemBackdropLayer,
         LayerTypeScrollContainerLayer,
 #if ENABLE(MODEL_ELEMENT)
         LayerTypeModelLayer,
@@ -374,8 +372,6 @@
         WebCore::PlatformCALayer::LayerType::LayerTypeContentsProvidedLayer,
         WebCore::PlatformCALayer::LayerType::LayerTypeBackdropLayer,
         WebCore::PlatformCALayer::LayerType::LayerTypeShapeLayer,
-        WebCore::PlatformCALayer::LayerType::LayerTypeLightSystemBackdropLayer,
-        WebCore::PlatformCALayer::LayerType::LayerTypeDarkSystemBackdropLayer,
         WebCore::PlatformCALayer::LayerType::LayerTypeScrollContainerLayer,
 #if ENABLE(MODEL_ELEMENT)
         WebCore::PlatformCALayer::LayerType::LayerTypeModelLayer,

Modified: trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm (294640 => 294641)


--- trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm	2022-05-23 15:02:52 UTC (rev 294641)
@@ -242,16 +242,8 @@
     case LayerTypeBackdropLayer:
         layerClass = [CABackdropLayer class];
         break;
-    case LayerTypeLightSystemBackdropLayer:
-        layerClass = [WebLightSystemBackdropLayer class];
-        break;
-    case LayerTypeDarkSystemBackdropLayer:
-        layerClass = [WebDarkSystemBackdropLayer class];
-        break;
 #else
     case LayerTypeBackdropLayer:
-    case LayerTypeLightSystemBackdropLayer:
-    case LayerTypeDarkSystemBackdropLayer:
         ASSERT_NOT_REACHED();
         layerClass = [CALayer class];
         break;
@@ -1054,8 +1046,6 @@
 #if HAVE(RUBBER_BANDING)
     switch (appearance) {
     case GraphicsLayer::CustomAppearance::None:
-    case GraphicsLayer::CustomAppearance::LightBackdrop:
-    case GraphicsLayer::CustomAppearance::DarkBackdrop:
         ScrollbarThemeMac::removeOverhangAreaBackground(platformLayer());
         ScrollbarThemeMac::removeOverhangAreaShadow(platformLayer());
         break;

Modified: trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp (294640 => 294641)


--- trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp	2022-05-23 15:02:52 UTC (rev 294641)
@@ -734,8 +734,6 @@
     case PlatformCALayer::LayerTypeContentsProvidedLayer: layerTypeName = "contents-provided-layer"; break;
     case PlatformCALayer::LayerTypeBackdropLayer: layerTypeName = "backdrop-layer"; break;
     case PlatformCALayer::LayerTypeShapeLayer: layerTypeName = "shape-layer"; break;
-    case PlatformCALayer::LayerTypeLightSystemBackdropLayer: layerTypeName = "light-system-backdrop-layer"; break;
-    case PlatformCALayer::LayerTypeDarkSystemBackdropLayer: layerTypeName = "dark-system-backdrop-layer"; break;
     case PlatformCALayer::LayerTypeScrollContainerLayer: layerTypeName = "scroll-container-layer"; break;
     case PlatformCALayer::LayerTypeCustom: layerTypeName = "custom-layer"; break;
     }

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (294640 => 294641)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2022-05-23 15:02:52 UTC (rev 294641)
@@ -549,7 +549,6 @@
 #if ENABLE(CSS_COMPOSITING)
     updateBlendMode(style);
 #endif
-    updateCustomAppearance(style);
     updateContentsScalingFilters(style);
 }
 
@@ -784,17 +783,6 @@
 }
 #endif
 
-void RenderLayerBacking::updateCustomAppearance(const RenderStyle& style)
-{
-    ControlPart appearance = style.effectiveAppearance();
-    if (appearance == MediaControlsLightBarBackgroundPart)
-        m_graphicsLayer->setCustomAppearance(GraphicsLayer::CustomAppearance::LightBackdrop);
-    else if (appearance == MediaControlsDarkBarBackgroundPart)
-        m_graphicsLayer->setCustomAppearance(GraphicsLayer::CustomAppearance::DarkBackdrop);
-    else
-        m_graphicsLayer->setCustomAppearance(GraphicsLayer::CustomAppearance::None);
-}
-
 void RenderLayerBacking::updateContentsScalingFilters(const RenderStyle& style)
 {
     if (!renderer().isCanvas() || canvasCompositingStrategy(renderer()) != CanvasAsLayerContents)
@@ -994,7 +982,6 @@
 #if ENABLE(CSS_COMPOSITING)
     updateBlendMode(style);
 #endif
-    updateCustomAppearance(style);
     updateContentsScalingFilters(style);
 }
 

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.h (294640 => 294641)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.h	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.h	2022-05-23 15:02:52 UTC (rev 294641)
@@ -351,7 +351,6 @@
 #if ENABLE(CSS_COMPOSITING)
     void updateBlendMode(const RenderStyle&);
 #endif
-    void updateCustomAppearance(const RenderStyle&);
     void updateContentsScalingFilters(const RenderStyle&);
 
     // Return the opacity value that this layer should use for compositing.

Modified: trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h (294640 => 294641)


--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2022-05-23 15:02:52 UTC (rev 294641)
@@ -979,7 +979,6 @@
 
 typedef NS_ENUM(NSInteger, _UIBackdropViewStylePrivate) {
     _UIBackdropViewStyle_Light = 2020,
-    _UIBackdropViewStyle_Dark = 2030
 };
 
 @interface _UIBackdropViewSettings : NSObject
@@ -996,7 +995,6 @@
 @interface _UIBackdropView ()
 - (instancetype)initWithPrivateStyle:(_UIBackdropViewStylePrivate)style;
 - (instancetype)initWithSettings:(_UIBackdropViewSettings *)settings;
-- (instancetype)initWithFrame:(CGRect)frame privateStyle:(_UIBackdropViewStylePrivate)style;
 @property (nonatomic, strong, readonly) UIView *contentView;
 @end
 

Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm (294640 => 294641)


--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm	2022-05-23 15:02:52 UTC (rev 294641)
@@ -522,12 +522,6 @@
     case PlatformCALayer::LayerTypeBackdropLayer:
         PlatformCALayer::drawLayerContents(context, m_layer, m_paintingRects, flags);
         break;
-    case PlatformCALayer::LayerTypeDarkSystemBackdropLayer:
-    case PlatformCALayer::LayerTypeLightSystemBackdropLayer:
-        // FIXME: These have a more complicated layer hierarchy. We need to paint into
-        // a child layer in order to see the rendered results.
-        PlatformCALayer::drawLayerContents(context, m_layer, m_paintingRects, flags);
-        break;
     case PlatformCALayer::LayerTypeLayer:
     case PlatformCALayer::LayerTypeTransformLayer:
     case PlatformCALayer::LayerTypeTiledBackingLayer:

Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm (294640 => 294641)


--- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm	2022-05-23 15:02:52 UTC (rev 294641)
@@ -121,7 +121,7 @@
     case PlatformCALayer::Trilinear:
         return kCAFilterTrilinear;
     };
-    
+
     ASSERT_NOT_REACHED();
     return 0;
 }
@@ -131,8 +131,6 @@
 #if HAVE(RUBBER_BANDING)
     switch (customAppearance) {
     case GraphicsLayer::CustomAppearance::None:
-    case GraphicsLayer::CustomAppearance::DarkBackdrop:
-    case GraphicsLayer::CustomAppearance::LightBackdrop:
         ScrollbarThemeMac::removeOverhangAreaBackground(layer);
         ScrollbarThemeMac::removeOverhangAreaShadow(layer);
         break;
@@ -334,18 +332,9 @@
         return childNode && childNode->uiView();
     };
 
-    auto contentView = [&] {
-        if (properties.customAppearance == GraphicsLayer::CustomAppearance::LightBackdrop || properties.customAppearance == GraphicsLayer::CustomAppearance::DarkBackdrop) {
-            // This is a UIBackdropView, which should have children attached to
-            // its content view, not directly on its layers.
-            return [(_UIBackdropView *)node.uiView() contentView];
-        }
-        return node.uiView();
-    };
-
     if (hasViewChildren()) {
         ASSERT(node.uiView());
-        [contentView() _web_setSubviews:createNSArray(properties.children, [&] (auto& child) -> UIView * {
+        [node.uiView() _web_setSubviews:createNSArray(properties.children, [&] (auto& child) -> UIView * {
             auto* childNode = relatedLayers.get(child);
             ASSERT(childNode);
             if (!childNode)
@@ -382,21 +371,10 @@
     if (!properties.changedProperties.contains(RemoteLayerTreeTransaction::MaskLayerChanged))
         return;
 
-    auto maskOwnerLayer = [&] {
-        CALayer *layer = node.layer();
-#if PLATFORM(IOS_FAMILY)
-        if (properties.customAppearance == GraphicsLayer::CustomAppearance::LightBackdrop || properties.customAppearance == GraphicsLayer::CustomAppearance::DarkBackdrop) {
-            // This is a UIBackdropView, which means any mask must be applied to the CABackdropLayer rather
-            // that the view's layer. The backdrop is the first layer child.
-            if (layer.sublayers.count && [layer.sublayers[0] isKindOfClass:[CABackdropLayer class]])
-                layer = layer.sublayers[0];
-        }
-#endif
-        return layer;
-    };
+    auto maskOwnerLayer = node.layer();
 
     if (!properties.maskLayerID) {
-        maskOwnerLayer().mask = nullptr;
+        maskOwnerLayer.mask = nullptr;
         return;
     }
 
@@ -408,7 +386,7 @@
     ASSERT(!maskLayer.superlayer);
     if (maskLayer.superlayer)
         return;
-    maskOwnerLayer().mask = maskLayer;
+    maskOwnerLayer.mask = maskLayer;
 }
 
 #if PLATFORM(IOS_FAMILY)

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm (294640 => 294641)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm	2022-05-23 15:02:52 UTC (rev 294641)
@@ -303,8 +303,6 @@
         return makeWithLayer(adoptNS([[CATransformLayer alloc] init]));
 
     case PlatformCALayer::LayerTypeBackdropLayer:
-    case PlatformCALayer::LayerTypeLightSystemBackdropLayer:
-    case PlatformCALayer::LayerTypeDarkSystemBackdropLayer:
 #if ENABLE(FILTERS_LEVEL_2)
         return makeWithLayer(adoptNS([[CABackdropLayer alloc] init]));
 #else

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm (294640 => 294641)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm	2022-05-23 15:02:52 UTC (rev 294641)
@@ -62,14 +62,8 @@
         return RemoteLayerTreeNode::createWithPlainLayer(properties.layerID);
 
     case PlatformCALayer::LayerTypeBackdropLayer:
-        return makeWithView(adoptNS([[WKSimpleBackdropView alloc] init]));
+        return makeWithView(adoptNS([[WKBackdropView alloc] init]));
 
-    case PlatformCALayer::LayerTypeLightSystemBackdropLayer:
-        return makeWithView(adoptNS([[WKBackdropView alloc] initWithFrame:CGRectZero privateStyle:_UIBackdropViewStyle_Light]));
-
-    case PlatformCALayer::LayerTypeDarkSystemBackdropLayer:
-        return makeWithView(adoptNS([[WKBackdropView alloc] initWithFrame:CGRectZero privateStyle:_UIBackdropViewStyle_Dark]));
-
     case PlatformCALayer::LayerTypeTransformLayer:
         return makeWithView(adoptNS([[WKTransformView alloc] init]));
 

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h (294640 => 294641)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h	2022-05-23 15:02:52 UTC (rev 294641)
@@ -45,7 +45,7 @@
 @interface WKTransformView : WKCompositingView
 @end
 
-@interface WKSimpleBackdropView : WKCompositingView
+@interface WKBackdropView : WKCompositingView
 @end
 
 @interface WKShapeView : WKCompositingView
@@ -60,9 +60,6 @@
 @interface WKUIRemoteView : _UIRemoteView <WKContentControlled>
 @end
 
-@interface WKBackdropView : _UIBackdropView <WKContentControlled>
-@end
-
 @interface WKChildScrollView : UIScrollView <WKContentControlled>
 @end
 

Modified: trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm (294640 => 294641)


--- trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm	2022-05-23 14:58:55 UTC (rev 294640)
+++ trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm	2022-05-23 15:02:52 UTC (rev 294641)
@@ -343,7 +343,7 @@
 
 @end
 
-@implementation WKSimpleBackdropView
+@implementation WKBackdropView
 
 + (Class)layerClass
 {
@@ -416,20 +416,6 @@
 
 @end
 
-@implementation WKBackdropView
-
-- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
-{
-    return [self _web_findDescendantViewAtPoint:point withEvent:event];
-}
-
-- (NSString *)description
-{
-    return WebKit::RemoteLayerTreeNode::appendLayerDescription(super.description, self.layer);
-}
-
-@end
-
 @implementation WKChildScrollView
 
 - (instancetype)initWithFrame:(CGRect)frame
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to