Skip to content
Permalink
Browse files
[css-ui] Remove support for appearance: media-controls-{dark/light}-b…
…ar-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
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
nt1m committed May 23, 2022
1 parent 393f7dd commit 5fc04f5aba2aa34cefeba95743d6766df102922b
Showing 29 changed files with 20 additions and 328 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -41,9 +41,9 @@ PASS -webkit-appearance: inner-spin-button (invalid)
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: inner-spin-button (invalid)
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)
@@ -41,9 +41,9 @@ PASS -webkit-appearance: inner-spin-button (invalid)
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: inner-spin-button (invalid)
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)

This file was deleted.

@@ -490,12 +490,6 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ControlPart e)
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;
@@ -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",
@@ -841,8 +841,6 @@ square-button
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
@@ -43,8 +43,6 @@ TextStream& operator<<(TextStream& ts, ControlPart controlPart)
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;
@@ -42,8 +42,6 @@ enum ControlPart {
ButtonPart,
DefaultButtonPart,
ListboxPart,
MediaControlsDarkBarBackgroundPart,
MediaControlsLightBarBackgroundPart,
MediaFullScreenVolumeSliderPart,
MediaFullScreenVolumeSliderThumbPart,
MediaSliderPart,
@@ -983,8 +983,6 @@ TextStream& operator<<(TextStream& ts, const GraphicsLayer::CustomAppearance& cu
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;
}
@@ -567,9 +567,7 @@ class GraphicsLayer : public RefCounted<GraphicsLayer> {
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 @@ template<> struct EnumTraits<WebCore::GraphicsLayer::CustomAppearance> {
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
>;
};

@@ -429,7 +429,6 @@ static LayerDisplayListHashMap& layerDisplayListMap()
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 @@ void GraphicsLayerCA::platformCALayerLayerDisplay(PlatformCALayer* layer)
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 @@ void GraphicsLayerCA::commitLayerChangesBeforeSublayers(CommitState& commitState
}

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 @@ void GraphicsLayerCA::changeLayerTypeTo(PlatformCALayer::LayerType newLayerType)
RefPtr<PlatformCALayer> oldLayer = m_layer;
m_layer = createPlatformCALayer(newLayerType, this);

m_usingBackdropLayerType = isCustomBackdropLayerType(newLayerType);

m_layer->adoptSublayers(*oldLayer);

#ifdef VISIBLE_TILE_WASH
@@ -661,7 +661,6 @@ class GraphicsLayerCA : public GraphicsLayer, public PlatformCALayerClient {
bool m_isCommittingChanges { false };

bool m_needsFullRepaint : 1;
bool m_usingBackdropLayerType : 1;
bool m_allowsBackingStoreDetaching : 1;
bool m_intersectsCoverageRect : 1;
bool m_hasEverPainted : 1;
@@ -249,12 +249,6 @@ TextStream& operator<<(TextStream& ts, PlatformCALayer::LayerType layerType)
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";

0 comments on commit 5fc04f5

Please sign in to comment.