Bug 143616

Summary: Update gesture swipe shadow style
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, bdakin, sam, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch darin: review+

Description Tim Horton 2015-04-10 12:56:35 PDT
Update gesture swipe shadow style
Comment 1 Tim Horton 2015-04-10 12:57:26 PDT
Created attachment 250528 [details]
Patch
Comment 2 Tim Horton 2015-04-10 14:14:18 PDT
Created attachment 250534 [details]
Patch
Comment 3 Tim Horton 2015-04-10 16:02:18 PDT
Comment on attachment 250534 [details]
Patch

Going to make some changes.
Comment 4 Tim Horton 2015-04-10 19:00:48 PDT
Created attachment 250556 [details]
Patch
Comment 5 Darin Adler 2015-04-11 08:43:12 PDT
Comment on attachment 250556 [details]
Patch

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

A little surprised that the resources are not listed in the change log. Seems a little archaic that we have a 2x and a “regular” version of this. Not really sure why we don’t need a 3x and why we do need a 1x.

> Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:625
> +        [m_swipeDimmingLayer setName:@"Gesture Swipe Dimming Layer"];
> +        [m_swipeDimmingLayer setBackgroundColor:[NSColor blackColor].CGColor];
> +        [m_swipeDimmingLayer setOpacity:swipeOverlayDimmingOpacity];
> +        [m_swipeDimmingLayer setAnchorPoint:CGPointZero];
> +        [m_swipeDimmingLayer setFrame:dimmingRect];
> +        [m_swipeDimmingLayer setGeometryFlipped:geometryIsFlippedToRoot];
> +        [m_swipeDimmingLayer setDelegate:[WebActionDisablingCALayerDelegate shared]];

I’m surprised that we are using method call syntax rather than property setting syntax here.
Comment 6 Tim Horton 2015-04-11 10:56:16 PDT
Comment on attachment 250556 [details]
Patch

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

It sounds like we might get a CAGradientLayer instead of the PNGs soon, so hopefully the point about the resources will be rendered moot. That said, this is Mac code so that should explain why 1x and not 3x.

>> Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:625
>> +        [m_swipeDimmingLayer setDelegate:[WebActionDisablingCALayerDelegate shared]];
> 
> I’m surprised that we are using method call syntax rather than property setting syntax here.

They're RetainPtrs. My understanding is that we prefer [x setY:z] over x.get().y = z, but sadly I don't think that's written down anywhere.
Comment 7 Tim Horton 2015-04-14 17:04:18 PDT
http://trac.webkit.org/changeset/182822