<!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>[167172] trunk/Source</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/167172">167172</a></dd>
<dt>Author</dt> <dd>bdakin@apple.com</dd>
<dt>Date</dt> <dd>2014-04-11 16:51:36 -0700 (Fri, 11 Apr 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Need WK2 API to disable rubber-banding
https://bugs.webkit.org/show_bug.cgi?id=131567
Reviewed by Simon Fraser.
Source/WebCore:
Page will now store a vertical and horizontal ScrollElasticity in case the API has
been called before the FrameView even exists.
New Page functions.
* WebCore.exp.in:
Use Page’s cached ScrollElasticity.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
If there is already a FrameView, then assign it the new ScrollElasticity.
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setVerticalScrollElasticity):
(WebCore::Page::setHorizontalScrollElasticity):
* page/Page.h:
(WebCore::Page::verticalScrollElasticity):
(WebCore::Page::horizontalScrollElasticity):
Source/WebKit2:
New API allows the client to enable/disable horizontal or vertical rubber-banding.
By default, rubber-banding is enabled.
* UIProcess/API/C/WKPage.cpp:
(WKPageVerticalRubberBandingIsEnabled):
(WKPageSetEnableVerticalRubberBanding):
(WKPageHorizontalRubberBandingIsEnabled):
(WKPageSetEnableHorizontalRubberBanding):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setEnableVerticalRubberBanding):
(WebKit::WebPageProxy::verticalRubberBandingIsEnabled):
(WebKit::WebPageProxy::setEnableHorizontalRubberBanding):
(WebKit::WebPageProxy::horizontalRubberBandingIsEnabled):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setEnableVerticalRubberBanding):
(WebKit::WebPage::setEnableHorizontalRubberBanding):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageh">trunk/Source/WebCore/page/Page.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPageh">trunk/Source/WebKit2/UIProcess/API/C/WKPage.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</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>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167171 => 167172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-11 23:50:03 UTC (rev 167171)
+++ trunk/Source/WebCore/ChangeLog        2014-04-11 23:51:36 UTC (rev 167172)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2014-04-11 Beth Dakin <bdakin@apple.com>
+
+ Need WK2 API to disable rubber-banding
+ https://bugs.webkit.org/show_bug.cgi?id=131567
+
+ Reviewed by Simon Fraser.
+
+ Page will now store a vertical and horizontal ScrollElasticity in case the API has
+ been called before the FrameView even exists.
+
+ New Page functions.
+ * WebCore.exp.in:
+
+ Use Page’s cached ScrollElasticity.
+ * page/FrameView.cpp:
+ (WebCore::FrameView::FrameView):
+
+ If there is already a FrameView, then assign it the new ScrollElasticity.
+ * page/Page.cpp:
+ (WebCore::Page::Page):
+ (WebCore::Page::setVerticalScrollElasticity):
+ (WebCore::Page::setHorizontalScrollElasticity):
+ * page/Page.h:
+ (WebCore::Page::verticalScrollElasticity):
+ (WebCore::Page::horizontalScrollElasticity):
+
</ins><span class="cx"> 2014-04-11 Martin Robinson <mrobinson@igalia.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION(167145): Many media tests fail
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (167171 => 167172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-04-11 23:50:03 UTC (rev 167171)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-04-11 23:51:36 UTC (rev 167172)
</span><span class="lines">@@ -1073,7 +1073,9 @@
</span><span class="cx"> __ZN7WebCore4Page25suspendScriptedAnimationsEv
</span><span class="cx"> __ZN7WebCore4Page27enableLegacyPrivateBrowsingEb
</span><span class="cx"> __ZN7WebCore4Page27invalidateStylesForAllLinksEv
</span><ins>+__ZN7WebCore4Page27setVerticalScrollElasticityENS_16ScrollElasticityE
</ins><span class="cx"> __ZN7WebCore4Page27setZoomedOutPageScaleFactorEf
</span><ins>+__ZN7WebCore4Page29setHorizontalScrollElasticityENS_16ScrollElasticityE
</ins><span class="cx"> __ZN7WebCore4Page32setMemoryCacheClientCallsEnabledEb
</span><span class="cx"> __ZN7WebCore4Page33synchronousScrollingReasonsAsTextEv
</span><span class="cx"> __ZN7WebCore4Page35resumeActiveDOMObjectsAndAnimationsEv
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (167171 => 167172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-04-11 23:50:03 UTC (rev 167171)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-04-11 23:51:36 UTC (rev 167172)
</span><span class="lines">@@ -193,8 +193,8 @@
</span><span class="cx"> init();
</span><span class="cx">
</span><span class="cx"> if (frame.isMainFrame()) {
</span><del>- ScrollableArea::setVerticalScrollElasticity(ScrollElasticityAllowed);
- ScrollableArea::setHorizontalScrollElasticity(ScrollElasticityAllowed);
</del><ins>+ ScrollableArea::setVerticalScrollElasticity(m_frame->page() ? m_frame->page()->verticalScrollElasticity() : ScrollElasticityAllowed);
+ ScrollableArea::setHorizontalScrollElasticity(m_frame->page() ? m_frame->page()->horizontalScrollElasticity() : ScrollElasticityAllowed);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (167171 => 167172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2014-04-11 23:50:03 UTC (rev 167171)
+++ trunk/Source/WebCore/page/Page.cpp        2014-04-11 23:51:36 UTC (rev 167172)
</span><span class="lines">@@ -162,6 +162,8 @@
</span><span class="cx"> , m_deviceScaleFactor(1)
</span><span class="cx"> , m_topContentInset(0)
</span><span class="cx"> , m_suppressScrollbarAnimations(false)
</span><ins>+ , m_verticalScrollElasticity(ScrollElasticityAllowed)
+ , m_horizontalScrollElasticity(ScrollElasticityAllowed)
</ins><span class="cx"> , m_didLoadUserStyleSheet(false)
</span><span class="cx"> , m_userStyleSheetModificationTime(0)
</span><span class="cx"> , m_group(0)
</span><span class="lines">@@ -811,6 +813,28 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+
+void Page::setVerticalScrollElasticity(ScrollElasticity elasticity)
+{
+ if (m_verticalScrollElasticity == elasticity)
+ return;
+
+ m_verticalScrollElasticity = elasticity;
+
+ if (FrameView* view = mainFrame().view())
+ view->setVerticalScrollElasticity(elasticity);
+}
+
+void Page::setHorizontalScrollElasticity(ScrollElasticity elasticity)
+{
+ if (m_horizontalScrollElasticity == elasticity)
+ return;
+
+ m_horizontalScrollElasticity = elasticity;
+
+ if (FrameView* view = mainFrame().view())
+ view->setHorizontalScrollElasticity(elasticity);
+}
</ins><span class="cx">
</span><span class="cx"> void Page::setPagination(const Pagination& pagination)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (167171 => 167172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.h        2014-04-11 23:50:03 UTC (rev 167171)
+++ trunk/Source/WebCore/page/Page.h        2014-04-11 23:51:36 UTC (rev 167172)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "Pagination.h"
</span><span class="cx"> #include "PlatformScreen.h"
</span><span class="cx"> #include "Region.h"
</span><ins>+#include "ScrollTypes.h"
</ins><span class="cx"> #include "SessionID.h"
</span><span class="cx"> #include "Supplementable.h"
</span><span class="cx"> #include "ViewState.h"
</span><span class="lines">@@ -287,7 +288,13 @@
</span><span class="cx"> bool shouldSuppressScrollbarAnimations() const { return m_suppressScrollbarAnimations; }
</span><span class="cx"> void setShouldSuppressScrollbarAnimations(bool suppressAnimations);
</span><span class="cx"> void lockAllOverlayScrollbarsToHidden(bool lockOverlayScrollbars);
</span><ins>+
+ void setVerticalScrollElasticity(ScrollElasticity);
+ ScrollElasticity verticalScrollElasticity() const { return static_cast<ScrollElasticity>(m_verticalScrollElasticity); }
</ins><span class="cx">
</span><ins>+ void setHorizontalScrollElasticity(ScrollElasticity);
+ ScrollElasticity horizontalScrollElasticity() const { return static_cast<ScrollElasticity>(m_horizontalScrollElasticity); }
+
</ins><span class="cx"> // Page and FrameView both store a Pagination value. Page::pagination() is set only by API,
</span><span class="cx"> // and FrameView::pagination() is set only by CSS. Page::pagination() will affect all
</span><span class="cx"> // FrameViews in the page cache, but FrameView::pagination() only affects the current
</span><span class="lines">@@ -499,6 +506,9 @@
</span><span class="cx"> float m_topContentInset;
</span><span class="cx">
</span><span class="cx"> bool m_suppressScrollbarAnimations;
</span><ins>+
+ unsigned m_verticalScrollElasticity : 2; // ScrollElasticity
+ unsigned m_horizontalScrollElasticity : 2; // ScrollElasticity
</ins><span class="cx">
</span><span class="cx"> Pagination m_pagination;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (167171 => 167172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-04-11 23:50:03 UTC (rev 167171)
+++ trunk/Source/WebKit2/ChangeLog        2014-04-11 23:51:36 UTC (rev 167172)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2014-04-11 Beth Dakin <bdakin@apple.com>
+
+ Need WK2 API to disable rubber-banding
+ https://bugs.webkit.org/show_bug.cgi?id=131567
+
+ Reviewed by Simon Fraser.
+
+ New API allows the client to enable/disable horizontal or vertical rubber-banding.
+ By default, rubber-banding is enabled.
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageVerticalRubberBandingIsEnabled):
+ (WKPageSetEnableVerticalRubberBanding):
+ (WKPageHorizontalRubberBandingIsEnabled):
+ (WKPageSetEnableHorizontalRubberBanding):
+ * UIProcess/API/C/WKPage.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::WebPageProxy):
+ (WebKit::WebPageProxy::setEnableVerticalRubberBanding):
+ (WebKit::WebPageProxy::verticalRubberBandingIsEnabled):
+ (WebKit::WebPageProxy::setEnableHorizontalRubberBanding):
+ (WebKit::WebPageProxy::horizontalRubberBandingIsEnabled):
+ * UIProcess/WebPageProxy.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::setEnableVerticalRubberBanding):
+ (WebKit::WebPage::setEnableHorizontalRubberBanding):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in:
+
</ins><span class="cx"> 2014-04-11 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Fix the Mac build.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (167171 => 167172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2014-04-11 23:50:03 UTC (rev 167171)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2014-04-11 23:51:36 UTC (rev 167172)
</span><span class="lines">@@ -521,6 +521,26 @@
</span><span class="cx"> toImpl(pageRef)->setRubberBandsAtBottom(rubberBandsAtBottom);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool WKPageVerticalRubberBandingIsEnabled(WKPageRef pageRef)
+{
+ return toImpl(pageRef)->verticalRubberBandingIsEnabled();
+}
+
+void WKPageSetEnableVerticalRubberBanding(WKPageRef pageRef, bool enableVerticalRubberBanding)
+{
+ toImpl(pageRef)->setEnableVerticalRubberBanding(enableVerticalRubberBanding);
+}
+
+bool WKPageHorizontalRubberBandingIsEnabled(WKPageRef pageRef)
+{
+ return toImpl(pageRef)->horizontalRubberBandingIsEnabled();
+}
+
+void WKPageSetEnableHorizontalRubberBanding(WKPageRef pageRef, bool enableHorizontalRubberBanding)
+{
+ toImpl(pageRef)->setEnableHorizontalRubberBanding(enableHorizontalRubberBanding);
+}
+
</ins><span class="cx"> void WKPageSetBackgroundExtendsBeyondPage(WKPageRef pageRef, bool backgroundExtendsBeyondPage)
</span><span class="cx"> {
</span><span class="cx"> toImpl(pageRef)->setBackgroundExtendsBeyondPage(backgroundExtendsBeyondPage);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.h (167171 => 167172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.h        2014-04-11 23:50:03 UTC (rev 167171)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.h        2014-04-11 23:51:36 UTC (rev 167172)
</span><span class="lines">@@ -165,7 +165,11 @@
</span><span class="cx"> WK_EXPORT bool WKPageIsPinnedToRightSide(WKPageRef page);
</span><span class="cx"> WK_EXPORT bool WKPageIsPinnedToTopSide(WKPageRef page);
</span><span class="cx"> WK_EXPORT bool WKPageIsPinnedToBottomSide(WKPageRef page);
</span><del>-
</del><ins>+
+// This API is poorly named. Even when these values are set to false, rubber-banding will
+// still be allowed to occur at the end of a momentum scroll. These values are used along
+// with pin state to determine if wheel events should be handled in the web process or if
+// they should be passed up to the client.
</ins><span class="cx"> WK_EXPORT bool WKPageRubberBandsAtLeft(WKPageRef);
</span><span class="cx"> WK_EXPORT void WKPageSetRubberBandsAtLeft(WKPageRef, bool rubberBandsAtLeft);
</span><span class="cx"> WK_EXPORT bool WKPageRubberBandsAtRight(WKPageRef);
</span><span class="lines">@@ -174,7 +178,13 @@
</span><span class="cx"> WK_EXPORT void WKPageSetRubberBandsAtTop(WKPageRef, bool rubberBandsAtTop);
</span><span class="cx"> WK_EXPORT bool WKPageRubberBandsAtBottom(WKPageRef);
</span><span class="cx"> WK_EXPORT void WKPageSetRubberBandsAtBottom(WKPageRef, bool rubberBandsAtBottom);
</span><del>-
</del><ins>+
+// Rubber-banding is enabled by default.
+WK_EXPORT bool WKPageVerticalRubberBandingIsEnabled(WKPageRef);
+WK_EXPORT void WKPageSetEnableVerticalRubberBanding(WKPageRef, bool enableVerticalRubberBanding);
+WK_EXPORT bool WKPageHorizontalRubberBandingIsEnabled(WKPageRef);
+WK_EXPORT void WKPageSetEnableHorizontalRubberBanding(WKPageRef, bool enableHorizontalRubberBanding);
+
</ins><span class="cx"> WK_EXPORT void WKPageSetBackgroundExtendsBeyondPage(WKPageRef, bool backgroundExtendsBeyondPage);
</span><span class="cx"> WK_EXPORT bool WKPageBackgroundExtendsBeyondPage(WKPageRef);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (167171 => 167172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-04-11 23:50:03 UTC (rev 167171)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-04-11 23:51:36 UTC (rev 167172)
</span><span class="lines">@@ -337,6 +337,8 @@
</span><span class="cx"> , m_rubberBandsAtRight(true)
</span><span class="cx"> , m_rubberBandsAtTop(true)
</span><span class="cx"> , m_rubberBandsAtBottom(true)
</span><ins>+ , m_enableVerticalRubberBanding(true)
+ , m_enableHorizontalRubberBanding(true)
</ins><span class="cx"> , m_backgroundExtendsBeyondPage(false)
</span><span class="cx"> , m_shouldRecordNavigationSnapshots(false)
</span><span class="cx"> , m_pageCount(0)
</span><span class="lines">@@ -1857,7 +1859,41 @@
</span><span class="cx"> {
</span><span class="cx"> m_rubberBandsAtBottom = rubberBandsAtBottom;
</span><span class="cx"> }
</span><ins>+
+void WebPageProxy::setEnableVerticalRubberBanding(bool enableVerticalRubberBanding)
+{
+ if (enableVerticalRubberBanding == m_enableVerticalRubberBanding)
+ return;
</ins><span class="cx">
</span><ins>+ m_enableVerticalRubberBanding = enableVerticalRubberBanding;
+
+ if (!isValid())
+ return;
+ m_process->send(Messages::WebPage::SetEnableVerticalRubberBanding(enableVerticalRubberBanding), m_pageID);
+}
+
+bool WebPageProxy::verticalRubberBandingIsEnabled() const
+{
+ return m_enableVerticalRubberBanding;
+}
+
+void WebPageProxy::setEnableHorizontalRubberBanding(bool enableHorizontalRubberBanding)
+{
+ if (enableHorizontalRubberBanding == m_enableHorizontalRubberBanding)
+ return;
+
+ m_enableHorizontalRubberBanding = enableHorizontalRubberBanding;
+
+ if (!isValid())
+ return;
+ m_process->send(Messages::WebPage::SetEnableHorizontalRubberBanding(enableHorizontalRubberBanding), m_pageID);
+}
+
+bool WebPageProxy::horizontalRubberBandingIsEnabled() const
+{
+ return m_enableHorizontalRubberBanding;
+}
+
</ins><span class="cx"> void WebPageProxy::setBackgroundExtendsBeyondPage(bool backgroundExtendsBeyondPage)
</span><span class="cx"> {
</span><span class="cx"> if (backgroundExtendsBeyondPage == m_backgroundExtendsBeyondPage)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (167171 => 167172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-04-11 23:50:03 UTC (rev 167171)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-04-11 23:51:36 UTC (rev 167172)
</span><span class="lines">@@ -769,7 +769,12 @@
</span><span class="cx">
</span><span class="cx"> void setShouldUseImplicitRubberBandControl(bool shouldUseImplicitRubberBandControl) { m_shouldUseImplicitRubberBandControl = shouldUseImplicitRubberBandControl; }
</span><span class="cx"> bool shouldUseImplicitRubberBandControl() const { return m_shouldUseImplicitRubberBandControl; }
</span><del>-
</del><ins>+
+ void setEnableVerticalRubberBanding(bool);
+ bool verticalRubberBandingIsEnabled() const;
+ void setEnableHorizontalRubberBanding(bool);
+ bool horizontalRubberBandingIsEnabled() const;
+
</ins><span class="cx"> void setBackgroundExtendsBeyondPage(bool);
</span><span class="cx"> bool backgroundExtendsBeyondPage() const;
</span><span class="cx">
</span><span class="lines">@@ -1609,6 +1614,9 @@
</span><span class="cx"> bool m_rubberBandsAtRight;
</span><span class="cx"> bool m_rubberBandsAtTop;
</span><span class="cx"> bool m_rubberBandsAtBottom;
</span><ins>+
+ bool m_enableVerticalRubberBanding;
+ bool m_enableHorizontalRubberBanding;
</ins><span class="cx">
</span><span class="cx"> bool m_backgroundExtendsBeyondPage;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (167171 => 167172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-04-11 23:50:03 UTC (rev 167171)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-04-11 23:51:36 UTC (rev 167172)
</span><span class="lines">@@ -1398,6 +1398,16 @@
</span><span class="cx"> {
</span><span class="cx"> m_page->setShouldSuppressScrollbarAnimations(suppressAnimations);
</span><span class="cx"> }
</span><ins>+
+void WebPage::setEnableVerticalRubberBanding(bool enableVerticalRubberBanding)
+{
+ m_page->setVerticalScrollElasticity(enableVerticalRubberBanding ? ScrollElasticityAllowed : ScrollElasticityNone);
+}
+
+void WebPage::setEnableHorizontalRubberBanding(bool enableHorizontalRubberBanding)
+{
+ m_page->setHorizontalScrollElasticity(enableHorizontalRubberBanding ? ScrollElasticityAllowed : ScrollElasticityNone);
+}
</ins><span class="cx">
</span><span class="cx"> void WebPage::setBackgroundExtendsBeyondPage(bool backgroundExtendsBeyondPage)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (167171 => 167172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-04-11 23:50:03 UTC (rev 167171)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-04-11 23:51:36 UTC (rev 167172)
</span><span class="lines">@@ -358,7 +358,10 @@
</span><span class="cx"> void listenForLayoutMilestones(uint32_t /* LayoutMilestones */);
</span><span class="cx">
</span><span class="cx"> void setSuppressScrollbarAnimations(bool);
</span><del>-
</del><ins>+
+ void setEnableVerticalRubberBanding(bool);
+ void setEnableHorizontalRubberBanding(bool);
+
</ins><span class="cx"> void setBackgroundExtendsBeyondPage(bool);
</span><span class="cx">
</span><span class="cx"> void setPaginationMode(uint32_t /* WebCore::Pagination::Mode */);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (167171 => 167172)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-04-11 23:50:03 UTC (rev 167171)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-04-11 23:51:36 UTC (rev 167172)
</span><span class="lines">@@ -173,6 +173,9 @@
</span><span class="cx"> ListenForLayoutMilestones(uint32_t milestones)
</span><span class="cx"> SetSuppressScrollbarAnimations(bool suppressAnimations)
</span><span class="cx">
</span><ins>+ SetEnableVerticalRubberBanding(bool enableVerticalRubberBanding)
+ SetEnableHorizontalRubberBanding(bool enableHorizontalRubberBanding)
+
</ins><span class="cx"> SetBackgroundExtendsBeyondPage(bool backgroundExtendsBeyondPage)
</span><span class="cx">
</span><span class="cx"> SetPaginationMode(uint32_t mode)
</span></span></pre>
</div>
</div>
</body>
</html>