Diff
Modified: trunk/Source/WebCore/ChangeLog (185887 => 185888)
--- trunk/Source/WebCore/ChangeLog 2015-06-23 22:46:56 UTC (rev 185887)
+++ trunk/Source/WebCore/ChangeLog 2015-06-23 22:47:04 UTC (rev 185888)
@@ -1,3 +1,30 @@
+2015-06-23 Dean Jackson <[email protected]>
+
+ Media controls are missing the white backdrop in UIWebViews
+ https://bugs.webkit.org/show_bug.cgi?id=146251
+ <rdar://problem/20181345>
+
+ Reviewed by Simon Fraser.
+
+ Implement two new CALayer subclasses that explicitly set
+ something that resembles the system appearance for
+ media-controls-dark-bar-background and media-controls-light-bar-background.
+ This way, WebKit1 clients get a visible result.
+
+ Creating the actual system recipes is tracked by:
+ https://bugs.webkit.org/show_bug.cgi?id=146250
+
+ * WebCore.xcodeproj/project.pbxproj: Add new files.
+ * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
+ (PlatformCALayerCocoa::PlatformCALayerCocoa): Use the new CALayer subclasses for
+ the appropriate layer types.
+ * platform/graphics/ca/cocoa/WebSystemBackdropLayer.h: Added.
+ * platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm: Added.
+ (-[WebLightSystemBackdropLayer init]):
+ (-[WebLightSystemBackdropLayer setBackgroundColor:]): Only set to a light grey.
+ (-[WebDarkSystemBackdropLayer init]):
+ (-[WebDarkSystemBackdropLayer setBackgroundColor:]): Only set to a dark grey.
+
2015-06-18 Matt Rajca <[email protected]>
Support releasing media sessions
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (185887 => 185888)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-06-23 22:46:56 UTC (rev 185887)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2015-06-23 22:47:04 UTC (rev 185888)
@@ -1314,6 +1314,8 @@
31C0FF4E0E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF480E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h */; };
31D591B316697A6C00E6BF02 /* PlugInClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31D591B116697A6C00E6BF02 /* PlugInClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
31DCD29D1AB4FBDE0072E817 /* AnimationTrigger.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DCD29C1AB4FBDE0072E817 /* AnimationTrigger.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 31DEA4551B39F4D900F77178 /* WebSystemBackdropLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31DEA4531B39F4D900F77178 /* WebSystemBackdropLayer.mm */; };
+ 31DEA4561B39F4D900F77178 /* WebSystemBackdropLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DEA4541B39F4D900F77178 /* WebSystemBackdropLayer.h */; };
31DF63571AF187DD0078FD91 /* NSColorSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DF63561AF187DD0078FD91 /* NSColorSPI.h */; };
31DF63591AF194F00078FD91 /* UIColorSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DF63581AF194F00078FD91 /* UIColorSPI.h */; };
31EAF97E121435A400E7C1BF /* DeviceMotionClientIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 31EAF97C121435A400E7C1BF /* DeviceMotionClientIOS.h */; };
@@ -8481,6 +8483,8 @@
31C0FF480E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitTransitionEventInternal.h; sourceTree = "<group>"; };
31D591B116697A6C00E6BF02 /* PlugInClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlugInClient.h; sourceTree = "<group>"; };
31DCD29C1AB4FBDE0072E817 /* AnimationTrigger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationTrigger.h; sourceTree = "<group>"; };
+ 31DEA4531B39F4D900F77178 /* WebSystemBackdropLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebSystemBackdropLayer.mm; sourceTree = "<group>"; };
+ 31DEA4541B39F4D900F77178 /* WebSystemBackdropLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSystemBackdropLayer.h; sourceTree = "<group>"; };
31DF63561AF187DD0078FD91 /* NSColorSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSColorSPI.h; sourceTree = "<group>"; };
31DF63581AF194F00078FD91 /* UIColorSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIColorSPI.h; sourceTree = "<group>"; };
31E8D8BA160BC94B004CE8F5 /* RenderSnapshottedPlugIn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSnapshottedPlugIn.cpp; sourceTree = "<group>"; };
@@ -16273,6 +16277,8 @@
0F13163F16ED0CDE0035CC04 /* PlatformCAFiltersCocoa.mm */,
2D70BA1218074DDF0001908A /* PlatformCALayerCocoa.h */,
4958782012A57DDF007238AC /* PlatformCALayerCocoa.mm */,
+ 31DEA4541B39F4D900F77178 /* WebSystemBackdropLayer.h */,
+ 31DEA4531B39F4D900F77178 /* WebSystemBackdropLayer.mm */,
0F580FA11496939100FB5BD8 /* WebTiledBackingLayer.h */,
0F580FA21496939100FB5BD8 /* WebTiledBackingLayer.mm */,
);
@@ -24938,6 +24944,7 @@
D359D78A129CA2710006E5D2 /* HTMLDetailsElement.h in Headers */,
A8EA79FA0A1916DF00A8EF5F /* HTMLDirectoryElement.h in Headers */,
A8EA7CB70A192B9C00A8EF5F /* HTMLDivElement.h in Headers */,
+ 31DEA4561B39F4D900F77178 /* WebSystemBackdropLayer.h in Headers */,
A8EA79F70A1916DF00A8EF5F /* HTMLDListElement.h in Headers */,
93F198E508245E59001E9ABC /* HTMLDocument.h in Headers */,
977B3867122883E900B81FF8 /* HTMLDocumentParser.h in Headers */,
@@ -29741,6 +29748,7 @@
A8EA73C30A1900E300A8EF5F /* RenderFieldset.cpp in Sources */,
066C77300AB603FD00238CC4 /* RenderFileUploadControl.cpp in Sources */,
53C8298D13D8D92700DE2DEB /* RenderFlexibleBox.cpp in Sources */,
+ 31DEA4551B39F4D900F77178 /* WebSystemBackdropLayer.mm in Sources */,
508CCA5013CF106B003151F3 /* RenderFlowThread.cpp in Sources */,
A871DED40A1530C700B12A68 /* RenderFrame.cpp in Sources */,
0FD3080E117CF7E700A791F7 /* RenderFrameBase.cpp in Sources */,
Modified: trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm (185887 => 185888)
--- trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm 2015-06-23 22:46:56 UTC (rev 185887)
+++ trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm 2015-06-23 22:47:04 UTC (rev 185888)
@@ -43,6 +43,7 @@
#import "WebCoreCALayerExtras.h"
#import "WebGLLayer.h"
#import "WebLayer.h"
+#import "WebSystemBackdropLayer.h"
#import "WebTiledBackingLayer.h"
#import <AVFoundation/AVFoundation.h>
#import <QuartzCore/QuartzCore.h>
@@ -225,16 +226,24 @@
case LayerTypeTransformLayer:
layerClass = [CATransformLayer class];
break;
+#if ENABLE(FILTERS_LEVEL_2)
case LayerTypeBackdropLayer:
+ layerClass = [CABackdropLayer class];
+ break;
case LayerTypeLightSystemBackdropLayer:
+ layerClass = [WebLightSystemBackdropLayer class];
+ break;
case LayerTypeDarkSystemBackdropLayer:
-#if ENABLE(FILTERS_LEVEL_2)
- layerClass = [CABackdropLayer class];
+ layerClass = [WebDarkSystemBackdropLayer class];
+ break;
#else
+ case LayerTypeBackdropLayer:
+ case LayerTypeLightSystemBackdropLayer:
+ case LayerTypeDarkSystemBackdropLayer:
ASSERT_NOT_REACHED();
layerClass = [CALayer class];
+ break;
#endif
- break;
case LayerTypeWebTiledLayer:
ASSERT_NOT_REACHED();
break;
Added: trunk/Source/WebCore/platform/graphics/ca/cocoa/WebSystemBackdropLayer.h (0 => 185888)
--- trunk/Source/WebCore/platform/graphics/ca/cocoa/WebSystemBackdropLayer.h (rev 0)
+++ trunk/Source/WebCore/platform/graphics/ca/cocoa/WebSystemBackdropLayer.h 2015-06-23 22:47:04 UTC (rev 185888)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebSystemBackdropLayer_h
+#define WebSystemBackdropLayer_h
+
+#import <QuartzCore/QuartzCore.h>
+
+@interface WebSystemBackdropLayer : CALayer
+@end
+
+@interface WebLightSystemBackdropLayer : WebSystemBackdropLayer
+@end
+
+@interface WebDarkSystemBackdropLayer : WebSystemBackdropLayer
+@end
+
+#endif // WebSystemBackdropLayer_h
Property changes on: trunk/Source/WebCore/platform/graphics/ca/cocoa/WebSystemBackdropLayer.h
___________________________________________________________________
Added: svn:keywords
Added: svn:eol-style
Added: trunk/Source/WebCore/platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm (0 => 185888)
--- trunk/Source/WebCore/platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm (rev 0)
+++ trunk/Source/WebCore/platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm 2015-06-23 22:47:04 UTC (rev 185888)
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "WebSystemBackdropLayer.h"
+
+#import "GraphicsContextCG.h"
+#import <QuartzCore/QuartzCore.h>
+
+using namespace WebCore;
+
+// FIXME: https://bugs.webkit.org/show_bug.cgi?id=146250
+// These should provide the system recipes for the layers
+// with the appropriate tinting, blending and blurring.
+
+@implementation WebSystemBackdropLayer
+@end
+
+@implementation WebLightSystemBackdropLayer
+
+- (id)init
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+#ifndef NDEBUG
+ [self setName:@"WebLightSystemBackdropLayer"];
+#endif
+
+ CGFloat components[4] = { 0.8, 0.8, 0.8, 0.8 };
+ [super setBackgroundColor:CGColorCreate(cachedCGColorSpace(ColorSpaceSRGB), components)];
+
+ return self;
+}
+
+- (void)setBackgroundColor:(CGColorRef)backgroundColor
+{
+ // Empty implementation to stop clients pushing the wrong color.
+ UNUSED_PARAM(backgroundColor);
+}
+
+@end
+
+@implementation WebDarkSystemBackdropLayer
+
+- (id)init
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+#ifndef NDEBUG
+ [self setName:@"WebDarkSystemBackdropLayer"];
+#endif
+
+ CGFloat components[4] = { 0.2, 0.2, 0.2, 0.8 };
+ [super setBackgroundColor:CGColorCreate(cachedCGColorSpace(ColorSpaceSRGB), components)];
+
+ return self;
+}
+
+- (void)setBackgroundColor:(CGColorRef)backgroundColor
+{
+ // Empty implementation to stop clients pushing the wrong color.
+ UNUSED_PARAM(backgroundColor);
+}
+
+@end