<!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>[173523] trunk</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/173523">173523</a></dd>
<dt>Author</dt> <dd>bdakin@apple.com</dd>
<dt>Date</dt> <dd>2014-09-11 11:48:21 -0700 (Thu, 11 Sep 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Support rubber-banding in sub-frames
https://bugs.webkit.org/show_bug.cgi?id=136726
-and corresponding-
rdar://problem/10011924
Reviewed by Tim Horton.
Source/WebCore:
Set the appropriate scroll elasticity for all frames! As long as its enabled, sub-
frames want an elasticity of ScrollElasticityAutomatic, which will allow for
latching.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
Account for rubber-banding in sub-frames.
(WebCore::FrameView::isScrollableOrRubberbandable):
(WebCore::FrameView::hasScrollableOrRubberbandableAncestor):
This patch also re-names rubberBandingForOverflowScrollEnabled to
rubberBandingForSubScrollableRegionsEnabled
* page/Settings.in:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::overhangAmount):
(WebCore::RenderLayer::setHasHorizontalScrollbar):
(WebCore::RenderLayer::setHasVerticalScrollbar):
Source/WebKit/mac:
rubberBandingForOverflowScrollEnabled is re-named to
rubberBandingForSubScrollableRegionsEnabled
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
LayoutTests:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingfastscrolliframelatchediframeexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingscrollingfastscrolliframelatchediframewithhandlerexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSettingsin">trunk/Source/WebCore/page/Settings.in</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayercpp">trunk/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (173522 => 173523)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-09-11 18:35:36 UTC (rev 173522)
+++ trunk/LayoutTests/ChangeLog        2014-09-11 18:48:21 UTC (rev 173523)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-09-11 Beth Dakin <bdakin@apple.com>
+
+ Support rubber-banding in sub-frames
+ https://bugs.webkit.org/show_bug.cgi?id=136726
+ -and corresponding-
+ rdar://problem/10011924
+
+ Reviewed by Tim Horton.
+
+ * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
+ * platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
+
</ins><span class="cx"> 2014-09-11 Jer Noble <jer.noble@apple.com>
</span><span class="cx">
</span><span class="cx"> [EME] REGRESSION(??): test media/encrypted-media/encrypted-media-v2-syntax.html is failing
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingfastscrolliframelatchediframeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt (173522 => 173523)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt        2014-09-11 18:35:36 UTC (rev 173522)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt        2014-09-11 18:48:21 UTC (rev 173523)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx"> IFrame display height = 500
</span><span class="cx"> Mouse moved to (28, 566)
</span><span class="cx"> Page before: 0, IFrame before: 416
</span><del>-Page after: 0, IFrame after: 496
</del><ins>+Page after: 0, IFrame after: 486
</ins><span class="cx"> PASS Page did not receive wheel events.
</span><span class="cx"> (GraphicsLayer
</span><span class="cx"> (anchor 0.00 0.00)
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingscrollingfastscrolliframelatchediframewithhandlerexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt (173522 => 173523)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt        2014-09-11 18:35:36 UTC (rev 173522)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt        2014-09-11 18:48:21 UTC (rev 173523)
</span><span class="lines">@@ -11,9 +11,9 @@
</span><span class="cx"> IFrame display height = 500
</span><span class="cx"> Mouse moved to (28, 566)
</span><span class="cx"> Page before: 0, IFrame before: 416
</span><del>-Page after: 0, IFrame after: 496
</del><ins>+Page after: 0, IFrame after: 486
</ins><span class="cx"> PASS Page did not receive wheel events.
</span><del>-Document was initial target for 2 of the wheel events.
</del><ins>+Document was initial target for 0 of the wheel events.
</ins><span class="cx"> (GraphicsLayer
</span><span class="cx"> (anchor 0.00 0.00)
</span><span class="cx"> (bounds 785.00 2341.00)
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (173522 => 173523)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-09-11 18:35:36 UTC (rev 173522)
+++ trunk/Source/WebCore/ChangeLog        2014-09-11 18:48:21 UTC (rev 173523)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2014-09-11 Beth Dakin <bdakin@apple.com>
+
+ Support rubber-banding in sub-frames
+ https://bugs.webkit.org/show_bug.cgi?id=136726
+ -and corresponding-
+ rdar://problem/10011924
+
+ Reviewed by Tim Horton.
+
+ Set the appropriate scroll elasticity for all frames! As long as its enabled, sub-
+ frames want an elasticity of ScrollElasticityAutomatic, which will allow for
+ latching.
+ * page/FrameView.cpp:
+ (WebCore::FrameView::FrameView):
+
+ Account for rubber-banding in sub-frames.
+ (WebCore::FrameView::isScrollableOrRubberbandable):
+ (WebCore::FrameView::hasScrollableOrRubberbandableAncestor):
+
+ This patch also re-names rubberBandingForOverflowScrollEnabled to
+ rubberBandingForSubScrollableRegionsEnabled
+ * page/Settings.in:
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::overhangAmount):
+ (WebCore::RenderLayer::setHasHorizontalScrollbar):
+ (WebCore::RenderLayer::setHasVerticalScrollbar):
+
</ins><span class="cx"> 2014-09-11 Myles C. Maxfield <mmaxfield@apple.com> <litherum@gmail.com>
</span><span class="cx">
</span><span class="cx"> Initial implementation of SVG to OTF font converter
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (173522 => 173523)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-09-11 18:35:36 UTC (rev 173522)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-09-11 18:48:21 UTC (rev 173523)
</span><span class="lines">@@ -200,10 +200,20 @@
</span><span class="cx"> {
</span><span class="cx"> init();
</span><span class="cx">
</span><del>- if (frame.isMainFrame()) {
- ScrollableArea::setVerticalScrollElasticity(m_frame->page() ? m_frame->page()->verticalScrollElasticity() : ScrollElasticityAllowed);
- ScrollableArea::setHorizontalScrollElasticity(m_frame->page() ? m_frame->page()->horizontalScrollElasticity() : ScrollElasticityAllowed);
</del><ins>+#if ENABLE(RUBBER_BANDING)
+ ScrollElasticity verticalElasticity = ScrollElasticityNone;
+ ScrollElasticity horizontalElasticity = ScrollElasticityNone;
+ if (m_frame->isMainFrame()) {
+ verticalElasticity = m_frame->page() ? m_frame->page()->verticalScrollElasticity() : ScrollElasticityAllowed;
+ horizontalElasticity = m_frame->page() ? m_frame->page()->horizontalScrollElasticity() : ScrollElasticityAllowed;
+ } else if (m_frame->settings().rubberBandingForSubScrollableRegionsEnabled()) {
+ verticalElasticity = ScrollElasticityAutomatic;
+ horizontalElasticity = ScrollElasticityAutomatic;
</ins><span class="cx"> }
</span><ins>+
+ ScrollableArea::setVerticalScrollElasticity(verticalElasticity);
+ ScrollableArea::setHorizontalScrollElasticity(horizontalElasticity);
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<FrameView> FrameView::create(Frame& frame)
</span><span class="lines">@@ -3348,24 +3358,21 @@
</span><span class="cx">
</span><span class="cx"> bool FrameView::isScrollableOrRubberbandable()
</span><span class="cx"> {
</span><del>- return frame().isMainFrame() ? isScrollable(Scrollability::ScrollableOrRubberbandable) : isScrollable(Scrollability::Scrollable);
</del><ins>+ return isScrollable(Scrollability::ScrollableOrRubberbandable);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool FrameView::hasScrollableOrRubberbandableAncestor()
</span><span class="cx"> {
</span><span class="cx"> if (frame().isMainFrame())
</span><del>- return isScrollable(Scrollability::ScrollableOrRubberbandable);
</del><ins>+ return isScrollableOrRubberbandable();
</ins><span class="cx">
</span><del>- FrameView* parentFrameView = this->parentFrameView();
- if (!parentFrameView)
- return false;
</del><ins>+ for (FrameView* parent = this->parentFrameView(); parent; parent = parent->parentFrameView()) {
+ Scrollability frameScrollability = parent->frame().isMainFrame() ? Scrollability::ScrollableOrRubberbandable : Scrollability::Scrollable;
+ if (parent->isScrollable(frameScrollability))
+ return true;
+ }
</ins><span class="cx">
</span><del>- RenderView* parentRenderView = parentFrameView->renderView();
- if (!parentRenderView)
- return false;
-
- RenderLayer* enclosingLayer = parentRenderView->enclosingLayer();
- return enclosingLayer && enclosingLayer->hasScrollableOrRubberbandableAncestor();
</del><ins>+ return false;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void FrameView::updateScrollableAreaSet()
</span></span></pre></div>
<a id="trunkSourceWebCorepageSettingsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Settings.in (173522 => 173523)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Settings.in        2014-09-11 18:35:36 UTC (rev 173522)
+++ trunk/Source/WebCore/page/Settings.in        2014-09-11 18:48:21 UTC (rev 173523)
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx"> unsafePluginPastingEnabled initial=true
</span><span class="cx"> acceleratedCompositingForFixedPositionEnabled initial=defaultAcceleratedCompositingForFixedPositionEnabled
</span><span class="cx"> acceleratedCompositingForOverflowScrollEnabled initial=false
</span><del>-rubberBandingForOverflowScrollEnabled initial=true, conditional=RUBBER_BANDING
</del><ins>+rubberBandingForSubScrollableRegionsEnabled initial=true, conditional=RUBBER_BANDING
</ins><span class="cx">
</span><span class="cx"> experimentalNotificationsEnabled initial=false
</span><span class="cx"> webGLEnabled initial=false
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (173522 => 173523)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-09-11 18:35:36 UTC (rev 173522)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp        2014-09-11 18:48:21 UTC (rev 173523)
</span><span class="lines">@@ -2650,7 +2650,7 @@
</span><span class="cx"> IntSize RenderLayer::overhangAmount() const
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(RUBBER_BANDING)
</span><del>- if (!renderer().frame().settings().rubberBandingForOverflowScrollEnabled())
</del><ins>+ if (!renderer().frame().settings().rubberBandingForSubScrollableRegionsEnabled())
</ins><span class="cx"> return IntSize();
</span><span class="cx">
</span><span class="cx"> IntSize stretch;
</span><span class="lines">@@ -3005,7 +3005,7 @@
</span><span class="cx"> if (hasScrollbar) {
</span><span class="cx"> m_hBar = createScrollbar(HorizontalScrollbar);
</span><span class="cx"> #if ENABLE(RUBBER_BANDING)
</span><del>- ScrollElasticity elasticity = scrollsOverflow() && renderer().frame().settings().rubberBandingForOverflowScrollEnabled() ? ScrollElasticityAutomatic : ScrollElasticityNone;
</del><ins>+ ScrollElasticity elasticity = scrollsOverflow() && renderer().frame().settings().rubberBandingForSubScrollableRegionsEnabled() ? ScrollElasticityAutomatic : ScrollElasticityNone;
</ins><span class="cx"> ScrollableArea::setHorizontalScrollElasticity(elasticity);
</span><span class="cx"> #endif
</span><span class="cx"> } else {
</span><span class="lines">@@ -3036,7 +3036,7 @@
</span><span class="cx"> if (hasScrollbar) {
</span><span class="cx"> m_vBar = createScrollbar(VerticalScrollbar);
</span><span class="cx"> #if ENABLE(RUBBER_BANDING)
</span><del>- ScrollElasticity elasticity = scrollsOverflow() && renderer().frame().settings().rubberBandingForOverflowScrollEnabled() ? ScrollElasticityAutomatic : ScrollElasticityNone;
</del><ins>+ ScrollElasticity elasticity = scrollsOverflow() && renderer().frame().settings().rubberBandingForSubScrollableRegionsEnabled() ? ScrollElasticityAutomatic : ScrollElasticityNone;
</ins><span class="cx"> ScrollableArea::setVerticalScrollElasticity(elasticity);
</span><span class="cx"> #endif
</span><span class="cx"> } else {
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (173522 => 173523)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2014-09-11 18:35:36 UTC (rev 173522)
+++ trunk/Source/WebKit/mac/ChangeLog        2014-09-11 18:48:21 UTC (rev 173523)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-09-11 Beth Dakin <bdakin@apple.com>
+
+ Support rubber-banding in sub-frames
+ https://bugs.webkit.org/show_bug.cgi?id=136726
+ -and corresponding-
+ rdar://problem/10011924
+
+ Reviewed by Tim Horton.
+
+ rubberBandingForOverflowScrollEnabled is re-named to
+ rubberBandingForSubScrollableRegionsEnabled
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
</ins><span class="cx"> 2014-09-09 Benjamin Poulain <bpoulain@apple.com>
</span><span class="cx">
</span><span class="cx"> Disable the "unreachable-code" warning
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (173522 => 173523)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2014-09-11 18:35:36 UTC (rev 173522)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2014-09-11 18:48:21 UTC (rev 173523)
</span><span class="lines">@@ -2284,7 +2284,7 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(RUBBER_BANDING)
</span><span class="cx"> // FIXME: https://bugs.webkit.org/show_bug.cgi?id=136131
</span><del>- settings.setRubberBandingForOverflowScrollEnabled(false);
</del><ins>+ settings.setRubberBandingForSubScrollableRegionsEnabled(false);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre>
</div>
</div>
</body>
</html>