Bug 146251

Summary: Media controls are missing the white backdrop in UIWebViews
Product: WebKit Reporter: Dean Jackson <dino>
Component: New BugsAssignee: Dean Jackson <dino>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch simon.fraser: review+

Description Dean Jackson 2015-06-23 15:09:57 PDT
Media controls are missing the white backdrop in UIWebViews
Comment 1 Dean Jackson 2015-06-23 15:13:29 PDT
<rdar://problem/20181345>
Comment 2 Dean Jackson 2015-06-23 15:14:28 PDT
Created attachment 255439 [details]
Patch
Comment 3 Simon Fraser (smfr) 2015-06-23 15:27:09 PDT
Comment on attachment 255439 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=255439&action=review

> Source/WebCore/platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm:65
> +- (void)setBackgroundColor:(CGColorRef)backgroundColor
> +{
> +    UNUSED_PARAM(backgroundColor);
> +    static CGColorRef layerBackgroundColor;
> +    if (!layerBackgroundColor) {
> +        CGFloat components[4] = { 0.8, 0.8, 0.8, 0.8 };
> +        layerBackgroundColor = CGColorCreate(cachedCGColorSpace(ColorSpaceSRGB), components);
> +        [super setBackgroundColor:layerBackgroundColor];
> +    }
> +}

Seems odd to override -setBackgroundColor: and replace the color. Why not just set the background color in -init, and make sure no clients push a background color?
Comment 4 Dean Jackson 2015-06-23 15:31:54 PDT
Created attachment 255440 [details]
Patch
Comment 5 Dean Jackson 2015-06-23 15:48:32 PDT
Committed r185888: <http://trac.webkit.org/changeset/185888>