Bug 127891 - WebKit2 View Gestures (Swipe): Provide a way for clients to provide views to swipe
Summary: WebKit2 View Gestures (Swipe): Provide a way for clients to provide views to ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-01-30 00:03 PST by Tim Horton
Modified: 2014-01-30 11:26 PST (History)
2 users (show)

See Also:


Attachments
patch (18.09 KB, patch)
2014-01-30 00:25 PST, Tim Horton
no flags Details | Formatted Diff | Diff
ever so slightly more crazy (20.00 KB, patch)
2014-01-30 02:21 PST, Tim Horton
andersca: 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 2014-01-30 00:03:47 PST
Sometimes, clients want to swipe to or from a custom view hierarchy. Let's provide SPI to make this work (later we can think about the right way to do this, probably involving WebKit instantiating and owning the views on navigation to a particular scheme, or some such).

Implementation caveats: views must be layer backed and a contiguous, opaque rectangle.

<rdar://problem/15931413>
Comment 1 Tim Horton 2014-01-30 00:25:43 PST
Created attachment 222639 [details]
patch
Comment 2 Tim Horton 2014-01-30 02:08:02 PST
Comment on attachment 222639 [details]
patch

I have some significant revisions to make, de-r?ing for now.
Comment 3 Tim Horton 2014-01-30 02:21:24 PST
Created attachment 222647 [details]
ever so slightly more crazy
Comment 4 Anders Carlsson 2014-01-30 11:05:11 PST
Comment on attachment 222647 [details]
ever so slightly more crazy

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

> Source/WebKit2/UIProcess/mac/ViewGestureController.h:61
> +    void setCustomSwipeViews(Vector<RetainPtr<NSView>> views) { m_customSwipeViews = views; }

std::move(views).

> Source/WebKit2/UIProcess/mac/ViewGestureController.h:62
> +    Vector<RetainPtr<NSView>> customSwipeViews() const { return m_customSwipeViews; }

You don't want to return this by reference?
Comment 5 Tim Horton 2014-01-30 11:26:19 PST
http://trac.webkit.org/changeset/163093