Bug 143616 - Update gesture swipe shadow style
Summary: Update gesture swipe shadow style
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-10 12:56 PDT by Tim Horton
Modified: 2015-04-14 17:04 PDT (History)
4 users (show)

See Also:


Attachments
Patch (22.01 KB, patch)
2015-04-10 12:57 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (22.07 KB, patch)
2015-04-10 14:14 PDT, Tim Horton
no flags Details | Formatted Diff | Diff
Patch (22.32 KB, patch)
2015-04-10 19:00 PDT, Tim Horton
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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