Changeset 294641 in webkit
- Timestamp:
- May 23, 2022, 8:02:52 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 5 deleted
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt
r294629 r294641 42 42 PASS -webkit-appearance: listitem (invalid) 43 43 PASS -webkit-appearance: media-controls-background (invalid) 44 FAIL -webkit-appearance: media-controls-dark-bar-background (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-controls-dark-bar-background" 44 PASS -webkit-appearance: media-controls-dark-bar-background (invalid) 45 45 PASS -webkit-appearance: media-controls-fullscreen-background (invalid) 46 FAIL -webkit-appearance: media-controls-light-bar-background (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-controls-light-bar-background" 46 PASS -webkit-appearance: media-controls-light-bar-background (invalid) 47 47 PASS -webkit-appearance: media-current-time-display (invalid) 48 48 PASS -webkit-appearance: media-enter-fullscreen-button (invalid) … … 205 205 PASS appearance: listitem (invalid) 206 206 PASS appearance: media-controls-background (invalid) 207 FAIL appearance: media-controls-dark-bar-background (invalid) assert_equals: style.appearance expected "" but got "media-controls-dark-bar-background" 207 PASS appearance: media-controls-dark-bar-background (invalid) 208 208 PASS appearance: media-controls-fullscreen-background (invalid) 209 FAIL appearance: media-controls-light-bar-background (invalid) assert_equals: style.appearance expected "" but got "media-controls-light-bar-background" 209 PASS appearance: media-controls-light-bar-background (invalid) 210 210 PASS appearance: media-current-time-display (invalid) 211 211 PASS appearance: media-enter-fullscreen-button (invalid) -
trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-ui/appearance-cssom-001-expected.txt
r294629 r294641 42 42 PASS -webkit-appearance: listitem (invalid) 43 43 PASS -webkit-appearance: media-controls-background (invalid) 44 FAIL -webkit-appearance: media-controls-dark-bar-background (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-controls-dark-bar-background" 44 PASS -webkit-appearance: media-controls-dark-bar-background (invalid) 45 45 PASS -webkit-appearance: media-controls-fullscreen-background (invalid) 46 FAIL -webkit-appearance: media-controls-light-bar-background (invalid) assert_equals: style.WebkitAppearance (uppercase W) expected "" but got "media-controls-light-bar-background" 46 PASS -webkit-appearance: media-controls-light-bar-background (invalid) 47 47 PASS -webkit-appearance: media-current-time-display (invalid) 48 48 PASS -webkit-appearance: media-enter-fullscreen-button (invalid) … … 205 205 PASS appearance: listitem (invalid) 206 206 PASS appearance: media-controls-background (invalid) 207 FAIL appearance: media-controls-dark-bar-background (invalid) assert_equals: style.appearance expected "" but got "media-controls-dark-bar-background" 207 PASS appearance: media-controls-dark-bar-background (invalid) 208 208 PASS appearance: media-controls-fullscreen-background (invalid) 209 FAIL appearance: media-controls-light-bar-background (invalid) assert_equals: style.appearance expected "" but got "media-controls-light-bar-background" 209 PASS appearance: media-controls-light-bar-background (invalid) 210 210 PASS appearance: media-current-time-display (invalid) 211 211 PASS appearance: media-enter-fullscreen-button (invalid) -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r294629 r294641 490 490 case MediaFullScreenVolumeSliderThumbPart: 491 491 m_value.valueID = CSSValueMediaFullscreenVolumeSliderThumb; 492 break;493 case MediaControlsLightBarBackgroundPart:494 m_value.valueID = CSSValueMediaControlsLightBarBackground;495 break;496 case MediaControlsDarkBarBackgroundPart:497 m_value.valueID = CSSValueMediaControlsDarkBarBackground;498 492 break; 499 493 case MenulistPart: -
trunk/Source/WebCore/css/CSSProperties.json
r294629 r294641 5167 5167 "default-button", 5168 5168 "listbox", 5169 "media-controls-dark-bar-background",5170 "media-controls-light-bar-background",5171 5169 "media-fullscreen-volume-slider", 5172 5170 "media-fullscreen-volume-slider-thumb", -
trunk/Source/WebCore/css/CSSValueKeywords.in
r294629 r294641 842 842 default-button 843 843 listbox 844 media-controls-dark-bar-background845 media-controls-light-bar-background846 844 media-fullscreen-volume-slider 847 845 media-fullscreen-volume-slider-thumb -
trunk/Source/WebCore/platform/ThemeTypes.cpp
r294629 r294641 44 44 case InnerSpinButtonPart: ts << "inner-spin-button-part"; break; 45 45 case ListboxPart: ts << "listbox-part"; break; 46 case MediaControlsDarkBarBackgroundPart: ts << "media-controls-dark-bar-background-part"; break;47 case MediaControlsLightBarBackgroundPart: ts << "media-controls-light-bar-background-part"; break;48 46 case MediaFullScreenVolumeSliderPart: ts << "media-full-screen-volume-slider-part"; break; 49 47 case MediaFullScreenVolumeSliderThumbPart: ts << "media-full-screen-volume-slider-thumb-part"; break; -
trunk/Source/WebCore/platform/ThemeTypes.h
r294629 r294641 43 43 DefaultButtonPart, 44 44 ListboxPart, 45 MediaControlsDarkBarBackgroundPart,46 MediaControlsLightBarBackgroundPart,47 45 MediaFullScreenVolumeSliderPart, 48 46 MediaFullScreenVolumeSliderThumbPart, -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp
r293443 r294641 984 984 case GraphicsLayer::CustomAppearance::ScrollingOverhang: ts << "scrolling-overhang"; break; 985 985 case GraphicsLayer::CustomAppearance::ScrollingShadow: ts << "scrolling-shadow"; break; 986 case GraphicsLayer::CustomAppearance::LightBackdrop: ts << "light-backdrop"; break;987 case GraphicsLayer::CustomAppearance::DarkBackdrop: ts << "dark-backdrop"; break;988 986 } 989 987 return ts; -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r294196 r294641 568 568 None, 569 569 ScrollingOverhang, 570 ScrollingShadow, 571 LightBackdrop, 572 DarkBackdrop 570 ScrollingShadow 573 571 }; 574 572 virtual void setCustomAppearance(CustomAppearance customAppearance) { m_customAppearance = customAppearance; } … … 811 809 WebCore::GraphicsLayer::CustomAppearance::None, 812 810 WebCore::GraphicsLayer::CustomAppearance::ScrollingOverhang, 813 WebCore::GraphicsLayer::CustomAppearance::ScrollingShadow, 814 WebCore::GraphicsLayer::CustomAppearance::LightBackdrop, 815 WebCore::GraphicsLayer::CustomAppearance::DarkBackdrop 811 WebCore::GraphicsLayer::CustomAppearance::ScrollingShadow 816 812 >; 817 813 }; -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r294196 r294641 430 430 : GraphicsLayer(layerType, client) 431 431 , m_needsFullRepaint(false) 432 , m_usingBackdropLayerType(false)433 432 , m_allowsBackingStoreDetaching(true) 434 433 , m_intersectsCoverageRect(false) … … 1921 1920 } 1922 1921 1923 static PlatformCALayer::LayerType layerTypeForCustomBackdropAppearance(GraphicsLayer::CustomAppearance appearance)1924 {1925 return appearance == GraphicsLayer::CustomAppearance::LightBackdrop ? PlatformCALayer::LayerTypeLightSystemBackdropLayer : PlatformCALayer::LayerTypeDarkSystemBackdropLayer;1926 }1927 1928 static bool isCustomBackdropLayerType(PlatformCALayer::LayerType layerType)1929 {1930 return layerType == PlatformCALayer::LayerTypeLightSystemBackdropLayer || layerType == PlatformCALayer::LayerTypeDarkSystemBackdropLayer;1931 }1932 1933 1922 void GraphicsLayerCA::commitLayerChangesBeforeSublayers(CommitState& commitState, float pageScaleFactor, const FloatPoint& positionRelativeToBase, bool& layerChanged) 1934 1923 { … … 1942 1931 1943 1932 bool needTiledLayer = requiresTiledLayer(pageScaleFactor); 1944 bool needBackdropLayerType = (customAppearance() == CustomAppearance::LightBackdrop || customAppearance() == CustomAppearance::DarkBackdrop);1945 1933 1946 1934 PlatformCALayer::LayerType currentLayerType = m_layer->layerType(); 1947 1935 PlatformCALayer::LayerType neededLayerType = currentLayerType; 1948 1936 1949 if (needBackdropLayerType) 1950 neededLayerType = layerTypeForCustomBackdropAppearance(customAppearance()); 1951 else if (needTiledLayer) 1937 if (needTiledLayer) 1952 1938 neededLayerType = PlatformCALayer::LayerTypeTiledBackingLayer; 1953 else if (currentLayerType == PlatformCALayer::LayerTypeTiledBackingLayer || isCustomBackdropLayerType(m_layer->layerType()))1939 else if (currentLayerType == PlatformCALayer::LayerTypeTiledBackingLayer) 1954 1940 neededLayerType = PlatformCALayer::LayerTypeWebLayer; 1955 1941 … … 4404 4390 m_layer = createPlatformCALayer(newLayerType, this); 4405 4391 4406 m_usingBackdropLayerType = isCustomBackdropLayerType(newLayerType);4407 4408 4392 m_layer->adoptSublayers(*oldLayer); 4409 4393 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r294196 r294641 662 662 663 663 bool m_needsFullRepaint : 1; 664 bool m_usingBackdropLayerType : 1;665 664 bool m_allowsBackingStoreDetaching : 1; 666 665 bool m_intersectsCoverageRect : 1; -
trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.cpp
r292810 r294641 250 250 ts << "custom-layer"; 251 251 break; 252 case PlatformCALayer::LayerTypeLightSystemBackdropLayer:253 ts << "light-system-backdrop-layer";254 break;255 case PlatformCALayer::LayerTypeDarkSystemBackdropLayer:256 ts << "dark-system-backdrop-layer";257 break;258 252 #if ENABLE(MODEL_ELEMENT) 259 253 case PlatformCALayer::LayerTypeModelLayer: -
trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h
r287079 r294641 84 84 LayerTypeBackdropLayer, 85 85 LayerTypeShapeLayer, 86 LayerTypeLightSystemBackdropLayer,87 LayerTypeDarkSystemBackdropLayer,88 86 LayerTypeScrollContainerLayer, 89 87 #if ENABLE(MODEL_ELEMENT) … … 375 373 WebCore::PlatformCALayer::LayerType::LayerTypeBackdropLayer, 376 374 WebCore::PlatformCALayer::LayerType::LayerTypeShapeLayer, 377 WebCore::PlatformCALayer::LayerType::LayerTypeLightSystemBackdropLayer,378 WebCore::PlatformCALayer::LayerType::LayerTypeDarkSystemBackdropLayer,379 375 WebCore::PlatformCALayer::LayerType::LayerTypeScrollContainerLayer, 380 376 #if ENABLE(MODEL_ELEMENT) -
trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
r293443 r294641 243 243 layerClass = [CABackdropLayer class]; 244 244 break; 245 case LayerTypeLightSystemBackdropLayer:246 layerClass = [WebLightSystemBackdropLayer class];247 break;248 case LayerTypeDarkSystemBackdropLayer:249 layerClass = [WebDarkSystemBackdropLayer class];250 break;251 245 #else 252 246 case LayerTypeBackdropLayer: 253 case LayerTypeLightSystemBackdropLayer:254 case LayerTypeDarkSystemBackdropLayer:255 247 ASSERT_NOT_REACHED(); 256 248 layerClass = [CALayer class]; … … 1055 1047 switch (appearance) { 1056 1048 case GraphicsLayer::CustomAppearance::None: 1057 case GraphicsLayer::CustomAppearance::LightBackdrop:1058 case GraphicsLayer::CustomAppearance::DarkBackdrop:1059 1049 ScrollbarThemeMac::removeOverhangAreaBackground(platformLayer()); 1060 1050 ScrollbarThemeMac::removeOverhangAreaShadow(platformLayer()); -
trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
r292408 r294641 735 735 case PlatformCALayer::LayerTypeBackdropLayer: layerTypeName = "backdrop-layer"; break; 736 736 case PlatformCALayer::LayerTypeShapeLayer: layerTypeName = "shape-layer"; break; 737 case PlatformCALayer::LayerTypeLightSystemBackdropLayer: layerTypeName = "light-system-backdrop-layer"; break;738 case PlatformCALayer::LayerTypeDarkSystemBackdropLayer: layerTypeName = "dark-system-backdrop-layer"; break;739 737 case PlatformCALayer::LayerTypeScrollContainerLayer: layerTypeName = "scroll-container-layer"; break; 740 738 case PlatformCALayer::LayerTypeCustom: layerTypeName = "custom-layer"; break; -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r294615 r294641 550 550 updateBlendMode(style); 551 551 #endif 552 updateCustomAppearance(style);553 552 updateContentsScalingFilters(style); 554 553 } … … 784 783 } 785 784 #endif 786 787 void RenderLayerBacking::updateCustomAppearance(const RenderStyle& style)788 {789 ControlPart appearance = style.effectiveAppearance();790 if (appearance == MediaControlsLightBarBackgroundPart)791 m_graphicsLayer->setCustomAppearance(GraphicsLayer::CustomAppearance::LightBackdrop);792 else if (appearance == MediaControlsDarkBarBackgroundPart)793 m_graphicsLayer->setCustomAppearance(GraphicsLayer::CustomAppearance::DarkBackdrop);794 else795 m_graphicsLayer->setCustomAppearance(GraphicsLayer::CustomAppearance::None);796 }797 785 798 786 void RenderLayerBacking::updateContentsScalingFilters(const RenderStyle& style) … … 995 983 updateBlendMode(style); 996 984 #endif 997 updateCustomAppearance(style);998 985 updateContentsScalingFilters(style); 999 986 } -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r294615 r294641 352 352 void updateBlendMode(const RenderStyle&); 353 353 #endif 354 void updateCustomAppearance(const RenderStyle&);355 354 void updateContentsScalingFilters(const RenderStyle&); 356 355 -
trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h
r293142 r294641 980 980 typedef NS_ENUM(NSInteger, _UIBackdropViewStylePrivate) { 981 981 _UIBackdropViewStyle_Light = 2020, 982 _UIBackdropViewStyle_Dark = 2030983 982 }; 984 983 … … 997 996 - (instancetype)initWithPrivateStyle:(_UIBackdropViewStylePrivate)style; 998 997 - (instancetype)initWithSettings:(_UIBackdropViewSettings *)settings; 999 - (instancetype)initWithFrame:(CGRect)frame privateStyle:(_UIBackdropViewStylePrivate)style;1000 998 @property (nonatomic, strong, readonly) UIView *contentView; 1001 999 @end -
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
r294460 r294641 523 523 PlatformCALayer::drawLayerContents(context, m_layer, m_paintingRects, flags); 524 524 break; 525 case PlatformCALayer::LayerTypeDarkSystemBackdropLayer:526 case PlatformCALayer::LayerTypeLightSystemBackdropLayer:527 // FIXME: These have a more complicated layer hierarchy. We need to paint into528 // a child layer in order to see the rendered results.529 PlatformCALayer::drawLayerContents(context, m_layer, m_paintingRects, flags);530 break;531 525 case PlatformCALayer::LayerTypeLayer: 532 526 case PlatformCALayer::LayerTypeTransformLayer: -
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm
r294160 r294641 122 122 return kCAFilterTrilinear; 123 123 }; 124 124 125 125 ASSERT_NOT_REACHED(); 126 126 return 0; … … 132 132 switch (customAppearance) { 133 133 case GraphicsLayer::CustomAppearance::None: 134 case GraphicsLayer::CustomAppearance::DarkBackdrop:135 case GraphicsLayer::CustomAppearance::LightBackdrop:136 134 ScrollbarThemeMac::removeOverhangAreaBackground(layer); 137 135 ScrollbarThemeMac::removeOverhangAreaShadow(layer); … … 335 333 }; 336 334 337 auto contentView = [&] {338 if (properties.customAppearance == GraphicsLayer::CustomAppearance::LightBackdrop || properties.customAppearance == GraphicsLayer::CustomAppearance::DarkBackdrop) {339 // This is a UIBackdropView, which should have children attached to340 // its content view, not directly on its layers.341 return [(_UIBackdropView *)node.uiView() contentView];342 }343 return node.uiView();344 };345 346 335 if (hasViewChildren()) { 347 336 ASSERT(node.uiView()); 348 [ contentView() _web_setSubviews:createNSArray(properties.children, [&] (auto& child) -> UIView * {337 [node.uiView() _web_setSubviews:createNSArray(properties.children, [&] (auto& child) -> UIView * { 349 338 auto* childNode = relatedLayers.get(child); 350 339 ASSERT(childNode); … … 383 372 return; 384 373 385 auto maskOwnerLayer = [&] { 386 CALayer *layer = node.layer(); 387 #if PLATFORM(IOS_FAMILY) 388 if (properties.customAppearance == GraphicsLayer::CustomAppearance::LightBackdrop || properties.customAppearance == GraphicsLayer::CustomAppearance::DarkBackdrop) { 389 // This is a UIBackdropView, which means any mask must be applied to the CABackdropLayer rather 390 // that the view's layer. The backdrop is the first layer child. 391 if (layer.sublayers.count && [layer.sublayers[0] isKindOfClass:[CABackdropLayer class]]) 392 layer = layer.sublayers[0]; 393 } 394 #endif 395 return layer; 396 }; 374 auto maskOwnerLayer = node.layer(); 397 375 398 376 if (!properties.maskLayerID) { 399 maskOwnerLayer ().mask = nullptr;377 maskOwnerLayer.mask = nullptr; 400 378 return; 401 379 } … … 409 387 if (maskLayer.superlayer) 410 388 return; 411 maskOwnerLayer ().mask = maskLayer;389 maskOwnerLayer.mask = maskLayer; 412 390 } 413 391 -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm
r286943 r294641 304 304 305 305 case PlatformCALayer::LayerTypeBackdropLayer: 306 case PlatformCALayer::LayerTypeLightSystemBackdropLayer:307 case PlatformCALayer::LayerTypeDarkSystemBackdropLayer:308 306 #if ENABLE(FILTERS_LEVEL_2) 309 307 return makeWithLayer(adoptNS([[CABackdropLayer alloc] init])); -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm
r293031 r294641 63 63 64 64 case PlatformCALayer::LayerTypeBackdropLayer: 65 return makeWithView(adoptNS([[WKSimpleBackdropView alloc] init])); 66 67 case PlatformCALayer::LayerTypeLightSystemBackdropLayer: 68 return makeWithView(adoptNS([[WKBackdropView alloc] initWithFrame:CGRectZero privateStyle:_UIBackdropViewStyle_Light])); 69 70 case PlatformCALayer::LayerTypeDarkSystemBackdropLayer: 71 return makeWithView(adoptNS([[WKBackdropView alloc] initWithFrame:CGRectZero privateStyle:_UIBackdropViewStyle_Dark])); 65 return makeWithView(adoptNS([[WKBackdropView alloc] init])); 72 66 73 67 case PlatformCALayer::LayerTypeTransformLayer: -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.h
r274302 r294641 46 46 @end 47 47 48 @interface WK SimpleBackdropView : WKCompositingView48 @interface WKBackdropView : WKCompositingView 49 49 @end 50 50 … … 59 59 60 60 @interface WKUIRemoteView : _UIRemoteView <WKContentControlled> 61 @end62 63 @interface WKBackdropView : _UIBackdropView <WKContentControlled>64 61 @end 65 62 -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm
r279402 r294641 344 344 @end 345 345 346 @implementation WK SimpleBackdropView346 @implementation WKBackdropView 347 347 348 348 + (Class)layerClass … … 417 417 @end 418 418 419 @implementation WKBackdropView420 421 - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event422 {423 return [self _web_findDescendantViewAtPoint:point withEvent:event];424 }425 426 - (NSString *)description427 {428 return WebKit::RemoteLayerTreeNode::appendLayerDescription(super.description, self.layer);429 }430 431 @end432 433 419 @implementation WKChildScrollView 434 420
Note:
See TracChangeset
for help on using the changeset viewer.