<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[162853] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/162853">162853</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2014-01-27 12:21:21 -0800 (Mon, 27 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>WebKit2 View Gestures: Fluid back-forward swipe
https://bugs.webkit.org/show_bug.cgi?id=127363

Reviewed by Anders Carlsson.

Add support for a &quot;back-forward swipe&quot;, which allows fluid swiping between
items in the back-forward list. Currently disabled by default.

* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetViewGestureDebuggingEnabled):
(WKPreferencesGetViewGestureDebuggingEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
Add a ViewGestureDebuggingEnabled preference, which currently causes snapshots to be blurred.
Additional view gesture debugging features could come in the future.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _ensureGestureController]):
(-[WKView scrollWheel:]):
If back-forward navigation gestures are enabled, intercept scrollWheel events
on the WKView and let the ViewGestureController take the first crack at them.

(-[WKView setAllowsBackForwardNavigationGestures:]):
(-[WKView allowsBackForwardNavigationGestures]):
* UIProcess/API/mac/WKViewInternal.h:
Add allowsBackForwardNavigationGesture property, which enables the gesture.

* UIProcess/mac/ViewGestureController.h:
Add swipe-related methods, which will be described below.

Add an enum for the swipe transition style. Currently only Overlap is accessible,
but in the future one could see having API to choose the style.
'Overlap' has the outgoing page swipe out to the right (when swiping right)
or the incoming page swipe in from the right (when swiping left).
'Push' has the pages push each other along in sync, as if all the pages in the
back-forward list were oriented from left to right.

* UIProcess/mac/ViewGestureController.messages.in:
* UIProcess/mac/ViewGestureController.mm: Renamed from Source/WebKit2/UIProcess/mac/ViewGestureController.cpp.
Use some CAFilter SPI to blur the snapshot if ViewGestureDebuggingEnabled is on.

(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::~ViewGestureController):
(WebKit::ViewGestureController::endMagnificationGesture):
Move m_activeGestureType clearing to each end* function instead of one global place,
so that each gesture can handle when it ends separately.

(WebKit::ViewGestureController::handleScrollWheelEvent):
If we receive a scroll wheel event which is appropriate for starting a
fluid swipe, in a direction where the main frame is pinned to the appropriate
edge of the view, start tracking a swipe.

This should eventually have some hysterisis to avoid stealing scrolls that
venture into the wrong direction, but for now it starts tracking immediately.

Forward events from the tracking loop to {begin, handle, end}SwipeGesture.

(WebKit::ViewGestureController::beginSwipeGesture):
Create a layer with the destination page's snapshot, and set it up.

(WebKit::ViewGestureController::handleSwipeGesture):
Appropriately adjust the position of the root layer and snapshot layer,
given the transition style and swipe direction.

(WebKit::ViewGestureController::endSwipeGesture):
When the gesture ends, do the navigation, and tell the WebProcess to
inform us when the render tree hits half the size it was when the
snapshot was taken (when that happens, we will remove the snapshot
and the gesture will be truly complete). Also, start a watchdog timer
in case the render tree never hits that size, after which we will
also remove the snapshot.

(WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
(WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
(WebKit::ViewGestureController::removeSwipeSnapshot):
Tear down the swipe snapshot layer, and mark our current gesture as complete.

(WebKit::ViewGestureController::endActiveGesture):
Simplify endActiveGesture; it only has work to do for a pinch-zoom gesture,
as those are the only gestures where the user is directly in control of when they end.

* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
(WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
(WebKit::ViewGestureGeometryCollector::renderTreeSizeNotificationTimerFired):
* WebProcess/WebPage/ViewGestureGeometryCollector.h:
(WebKit::ViewGestureGeometryCollector::setRenderTreeSizeNotificationThreshold):
* WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
ViewGestureController pushes a render-tree size threshold to the WebProcess;
ViewGestureGeometryCollector (whose name is now more unfortunate than before)
monitors render-tree size changes and informs ViewGestureController when
it reaches that threshold via the 'DidHitRenderTreeSizeThreshold' message.

* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/ios/PageClientImplIOS.h:
* UIProcess/API/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::acceleratedCompositingRootLayer):
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::acceleratedCompositingRootLayer):
* UIProcess/API/mac/WKView.mm:
(-[WKView _acceleratedCompositingModeRootLayer]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::acceleratedCompositingRootLayer):
Add a getter for the accelerated compositing root layer.

* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize):
Don't extract the CGImageRef from a RetainPtr just to put it back in one.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPreferencesStoreh">trunk/Source/WebKit2/Shared/WebPreferencesStore.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPreferencescpp">trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPreferencesPrivateh">trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKViewPrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosPageClientImplIOSh">trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIiosPageClientImplIOSmm">trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacPageClientImplh">trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacPageClientImplmm">trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewInternalh">trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacViewGestureControllerh">trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacViewGestureControllermessagesin">trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.messages.in</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacViewGestureControllermm">trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacViewSnapshotStoremm">trunk/Source/WebKit2/UIProcess/mac/ViewSnapshotStore.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebPageProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageViewGestureGeometryCollectorcpp">trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageViewGestureGeometryCollectorh">trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageViewGestureGeometryCollectormessagesin">trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -1,3 +1,119 @@
</span><ins>+2014-01-27  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        WebKit2 View Gestures: Fluid back-forward swipe
+        https://bugs.webkit.org/show_bug.cgi?id=127363
+
+        Reviewed by Anders Carlsson.
+
+        Add support for a &quot;back-forward swipe&quot;, which allows fluid swiping between
+        items in the back-forward list. Currently disabled by default.
+
+        * Shared/WebPreferencesStore.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetViewGestureDebuggingEnabled):
+        (WKPreferencesGetViewGestureDebuggingEnabled):
+        * UIProcess/API/C/WKPreferencesPrivate.h:
+        Add a ViewGestureDebuggingEnabled preference, which currently causes snapshots to be blurred.
+        Additional view gesture debugging features could come in the future.
+
+        * UIProcess/API/Cocoa/WKViewPrivate.h:
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _ensureGestureController]):
+        (-[WKView scrollWheel:]):
+        If back-forward navigation gestures are enabled, intercept scrollWheel events
+        on the WKView and let the ViewGestureController take the first crack at them.
+
+        (-[WKView setAllowsBackForwardNavigationGestures:]):
+        (-[WKView allowsBackForwardNavigationGestures]):
+        * UIProcess/API/mac/WKViewInternal.h:
+        Add allowsBackForwardNavigationGesture property, which enables the gesture.
+
+        * UIProcess/mac/ViewGestureController.h:
+        Add swipe-related methods, which will be described below.
+
+        Add an enum for the swipe transition style. Currently only Overlap is accessible,
+        but in the future one could see having API to choose the style.
+        'Overlap' has the outgoing page swipe out to the right (when swiping right)
+        or the incoming page swipe in from the right (when swiping left).
+        'Push' has the pages push each other along in sync, as if all the pages in the
+        back-forward list were oriented from left to right.
+
+        * UIProcess/mac/ViewGestureController.messages.in:
+        * UIProcess/mac/ViewGestureController.mm: Renamed from Source/WebKit2/UIProcess/mac/ViewGestureController.cpp.
+        Use some CAFilter SPI to blur the snapshot if ViewGestureDebuggingEnabled is on.
+
+        (WebKit::ViewGestureController::ViewGestureController):
+        (WebKit::ViewGestureController::~ViewGestureController):
+        (WebKit::ViewGestureController::endMagnificationGesture):
+        Move m_activeGestureType clearing to each end* function instead of one global place,
+        so that each gesture can handle when it ends separately.
+
+        (WebKit::ViewGestureController::handleScrollWheelEvent):
+        If we receive a scroll wheel event which is appropriate for starting a
+        fluid swipe, in a direction where the main frame is pinned to the appropriate
+        edge of the view, start tracking a swipe.
+
+        This should eventually have some hysterisis to avoid stealing scrolls that
+        venture into the wrong direction, but for now it starts tracking immediately.
+
+        Forward events from the tracking loop to {begin, handle, end}SwipeGesture.
+
+        (WebKit::ViewGestureController::beginSwipeGesture):
+        Create a layer with the destination page's snapshot, and set it up.
+
+        (WebKit::ViewGestureController::handleSwipeGesture):
+        Appropriately adjust the position of the root layer and snapshot layer,
+        given the transition style and swipe direction.
+
+        (WebKit::ViewGestureController::endSwipeGesture):
+        When the gesture ends, do the navigation, and tell the WebProcess to
+        inform us when the render tree hits half the size it was when the
+        snapshot was taken (when that happens, we will remove the snapshot
+        and the gesture will be truly complete). Also, start a watchdog timer
+        in case the render tree never hits that size, after which we will
+        also remove the snapshot.
+
+        (WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
+        (WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
+        (WebKit::ViewGestureController::removeSwipeSnapshot):
+        Tear down the swipe snapshot layer, and mark our current gesture as complete.
+
+        (WebKit::ViewGestureController::endActiveGesture):
+        Simplify endActiveGesture; it only has work to do for a pinch-zoom gesture,
+        as those are the only gestures where the user is directly in control of when they end.
+
+        * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
+        (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
+        (WebKit::ViewGestureGeometryCollector::mainFrameDidLayout):
+        (WebKit::ViewGestureGeometryCollector::renderTreeSizeNotificationTimerFired):
+        * WebProcess/WebPage/ViewGestureGeometryCollector.h:
+        (WebKit::ViewGestureGeometryCollector::setRenderTreeSizeNotificationThreshold):
+        * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
+        ViewGestureController pushes a render-tree size threshold to the WebProcess;
+        ViewGestureGeometryCollector (whose name is now more unfortunate than before)
+        monitors render-tree size changes and informs ViewGestureController when
+        it reaches that threshold via the 'DidHitRenderTreeSizeThreshold' message.
+
+        * UIProcess/API/Cocoa/WKViewPrivate.h:
+        * UIProcess/API/ios/PageClientImplIOS.h:
+        * UIProcess/API/ios/PageClientImplIOS.mm:
+        (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
+        * UIProcess/API/mac/PageClientImpl.h:
+        * UIProcess/API/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _acceleratedCompositingModeRootLayer]):
+        * UIProcess/API/mac/WKViewInternal.h:
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/mac/WebPageProxyMac.mm:
+        (WebKit::WebPageProxy::acceleratedCompositingRootLayer):
+        Add a getter for the accelerated compositing root layer.
+
+        * UIProcess/mac/ViewSnapshotStore.mm:
+        (WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize):
+        Don't extract the CGImageRef from a RetainPtr just to put it back in one.
+
</ins><span class="cx"> 2014-01-27  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Implement custom URI schemes with CustomProtocols
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPreferencesStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPreferencesStore.h (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPreferencesStore.h        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/Shared/WebPreferencesStore.h        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -178,6 +178,7 @@
</span><span class="cx">     macro(UseLegacyTextAlignPositionedElementBehavior, useLegacyTextAlignPositionedElementBehavior, Bool, bool, false) \
</span><span class="cx">     macro(SpatialNavigationEnabled, spatialNavigationEnabled, Bool, bool, false) \
</span><span class="cx">     macro(MediaSourceEnabled, mediaSourceEnabled, Bool, bool, false) \
</span><ins>+    macro(ViewGestureDebuggingEnabled, viewGestureDebuggingEnabled, Bool, bool, false) \
</ins><span class="cx">     \
</span><span class="cx"> 
</span><span class="cx"> #define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -1235,3 +1235,13 @@
</span><span class="cx"> {
</span><span class="cx">     return toImpl(preferencesRef)-&gt;mediaSourceEnabled();
</span><span class="cx"> }
</span><ins>+
+void WKPreferencesSetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef, bool enabled)
+{
+    toImpl(preferencesRef)-&gt;setViewGestureDebuggingEnabled(enabled);
+}
+
+bool WKPreferencesGetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef)
+{
+    return toImpl(preferencesRef)-&gt;viewGestureDebuggingEnabled();
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -310,6 +310,10 @@
</span><span class="cx"> WK_EXPORT void WKPreferencesSetMediaSourceEnabled(WKPreferencesRef preferencesRef, bool enabled);
</span><span class="cx"> WK_EXPORT bool WKPreferencesGetMediaSourceEnabled(WKPreferencesRef preferencesRef);
</span><span class="cx"> 
</span><ins>+// Default to false.
+WK_EXPORT void WKPreferencesSetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesGetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef);
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -70,6 +70,7 @@
</span><span class="cx"> @property (readonly, getter=isUsingUISideCompositing) BOOL usingUISideCompositing;
</span><span class="cx"> @property (readwrite) BOOL allowsMagnification;
</span><span class="cx"> @property (readwrite) double magnification;
</span><ins>+@property (readwrite) BOOL allowsBackForwardNavigationGestures;
</ins><span class="cx"> 
</span><span class="cx"> @property(copy, nonatomic) NSColor *underlayColor;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -94,6 +94,7 @@
</span><span class="cx">     virtual void exitAcceleratedCompositingMode() override;
</span><span class="cx">     virtual void updateAcceleratedCompositingMode(const LayerTreeContext&amp;) override;
</span><span class="cx">     virtual void setAcceleratedCompositingRootLayer(CALayer *rootLayer) override;
</span><ins>+    virtual CALayer *acceleratedCompositingRootLayer() const override;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     virtual RetainPtr&lt;CGImageRef&gt; takeViewSnapshot() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -314,6 +314,12 @@
</span><span class="cx"> {
</span><span class="cx">     [m_view _setAcceleratedCompositingRootLayer:rootLayer];
</span><span class="cx"> }
</span><ins>+
+CALayer *PageClientImpl::acceleratedCompositingRootLayer() const
+{
+    notImplemented();
+    return nullptr;
+}
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> RetainPtr&lt;CGImageRef&gt; PageClientImpl::takeViewSnapshot()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx">     virtual LayerHostingMode viewLayerHostingMode() override;
</span><span class="cx">     virtual ColorSpaceData colorSpace() override;
</span><span class="cx">     virtual void setAcceleratedCompositingRootLayer(CALayer *) override;
</span><ins>+    virtual CALayer *acceleratedCompositingRootLayer() const override;
</ins><span class="cx"> 
</span><span class="cx">     virtual void processDidCrash();
</span><span class="cx">     virtual void pageClosed();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -434,6 +434,11 @@
</span><span class="cx">     [m_wkView _setAcceleratedCompositingModeRootLayer:rootLayer];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+CALayer *PageClientImpl::acceleratedCompositingRootLayer() const
+{
+    return m_wkView._acceleratedCompositingModeRootLayer;
+}
+
</ins><span class="cx"> RetainPtr&lt;CGImageRef&gt; PageClientImpl::takeViewSnapshot()
</span><span class="cx"> {
</span><span class="cx">     return [m_wkView _takeViewSnapshot];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -230,6 +230,7 @@
</span><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;ViewGestureController&gt; _gestureController;
</span><span class="cx">     BOOL _allowsMagnification;
</span><ins>+    BOOL _allowsBackForwardNavigationGestures;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @end
</span><span class="lines">@@ -1103,17 +1104,26 @@
</span><span class="cx"> 
</span><span class="cx"> #undef NATIVE_MOUSE_EVENT_HANDLER
</span><span class="cx"> 
</span><del>-#define NATIVE_EVENT_HANDLER(Selector, Type) \
-    - (void)Selector:(NSEvent *)theEvent \
-    { \
-        NativeWeb##Type##Event webEvent = NativeWeb##Type##Event(theEvent, self); \
-        _data-&gt;_page-&gt;handle##Type##Event(webEvent); \
</del><ins>+- (void)_ensureGestureController
+{
+    if (_data-&gt;_gestureController)
+        return;
+
+    _data-&gt;_gestureController = std::make_unique&lt;ViewGestureController&gt;(*_data-&gt;_page);
+}
+
+- (void)scrollWheel:(NSEvent *)event
+{
+    if (_data-&gt;_allowsBackForwardNavigationGestures) {
+        [self _ensureGestureController];
+        if (_data-&gt;_gestureController-&gt;handleScrollWheelEvent(event))
+            return;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-NATIVE_EVENT_HANDLER(scrollWheel, Wheel)
</del><ins>+    NativeWebWheelEvent webEvent = NativeWebWheelEvent(event, self);
+    _data-&gt;_page-&gt;handleWheelEvent(webEvent);
+}
</ins><span class="cx"> 
</span><del>-#undef NATIVE_EVENT_HANDLER
-
</del><span class="cx"> - (void)mouseMoved:(NSEvent *)event
</span><span class="cx"> {
</span><span class="cx">     // When a view is first responder, it gets mouse moved events even when the mouse is outside its visible rect.
</span><span class="lines">@@ -2471,6 +2481,11 @@
</span><span class="cx">     _data-&gt;_findIndicatorWindow-&gt;setFindIndicator(findIndicator, fadeOut, animate);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (CALayer *)_rootLayer
+{
+    return [_data-&gt;_layerHostingView layer];
+}
+
</ins><span class="cx"> - (void)_setAcceleratedCompositingModeRootLayer:(CALayer *)rootLayer
</span><span class="cx"> {
</span><span class="cx">     [CATransaction begin];
</span><span class="lines">@@ -2510,6 +2525,16 @@
</span><span class="cx">     [CATransaction commit];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (CALayer *)_acceleratedCompositingModeRootLayer
+{
+    NSView *hostView = _data-&gt;_layerHostingView.get();
+
+    if (!hostView)
+        return nullptr;
+
+    return hostView.layer;
+}
+
</ins><span class="cx"> - (RetainPtr&lt;CGImageRef&gt;)_takeViewSnapshot
</span><span class="cx"> {
</span><span class="cx">     NSWindow *window = self.window;
</span><span class="lines">@@ -3221,14 +3246,6 @@
</span><span class="cx">     return NO;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_ensureGestureController
-{
-    if (_data-&gt;_gestureController)
-        return;
-
-    _data-&gt;_gestureController = std::make_unique&lt;ViewGestureController&gt;(*_data-&gt;_page);
-}
-
</del><span class="cx"> - (void)setAllowsMagnification:(BOOL)allowsMagnification
</span><span class="cx"> {
</span><span class="cx">     _data-&gt;_allowsMagnification = allowsMagnification;
</span><span class="lines">@@ -3239,6 +3256,17 @@
</span><span class="cx">     return _data-&gt;_allowsMagnification;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)setAllowsBackForwardNavigationGestures:(BOOL)allowsBackForwardNavigationGestures
+{
+    _data-&gt;_allowsBackForwardNavigationGestures = allowsBackForwardNavigationGestures;
+    _data-&gt;_page-&gt;setShouldRecordNavigationSnapshots(allowsBackForwardNavigationGestures);
+}
+
+- (BOOL)allowsBackForwardNavigationGestures
+{
+    return _data-&gt;_allowsBackForwardNavigationGestures;
+}
+
</ins><span class="cx"> - (void)magnifyWithEvent:(NSEvent *)event
</span><span class="cx"> {
</span><span class="cx">     if (!_data-&gt;_allowsMagnification) {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx"> - (void)_setFindIndicator:(PassRefPtr&lt;WebKit::FindIndicator&gt;)findIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate;
</span><span class="cx"> 
</span><span class="cx"> - (void)_setAcceleratedCompositingModeRootLayer:(CALayer *)rootLayer;
</span><ins>+- (CALayer *)_acceleratedCompositingModeRootLayer;
</ins><span class="cx"> 
</span><span class="cx"> - (RetainPtr&lt;CGImageRef&gt;)_takeViewSnapshot;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -172,6 +172,7 @@
</span><span class="cx">     virtual void notifyInputContextAboutDiscardedComposition() = 0;
</span><span class="cx">     virtual void makeFirstResponder() = 0;
</span><span class="cx">     virtual void setAcceleratedCompositingRootLayer(CALayer *) = 0;
</span><ins>+    virtual CALayer *acceleratedCompositingRootLayer() const = 0;
</ins><span class="cx">     virtual RetainPtr&lt;CGImageRef&gt; takeViewSnapshot() = 0;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -499,6 +499,7 @@
</span><span class="cx">     bool acceptsFirstMouse(int eventNumber, const WebMouseEvent&amp;);
</span><span class="cx"> 
</span><span class="cx">     void setAcceleratedCompositingRootLayer(PlatformLayer* rootLayer);
</span><ins>+    PlatformLayer* acceleratedCompositingRootLayer() const;
</ins><span class="cx"> 
</span><span class="cx"> #if USE(APPKIT)
</span><span class="cx">     WKView* wkView() const;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacViewGestureControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -26,11 +26,19 @@
</span><span class="cx"> #ifndef ViewGestureController_h
</span><span class="cx"> #define ViewGestureController_h
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
+
</ins><span class="cx"> #include &quot;MessageReceiver.h&quot;
</span><span class="cx"> #include &lt;WebCore/FloatRect.h&gt;
</span><ins>+#include &lt;WebCore/Timer.h&gt;
+#include &lt;wtf/RetainPtr.h&gt;
</ins><span class="cx"> 
</span><ins>+OBJC_CLASS CALayer;
+OBJC_CLASS NSEvent;
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><ins>+class WebBackForwardListItem;
</ins><span class="cx"> class WebPageProxy;
</span><span class="cx"> 
</span><span class="cx"> class ViewGestureController : private IPC::MessageReceiver {
</span><span class="lines">@@ -44,14 +52,23 @@
</span><span class="cx">     void handleMagnificationGesture(double scale, WebCore::FloatPoint origin);
</span><span class="cx">     void handleSmartMagnificationGesture(WebCore::FloatPoint origin);
</span><span class="cx"> 
</span><ins>+    bool handleScrollWheelEvent(NSEvent *);
+    void didHitRenderTreeSizeThreshold();
+
</ins><span class="cx">     void endActiveGesture();
</span><span class="cx"> 
</span><span class="cx">     enum class ViewGestureType {
</span><span class="cx">         None,
</span><span class="cx">         Magnification,
</span><span class="cx">         SmartMagnification,
</span><ins>+        Swipe
</ins><span class="cx">     };
</span><span class="cx"> 
</span><ins>+    enum class SwipeTransitionStyle {
+        Overlap,
+        Push
+    };
+
</ins><span class="cx"> private:
</span><span class="cx">     // IPC::MessageReceiver.
</span><span class="cx">     virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&amp;) override;
</span><span class="lines">@@ -63,6 +80,12 @@
</span><span class="cx">     void endMagnificationGesture();
</span><span class="cx">     WebCore::FloatPoint scaledMagnificationOrigin(WebCore::FloatPoint origin, double scale);
</span><span class="cx"> 
</span><ins>+    void beginSwipeGesture(WebBackForwardListItem* targetItem, bool swipingLeft);
+    void handleSwipeGesture(WebBackForwardListItem* targetItem, double progress, bool swipingLeft);
+    void endSwipeGesture(WebBackForwardListItem* targetItem, bool cancelled);
+    void removeSwipeSnapshot();
+    void swipeSnapshotWatchdogTimerFired(WebCore::Timer&lt;ViewGestureController&gt;*);
+
</ins><span class="cx">     WebPageProxy&amp; m_webPageProxy;
</span><span class="cx"> 
</span><span class="cx">     double m_magnification;
</span><span class="lines">@@ -76,8 +99,14 @@
</span><span class="cx">     WebCore::FloatRect m_visibleContentRect;
</span><span class="cx">     bool m_visibleContentRectIsValid;
</span><span class="cx">     bool m_frameHandlesMagnificationGesture;
</span><ins>+
+    RetainPtr&lt;CALayer&gt; m_swipeSnapshotLayer;
+    SwipeTransitionStyle m_swipeTransitionStyle;
+    WebCore::Timer&lt;ViewGestureController&gt; m_swipeWatchdogTimer;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><ins>+#endif // !PLATFORM(IOS)
+
</ins><span class="cx"> #endif // ViewGestureController_h
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacViewGestureControllermessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.messages.in (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.messages.in        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.messages.in        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -20,7 +20,12 @@
</span><span class="cx"> # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
</span><span class="cx"> # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
+
</ins><span class="cx"> messages -&gt; ViewGestureController {
</span><span class="cx">     DidCollectGeometryForMagnificationGesture(WebCore::FloatRect visibleContentBounds, bool frameHandlesMagnificationGesture)
</span><span class="cx">     DidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool isReplacedElement, bool frameHandlesMagnificationGesture)
</span><ins>+    DidHitRenderTreeSizeThreshold()
</ins><span class="cx"> }
</span><ins>+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacViewGestureControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.mm (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.mm        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.mm        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -26,11 +26,34 @@
</span><span class="cx"> #import &quot;config.h&quot;
</span><span class="cx"> #import &quot;ViewGestureController.h&quot;
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
+
+#import &quot;WebPageGroup.h&quot;
</ins><span class="cx"> #import &quot;ViewGestureControllerMessages.h&quot;
</span><span class="cx"> #import &quot;ViewGestureGeometryCollectorMessages.h&quot;
</span><ins>+#import &quot;ViewSnapshotStore.h&quot;
+#import &quot;WebBackForwardList.h&quot;
+#import &quot;WebPageMessages.h&quot;
</ins><span class="cx"> #import &quot;WebPageProxy.h&quot;
</span><ins>+#import &quot;WebPreferences.h&quot;
</ins><span class="cx"> #import &quot;WebProcessProxy.h&quot;
</span><ins>+#import &lt;Cocoa/Cocoa.h&gt;
+#import &lt;QuartzCore/QuartzCore.h&gt;
+#import &lt;WebCore/WebCoreCALayerExtras.h&gt;
</ins><span class="cx"> 
</span><ins>+#if defined(__has_include) &amp;&amp; __has_include(&lt;QuartzCore/QuartzCorePrivate.h&gt;)
+#import &lt;QuartzCore/QuartzCorePrivate.h&gt;
+#else
+@interface CAFilter : NSObject &lt;NSCopying, NSMutableCopying, NSCoding&gt;
+@end
+#endif
+
+@interface CAFilter (Details)
++ (CAFilter *)filterWithType:(NSString *)type;
+@end
+
+extern NSString * const kCAFilterGaussianBlur;
+
</ins><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><span class="cx"> static const double minMagnification = 1;
</span><span class="lines">@@ -45,6 +68,12 @@
</span><span class="cx"> static const float smartMagnificationElementPadding = 0.05;
</span><span class="cx"> static const float smartMagnificationPanScrollThreshold = 100;
</span><span class="cx"> 
</span><ins>+static const double swipeOverlayShadowOpacity = 0.66;
+static const double swipeOverlayShadowRadius = 3;
+
+static const float swipeSnapshotRemovalRenderTreeSizeTargetFraction = 0.5;
+static const std::chrono::seconds swipeSnapshotRemovalWatchdogDuration = 3_s;
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> ViewGestureController::ViewGestureController(WebPageProxy&amp; webPageProxy)
</span><span class="lines">@@ -53,6 +82,8 @@
</span><span class="cx">     , m_activeGestureType(ViewGestureType::None)
</span><span class="cx">     , m_visibleContentRectIsValid(false)
</span><span class="cx">     , m_frameHandlesMagnificationGesture(false)
</span><ins>+    , m_swipeTransitionStyle(SwipeTransitionStyle::Overlap)
+    , m_swipeWatchdogTimer(this, &amp;ViewGestureController::swipeSnapshotWatchdogTimerFired)
</ins><span class="cx"> {
</span><span class="cx">     m_webPageProxy.process().addMessageReceiver(Messages::ViewGestureController::messageReceiverName(), m_webPageProxy.pageID(), *this);
</span><span class="cx"> }
</span><span class="lines">@@ -139,6 +170,8 @@
</span><span class="cx">         m_webPageProxy.scalePage(newMagnification, roundedIntPoint(m_magnificationOrigin));
</span><span class="cx">     else
</span><span class="cx">         m_webPageProxy.drawingArea()-&gt;commitTransientZoom(newMagnification, scaledMagnificationOrigin(m_magnificationOrigin, newMagnification));
</span><ins>+
+    m_activeGestureType = ViewGestureType::None;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ViewGestureController::handleSmartMagnificationGesture(FloatPoint origin)
</span><span class="lines">@@ -194,20 +227,177 @@
</span><span class="cx">     m_lastSmartMagnificationUnscaledTargetRectIsValid = true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ViewGestureController::endActiveGesture()
</del><ins>+bool ViewGestureController::handleScrollWheelEvent(NSEvent *event)
</ins><span class="cx"> {
</span><del>-    switch (m_activeGestureType) {
-    case ViewGestureType::None:
-    case ViewGestureType::SmartMagnification:
-        break;
-    case ViewGestureType::Magnification:
-        endMagnificationGesture();
</del><ins>+    if (m_activeGestureType != ViewGestureType::None)
+        return false;
+
+    if (event.phase != NSEventPhaseBegan)
+        return false;
+
+    if (fabs(event.scrollingDeltaX) &lt; fabs(event.scrollingDeltaY))
+        return false;
+
+    bool willSwipeLeft = event.scrollingDeltaX &gt; 0 &amp;&amp; m_webPageProxy.isPinnedToLeftSide() &amp;&amp; m_webPageProxy.backForwardList().backItem();
+    bool willSwipeRight = event.scrollingDeltaX &lt; 0 &amp;&amp; m_webPageProxy.isPinnedToRightSide() &amp;&amp; m_webPageProxy.backForwardList().forwardItem();
+    if (!willSwipeLeft &amp;&amp; !willSwipeRight)
+        return false;
+
+    if (!event.hasPreciseScrollingDeltas)
+        return false;
+
+    if (![NSEvent isSwipeTrackingFromScrollEventsEnabled])
+        return false;
+
+    ViewSnapshotStore::shared().recordSnapshot(m_webPageProxy);
+
+    CGFloat maxProgress = willSwipeLeft ? 1 : 0;
+    CGFloat minProgress = willSwipeRight ? -1 : 0;
+    RefPtr&lt;WebBackForwardListItem&gt; targetItem = willSwipeLeft ? m_webPageProxy.backForwardList().backItem() : m_webPageProxy.backForwardList().forwardItem();
+    __block bool swipeCancelled = false;
+
+    [event trackSwipeEventWithOptions:0 dampenAmountThresholdMin:minProgress max:maxProgress usingHandler:^(CGFloat progress, NSEventPhase phase, BOOL isComplete, BOOL *stop) {
+        if (phase == NSEventPhaseBegan)
+            this-&gt;beginSwipeGesture(targetItem.get(), willSwipeLeft);
+        CGFloat clampedProgress = std::min(std::max(progress, minProgress), maxProgress);
+        this-&gt;handleSwipeGesture(targetItem.get(), clampedProgress, willSwipeLeft);
+        if (phase == NSEventPhaseCancelled)
+            swipeCancelled = true;
+        if (isComplete)
+            this-&gt;endSwipeGesture(targetItem.get(), swipeCancelled);
+    }];
+
+    return true;
+}
+
+void ViewGestureController::beginSwipeGesture(WebBackForwardListItem* targetItem, bool swipingLeft)
+{
+    m_activeGestureType = ViewGestureType::Swipe;
+
+    CALayer *rootLayer = m_webPageProxy.acceleratedCompositingRootLayer();
+
+    m_swipeSnapshotLayer = adoptNS([[CALayer alloc] init]);
+    [m_swipeSnapshotLayer setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
+
+    RetainPtr&lt;CGImageRef&gt; snapshot = ViewSnapshotStore::shared().snapshotAndRenderTreeSize(targetItem).first;
+    [m_swipeSnapshotLayer setContents:(id)snapshot.get()];
+    [m_swipeSnapshotLayer setContentsGravity:kCAGravityTopLeft];
+    [m_swipeSnapshotLayer setContentsScale:m_webPageProxy.deviceScaleFactor()];
+    [m_swipeSnapshotLayer setFrame:rootLayer.frame];
+    [m_swipeSnapshotLayer setAnchorPoint:CGPointZero];
+    [m_swipeSnapshotLayer setPosition:CGPointZero];
+    [m_swipeSnapshotLayer setName:@&quot;Gesture Swipe Snapshot Layer&quot;];
+    [m_swipeSnapshotLayer web_disableAllActions];
+
+    if (m_webPageProxy.pageGroup().preferences()-&gt;viewGestureDebuggingEnabled()) {
+        CAFilter* filter = [CAFilter filterWithType:kCAFilterGaussianBlur];
+        [filter setValue:[NSNumber numberWithFloat:3] forKey:@&quot;inputRadius&quot;];
+        [m_swipeSnapshotLayer setFilters:@[filter]];
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_visibleContentRectIsValid = false;
</del><ins>+    if (m_swipeTransitionStyle == SwipeTransitionStyle::Overlap) {
+        RetainPtr&lt;CGPathRef&gt; shadowPath = adoptCF(CGPathCreateWithRect([rootLayer bounds], 0));
+
+        [m_swipeSnapshotLayer setShadowColor:CGColorGetConstantColor(kCGColorBlack)];
+        [m_swipeSnapshotLayer setShadowOpacity:swipeOverlayShadowOpacity];
+        [m_swipeSnapshotLayer setShadowRadius:swipeOverlayShadowRadius];
+        [m_swipeSnapshotLayer setShadowPath:shadowPath.get()];
+
+        [rootLayer setShadowColor:CGColorGetConstantColor(kCGColorBlack)];
+        [rootLayer setShadowOpacity:swipeOverlayShadowOpacity];
+        [rootLayer setShadowRadius:swipeOverlayShadowRadius];
+        [rootLayer setShadowPath:shadowPath.get()];
+    }
+
+    if (swipingLeft)
+        [rootLayer.superlayer insertSublayer:m_swipeSnapshotLayer.get() below:rootLayer];
+    else
+        [rootLayer.superlayer insertSublayer:m_swipeSnapshotLayer.get() above:rootLayer];
+}
+
+void ViewGestureController::handleSwipeGesture(WebBackForwardListItem* targetItem, double progress, bool swipingLeft)
+{
+    ASSERT(m_activeGestureType == ViewGestureType::Swipe);
+
+    CALayer *rootLayer = m_webPageProxy.acceleratedCompositingRootLayer();
+    double width = rootLayer.bounds.size.width;
+    double swipingLayerOffset = floor(width * progress);
+
+    if (m_swipeTransitionStyle == SwipeTransitionStyle::Overlap) {
+        if (swipingLeft)
+            [rootLayer setPosition:CGPointMake(swipingLayerOffset, 0)];
+        else
+            [m_swipeSnapshotLayer setPosition:CGPointMake(width + swipingLayerOffset, 0)];
+    } else if (m_swipeTransitionStyle == SwipeTransitionStyle::Push) {
+        [rootLayer setPosition:CGPointMake(swipingLayerOffset, 0)];
+        [m_swipeSnapshotLayer setPosition:CGPointMake((swipingLeft ? -width : width) + swipingLayerOffset, 0)];
+    }
+}
+
+void ViewGestureController::endSwipeGesture(WebBackForwardListItem* targetItem, bool cancelled)
+{
+    ASSERT(m_activeGestureType == ViewGestureType::Swipe);
+
+    CALayer *rootLayer = m_webPageProxy.acceleratedCompositingRootLayer();
+
+    [rootLayer setShadowOpacity:0];
+    [rootLayer setShadowRadius:0];
+
+    if (cancelled) {
+        removeSwipeSnapshot();
+        return;
+    }
+
+    uint64_t renderTreeSize = ViewSnapshotStore::shared().snapshotAndRenderTreeSize(targetItem).second;
+    m_webPageProxy.process().send(Messages::ViewGestureGeometryCollector::SetRenderTreeSizeNotificationThreshold(renderTreeSize * swipeSnapshotRemovalRenderTreeSizeTargetFraction), m_webPageProxy.pageID());
+
+    // We don't want to replace the current back-forward item's snapshot
+    // like we normally would when going back or forward, because we are
+    // displaying the destination item's snapshot.
+    ViewSnapshotStore::shared().disableSnapshotting();
+    m_webPageProxy.goToBackForwardItem(targetItem);
+    ViewSnapshotStore::shared().enableSnapshotting();
+
+    if (!renderTreeSize) {
+        removeSwipeSnapshot();
+        return;
+    }
+
+    m_swipeWatchdogTimer.startOneShot(swipeSnapshotRemovalWatchdogDuration.count());
+}
+
+void ViewGestureController::didHitRenderTreeSizeThreshold()
+{
+    removeSwipeSnapshot();
+}
+
+void ViewGestureController::swipeSnapshotWatchdogTimerFired(WebCore::Timer&lt;ViewGestureController&gt;*)
+{
+    removeSwipeSnapshot();
+}
+
+void ViewGestureController::removeSwipeSnapshot()
+{
+    m_swipeWatchdogTimer.stop();
+
+    if (m_activeGestureType != ViewGestureType::Swipe)
+        return;
+
+    [m_webPageProxy.acceleratedCompositingRootLayer() setPosition:CGPointZero];
+    [m_swipeSnapshotLayer removeFromSuperlayer];
+    m_swipeSnapshotLayer = nullptr;
+
</ins><span class="cx">     m_activeGestureType = ViewGestureType::None;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void ViewGestureController::endActiveGesture()
+{
+    if (m_activeGestureType == ViewGestureType::Magnification) {
+        endMagnificationGesture();
+        m_visibleContentRectIsValid = false;
+    }
+}
+
</ins><span class="cx"> double ViewGestureController::magnification() const
</span><span class="cx"> {
</span><span class="cx">     if (m_activeGestureType == ViewGestureType::Magnification)
</span><span class="lines">@@ -217,3 +407,5 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><ins>+
+#endif // !PLATFORM(IOS)
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacViewSnapshotStoremm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/ViewSnapshotStore.mm (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/ViewSnapshotStore.mm        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewSnapshotStore.mm        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">     if (snapshotAndRenderTreeSize == m_snapshotMap.end())
</span><span class="cx">         return std::make_pair(nullptr, 0);
</span><span class="cx"> 
</span><del>-    return std::make_pair(snapshotAndRenderTreeSize-&gt;value.first.get(), snapshotAndRenderTreeSize-&gt;value.second);
</del><ins>+    return snapshotAndRenderTreeSize-&gt;value;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -459,6 +459,11 @@
</span><span class="cx">     m_pageClient.setAcceleratedCompositingRootLayer(rootLayer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+PlatformLayer* WebPageProxy::acceleratedCompositingRootLayer() const
+{
+    return m_pageClient.acceleratedCompositingRootLayer();
+}
+
</ins><span class="cx"> static NSString *temporaryPDFDirectoryPath()
</span><span class="cx"> {
</span><span class="cx">     static NSString *temporaryPDFDirectoryPath;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageViewGestureGeometryCollectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.cpp        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;ViewGestureGeometryCollector.h&quot;
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
+
</ins><span class="cx"> #include &quot;ViewGestureControllerMessages.h&quot;
</span><span class="cx"> #include &quot;ViewGestureGeometryCollectorMessages.h&quot;
</span><span class="cx"> #include &quot;WebCoreArgumentCoders.h&quot;
</span><span class="lines">@@ -42,6 +44,8 @@
</span><span class="cx"> 
</span><span class="cx"> ViewGestureGeometryCollector::ViewGestureGeometryCollector(WebPage&amp; webPage)
</span><span class="cx">     : m_webPage(webPage)
</span><ins>+    , m_renderTreeSizeNotificationThreshold(0)
+    , m_renderTreeSizeNotificationTimer(RunLoop::main(), this, &amp;ViewGestureGeometryCollector::renderTreeSizeNotificationTimerFired)
</ins><span class="cx"> {
</span><span class="cx">     WebProcess::shared().addMessageReceiver(Messages::ViewGestureGeometryCollector::messageReceiverName(), m_webPage.pageID(), *this);
</span><span class="cx"> }
</span><span class="lines">@@ -77,4 +81,19 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void ViewGestureGeometryCollector::mainFrameDidLayout()
+{
+    if (m_renderTreeSizeNotificationThreshold &amp;&amp; m_webPage.renderTreeSize() &gt;= m_renderTreeSizeNotificationThreshold) {
+        m_renderTreeSizeNotificationTimer.startOneShot(0);
+        m_renderTreeSizeNotificationThreshold = 0;
+    }
+}
+
+void ViewGestureGeometryCollector::renderTreeSizeNotificationTimerFired()
+{
+    m_webPage.send(Messages::ViewGestureController::DidHitRenderTreeSizeThreshold());
+}
+
</ins><span class="cx"> } // namespace WebKit
</span><ins>+
+#endif // !PLATFORM(IOS)
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageViewGestureGeometryCollectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -26,7 +26,10 @@
</span><span class="cx"> #ifndef ViewGestureGeometryCollector_h
</span><span class="cx"> #define ViewGestureGeometryCollector_h
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
+
</ins><span class="cx"> #include &quot;MessageReceiver.h&quot;
</span><ins>+#include &lt;WTF/RunLoop.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> class FloatPoint;
</span><span class="lines">@@ -41,6 +44,8 @@
</span><span class="cx">     ViewGestureGeometryCollector(WebPage&amp;);
</span><span class="cx">     ~ViewGestureGeometryCollector();
</span><span class="cx"> 
</span><ins>+    void mainFrameDidLayout();
+
</ins><span class="cx"> private:
</span><span class="cx">     // IPC::MessageReceiver.
</span><span class="cx">     virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&amp;) override;
</span><span class="lines">@@ -48,10 +53,18 @@
</span><span class="cx">     // Message handlers.
</span><span class="cx">     void collectGeometryForMagnificationGesture();
</span><span class="cx">     void collectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin);
</span><ins>+    void setRenderTreeSizeNotificationThreshold(uint64_t size) { m_renderTreeSizeNotificationThreshold = size; }
</ins><span class="cx"> 
</span><ins>+    void renderTreeSizeNotificationTimerFired();
+
</ins><span class="cx">     WebPage&amp; m_webPage;
</span><ins>+
+    uint64_t m_renderTreeSizeNotificationThreshold;
+    RunLoop::Timer&lt;ViewGestureGeometryCollector&gt; m_renderTreeSizeNotificationTimer;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><ins>+#endif // !PLATFORM(IOS)
+
</ins><span class="cx"> #endif // ViewGestureGeometryCollector
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageViewGestureGeometryCollectormessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.messages.in (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.messages.in        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.messages.in        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -20,9 +20,14 @@
</span><span class="cx"> # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
</span><span class="cx"> # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
+
</ins><span class="cx"> messages -&gt; ViewGestureGeometryCollector {
</span><span class="cx"> 
</span><span class="cx"> CollectGeometryForMagnificationGesture()
</span><span class="cx"> CollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin)
</span><span class="cx"> 
</span><ins>+SetRenderTreeSizeNotificationThreshold(uint64_t size)
</ins><span class="cx"> }
</span><ins>+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -248,7 +248,9 @@
</span><span class="cx">     , m_pdfPluginEnabled(false)
</span><span class="cx">     , m_hasCachedWindowFrame(false)
</span><span class="cx">     , m_keyboardEventBeingInterpreted(0)
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     , m_viewGestureGeometryCollector(*this)
</span><ins>+#endif
</ins><span class="cx"> #elif PLATFORM(GTK) &amp;&amp; HAVE(ACCESSIBILITY)
</span><span class="cx">     , m_accessibilityObject(0)
</span><span class="cx"> #endif
</span><span class="lines">@@ -3057,6 +3059,10 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><ins>+
+#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
+    m_viewGestureGeometryCollector.mainFrameDidLayout();
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::addPluginView(PluginView* pluginView)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (162852 => 162853)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-01-27 20:04:50 UTC (rev 162852)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-01-27 20:21:21 UTC (rev 162853)
</span><span class="lines">@@ -943,7 +943,9 @@
</span><span class="cx"> 
</span><span class="cx">     WebCore::KeyboardEvent* m_keyboardEventBeingInterpreted;
</span><span class="cx"> 
</span><ins>+#if !PLATFORM(IOS)
</ins><span class="cx">     ViewGestureGeometryCollector m_viewGestureGeometryCollector;
</span><ins>+#endif
</ins><span class="cx"> 
</span><span class="cx"> #elif HAVE(ACCESSIBILITY) &amp;&amp; (PLATFORM(GTK) || PLATFORM(EFL))
</span><span class="cx">     GRefPtr&lt;WebPageAccessibilityObject&gt; m_accessibilityObject;
</span></span></pre>
</div>
</div>

</body>
</html>