<!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>[152190] 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/152190">152190</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2013-06-28 15:15:53 -0700 (Fri, 28 Jun 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>[wk2] WKView shouldn't force scrolling off if shouldClipToVisibleRect is set
https://bugs.webkit.org/show_bug.cgi?id=118174
&lt;rdar://problem/14301175&gt;

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm:
(-[WKView _updateViewExposedRect]):
Pass whether or not clips-to-visibleRect is enabled down to the WebPageProxy.

(-[WKView setMinimumSizeForAutoLayout:]):
Disable scrolling when using autolayout instead of when using clips-to-visibleRect.

(-[WKView setShouldClipToVisibleRect:]):
Clipping to the WKView's visibleRect does not strictly require scrolling to be disabled,
and in fact there are cases (RTL/TB pagination) where we *must* scroll, even when the view
is big enough to fit the content (the case clip-to-visibleRect was added for).

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::viewExposedRectChanged):
(WebKit::WebPageProxy::exposedRectChangedTimerFired):
Keep track of and forward to the drawing area whether or not clips-to-visibleRect is enabled.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setClipsToExposedRect): Added.
(WebKit::DrawingArea::didChangeScrollOffsetForAnyFrame): Added a missing space.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::viewExposedRectChanged):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Forward clips-to-visibleRect enabled state to the drawing area.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
Add storage for m_clipsToExposedRect.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect):
(WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
(WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
Check m_clipsToExposedRect instead of the main-frame's isScrollable() to determine
whether we should tell our TiledBackings to clip to the exposed rect we provide.

We don't need to listen to mainFrameScrollabilityChanged anymore.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</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="#trunkSourceWebKit2UIProcessmacWebPageProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.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>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (152189 => 152190)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2013-06-28 21:48:43 UTC (rev 152189)
+++ trunk/Source/WebKit2/ChangeLog        2013-06-28 22:15:53 UTC (rev 152190)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2013-06-28  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        [wk2] WKView shouldn't force scrolling off if shouldClipToVisibleRect is set
+        https://bugs.webkit.org/show_bug.cgi?id=118174
+        &lt;rdar://problem/14301175&gt;
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _updateViewExposedRect]):
+        Pass whether or not clips-to-visibleRect is enabled down to the WebPageProxy.
+
+        (-[WKView setMinimumSizeForAutoLayout:]):
+        Disable scrolling when using autolayout instead of when using clips-to-visibleRect.
+
+        (-[WKView setShouldClipToVisibleRect:]):
+        Clipping to the WKView's visibleRect does not strictly require scrolling to be disabled,
+        and in fact there are cases (RTL/TB pagination) where we *must* scroll, even when the view
+        is big enough to fit the content (the case clip-to-visibleRect was added for).
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/mac/WebPageProxyMac.mm:
+        (WebKit::WebPageProxy::viewExposedRectChanged):
+        (WebKit::WebPageProxy::exposedRectChangedTimerFired):
+        Keep track of and forward to the drawing area whether or not clips-to-visibleRect is enabled.
+
+        * WebProcess/WebPage/DrawingArea.h:
+        (WebKit::DrawingArea::setClipsToExposedRect): Added.
+        (WebKit::DrawingArea::didChangeScrollOffsetForAnyFrame): Added a missing space.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::viewExposedRectChanged):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        Forward clips-to-visibleRect enabled state to the drawing area.
+
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+        Add storage for m_clipsToExposedRect.
+
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
+        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
+        (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect):
+        (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
+        (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
+        (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
+        Check m_clipsToExposedRect instead of the main-frame's isScrollable() to determine
+        whether we should tell our TiledBackings to clip to the exposed rect we provide.
+
+        We don't need to listen to mainFrameScrollabilityChanged anymore.
+
</ins><span class="cx"> 2013-06-28  Gavin Barraclough  &lt;barraclough@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Stale occlusion state after moving page back into window
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (152189 => 152190)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2013-06-28 21:48:43 UTC (rev 152189)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2013-06-28 22:15:53 UTC (rev 152190)
</span><span class="lines">@@ -415,7 +415,7 @@
</span><span class="cx">     if (_data-&gt;_useContentPreparationRectForVisibleRect)
</span><span class="cx">         exposedRect = NSUnionRect(_data-&gt;_contentPreparationRect, exposedRect);
</span><span class="cx"> 
</span><del>-    _data-&gt;_page-&gt;viewExposedRectChanged(exposedRect);
</del><ins>+    _data-&gt;_page-&gt;viewExposedRectChanged(exposedRect, _data-&gt;_clipsToVisibleRect);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)setFrameSize:(NSSize)size
</span><span class="lines">@@ -3332,6 +3332,7 @@
</span><span class="cx">     BOOL expandsToFit = minimumSizeForAutoLayout.width &gt; 0;
</span><span class="cx"> 
</span><span class="cx">     _data-&gt;_page-&gt;setMinimumLayoutSize(IntSize(minimumSizeForAutoLayout.width, minimumSizeForAutoLayout.height));
</span><ins>+    _data-&gt;_page-&gt;setMainFrameIsScrollable(!expandsToFit);
</ins><span class="cx"> 
</span><span class="cx">     [self setShouldClipToVisibleRect:expandsToFit];
</span><span class="cx"> }
</span><span class="lines">@@ -3344,11 +3345,7 @@
</span><span class="cx"> - (void)setShouldClipToVisibleRect:(BOOL)clipsToVisibleRect
</span><span class="cx"> {
</span><span class="cx">     _data-&gt;_clipsToVisibleRect = clipsToVisibleRect;
</span><del>-
-    if (clipsToVisibleRect)
-        [self _updateViewExposedRect];
-
-    _data-&gt;_page-&gt;setMainFrameIsScrollable(!clipsToVisibleRect);
</del><ins>+    [self _updateViewExposedRect];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (NSColor *)underlayColor
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (152189 => 152190)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-06-28 21:48:43 UTC (rev 152189)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2013-06-28 22:15:53 UTC (rev 152190)
</span><span class="lines">@@ -312,6 +312,8 @@
</span><span class="cx">     , m_waitingForDidUpdateInWindowState(false)
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     , m_exposedRectChangedTimer(this, &amp;WebPageProxy::exposedRectChangedTimerFired)
</span><ins>+    , m_clipsToExposedRect(false)
+    , m_lastSentClipsToExposedRect(false)
</ins><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(PAGE_VISIBILITY_API)
</span><span class="cx">     , m_visibilityState(PageVisibilityStateVisible)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (152189 => 152190)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2013-06-28 21:48:43 UTC (rev 152189)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2013-06-28 22:15:53 UTC (rev 152190)
</span><span class="lines">@@ -389,7 +389,7 @@
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     void updateWindowIsVisible(bool windowIsVisible);
</span><span class="cx">     void windowAndViewFramesChanged(const WebCore::FloatRect&amp; viewFrameInWindowCoordinates, const WebCore::FloatPoint&amp; accessibilityViewCoordinates);
</span><del>-    void viewExposedRectChanged(const WebCore::FloatRect&amp; exposedRect);
</del><ins>+    void viewExposedRectChanged(const WebCore::FloatRect&amp; exposedRect, bool);
</ins><span class="cx">     void exposedRectChangedTimerFired(WebCore::Timer&lt;WebPageProxy&gt;*);
</span><span class="cx">     void setMainFrameIsScrollable(bool);
</span><span class="cx"> 
</span><span class="lines">@@ -1272,6 +1272,8 @@
</span><span class="cx">     WebCore::Timer&lt;WebPageProxy&gt; m_exposedRectChangedTimer;
</span><span class="cx">     WebCore::FloatRect m_exposedRect;
</span><span class="cx">     WebCore::FloatRect m_lastSentExposedRect;
</span><ins>+    bool m_clipsToExposedRect;
+    bool m_lastSentClipsToExposedRect;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(QT)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (152189 => 152190)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2013-06-28 21:48:43 UTC (rev 152189)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2013-06-28 22:15:53 UTC (rev 152190)
</span><span class="lines">@@ -153,12 +153,13 @@
</span><span class="cx">     process()-&gt;send(Messages::WebPage::WindowAndViewFramesChanged(windowFrameInScreenCoordinates, windowFrameInUnflippedScreenCoordinates, viewFrameInWindowCoordinates, accessibilityViewCoordinates), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::viewExposedRectChanged(const FloatRect&amp; exposedRect)
</del><ins>+void WebPageProxy::viewExposedRectChanged(const FloatRect&amp; exposedRect, bool clipsToExposedRect)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     m_exposedRect = exposedRect;
</span><ins>+    m_clipsToExposedRect = clipsToExposedRect;
</ins><span class="cx"> 
</span><span class="cx">     if (!m_exposedRectChangedTimer.isActive())
</span><span class="cx">         m_exposedRectChangedTimer.startOneShot(0);
</span><span class="lines">@@ -169,11 +170,12 @@
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (m_exposedRect == m_lastSentExposedRect)
</del><ins>+    if (m_exposedRect == m_lastSentExposedRect &amp;&amp; m_clipsToExposedRect == m_lastSentClipsToExposedRect)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    process()-&gt;send(Messages::WebPage::ViewExposedRectChanged(m_exposedRect), m_pageID);
</del><ins>+    process()-&gt;send(Messages::WebPage::ViewExposedRectChanged(m_exposedRect, m_clipsToExposedRect), m_pageID);
</ins><span class="cx">     m_lastSentExposedRect = m_exposedRect;
</span><ins>+    m_lastSentClipsToExposedRect = m_clipsToExposedRect;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::setMainFrameIsScrollable(bool isScrollable)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (152189 => 152190)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2013-06-28 21:48:43 UTC (rev 152189)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2013-06-28 22:15:53 UTC (rev 152190)
</span><span class="lines">@@ -86,9 +86,10 @@
</span><span class="cx">     virtual void mainFrameContentSizeChanged(const WebCore::IntSize&amp;) { }
</span><span class="cx"> 
</span><span class="cx">     virtual void setExposedRect(const WebCore::FloatRect&amp;) { }
</span><ins>+    virtual void setClipsToExposedRect(bool) { }
</ins><span class="cx">     virtual void mainFrameScrollabilityChanged(bool) { }
</span><span class="cx"> 
</span><del>-    virtual void didChangeScrollOffsetForAnyFrame() {}
</del><ins>+    virtual void didChangeScrollOffsetForAnyFrame() { }
</ins><span class="cx"> 
</span><span class="cx"> #if USE(ACCELERATED_COMPOSITING)
</span><span class="cx">     virtual WebCore::GraphicsLayerFactory* graphicsLayerFactory() { return 0; }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (152189 => 152190)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2013-06-28 21:48:43 UTC (rev 152189)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2013-06-28 22:15:53 UTC (rev 152190)
</span><span class="lines">@@ -3106,9 +3106,10 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void WebPage::viewExposedRectChanged(const FloatRect&amp; exposedRect)
</del><ins>+void WebPage::viewExposedRectChanged(const FloatRect&amp; exposedRect, bool clipsToExposedRect)
</ins><span class="cx"> {
</span><span class="cx">     m_drawingArea-&gt;setExposedRect(exposedRect);
</span><ins>+    m_drawingArea-&gt;setClipsToExposedRect(clipsToExposedRect);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::setMainFrameIsScrollable(bool isScrollable)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (152189 => 152190)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2013-06-28 21:48:43 UTC (rev 152189)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2013-06-28 22:15:53 UTC (rev 152190)
</span><span class="lines">@@ -780,7 +780,7 @@
</span><span class="cx">     void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&amp;, uint32_t first, uint32_t count);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void viewExposedRectChanged(const WebCore::FloatRect&amp; exposedRect);
</del><ins>+    void viewExposedRectChanged(const WebCore::FloatRect&amp; exposedRect, bool clipsToExposedRect);
</ins><span class="cx">     void setMainFrameIsScrollable(bool);
</span><span class="cx"> 
</span><span class="cx">     void unapplyEditCommand(uint64_t commandID);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (152189 => 152190)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2013-06-28 21:48:43 UTC (rev 152189)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2013-06-28 22:15:53 UTC (rev 152190)
</span><span class="lines">@@ -267,7 +267,7 @@
</span><span class="cx"> 
</span><span class="cx">     SetWindowIsVisible(bool windowIsVisible)
</span><span class="cx">     WindowAndViewFramesChanged(WebCore::FloatRect windowFrameInScreenCoordinates, WebCore::FloatRect windowFrameInUnflippedScreenCoordinates, WebCore::FloatRect viewFrameInWindowCoordinates, WebCore::FloatPoint accessibilityViewCoordinates)
</span><del>-    ViewExposedRectChanged(WebCore::FloatRect exposedRect)
</del><ins>+    ViewExposedRectChanged(WebCore::FloatRect exposedRect, bool clipsToExposedRect)
</ins><span class="cx">     SetMainFrameIsScrollable(bool isScrollable)
</span><span class="cx">     RegisterUIProcessAccessibilityTokens(CoreIPC::DataReference elemenToken, CoreIPC::DataReference windowToken)
</span><span class="cx">     GetStringSelectionForPasteboard() -&gt; (WTF::String stringValue)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (152189 => 152190)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2013-06-28 21:48:43 UTC (rev 152189)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2013-06-28 22:15:53 UTC (rev 152190)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">     virtual void mainFrameContentSizeChanged(const WebCore::IntSize&amp;) OVERRIDE;
</span><span class="cx"> 
</span><span class="cx">     virtual void setExposedRect(const WebCore::FloatRect&amp;) OVERRIDE;
</span><del>-    virtual void mainFrameScrollabilityChanged(bool) OVERRIDE;
</del><ins>+    virtual void setClipsToExposedRect(bool) OVERRIDE;
</ins><span class="cx"> 
</span><span class="cx">     virtual void didChangeScrollOffsetForAnyFrame() OVERRIDE;
</span><span class="cx"> 
</span><span class="lines">@@ -132,6 +132,7 @@
</span><span class="cx">     bool m_hasRootCompositingLayer;
</span><span class="cx"> 
</span><span class="cx">     WebCore::FloatRect m_exposedRect;
</span><ins>+    bool m_clipsToExposedRect;
</ins><span class="cx"> 
</span><span class="cx">     WebCore::IntSize m_lastSentIntrinsicContentSize;
</span><span class="cx">     WebCore::Timer&lt;TiledCoreAnimationDrawingArea&gt; m_updateIntrinsicContentSizeTimer;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (152189 => 152190)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2013-06-28 21:48:43 UTC (rev 152189)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2013-06-28 22:15:53 UTC (rev 152190)
</span><span class="lines">@@ -70,6 +70,7 @@
</span><span class="cx">     , m_layerTreeStateIsFrozen(false)
</span><span class="cx">     , m_layerFlushScheduler(this)
</span><span class="cx">     , m_isPaintingSuspended(!parameters.isVisible)
</span><ins>+    , m_clipsToExposedRect(false)
</ins><span class="cx">     , m_updateIntrinsicContentSizeTimer(this, &amp;TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired)
</span><span class="cx"> {
</span><span class="cx">     Page* page = m_webPage-&gt;corePage();
</span><span class="lines">@@ -349,8 +350,9 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     IntRect visibleRect = enclosingIntRect(m_rootLayer.get().frame);
</span><del>-    if (!m_webPage-&gt;mainFrameIsScrollable())
</del><ins>+    if (m_clipsToExposedRect)
</ins><span class="cx">         visibleRect.intersect(enclosingIntRect(m_exposedRect));
</span><ins>+
</ins><span class="cx">     for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it) {
</span><span class="cx">         GraphicsLayer* layer = it-&gt;value.get();
</span><span class="cx">         layer-&gt;flushCompositingState(visibleRect);
</span><span class="lines">@@ -412,8 +414,9 @@
</span><span class="cx">             tiledBacking-&gt;setExposedRect(exposedRect);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged(bool)
</del><ins>+void TiledCoreAnimationDrawingArea::setClipsToExposedRect(bool clipsToExposedRect)
</ins><span class="cx"> {
</span><ins>+    m_clipsToExposedRect = clipsToExposedRect;
</ins><span class="cx">     updateMainFrameClipsToExposedRect();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -524,14 +527,12 @@
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect()
</span><span class="cx"> {
</span><del>-    bool isScrollable = m_webPage-&gt;mainFrameIsScrollable();
-
</del><span class="cx">     if (TiledBacking* tiledBacking = mainFrameTiledBacking())
</span><del>-        tiledBacking-&gt;setClipsToExposedRect(!isScrollable);
</del><ins>+        tiledBacking-&gt;setClipsToExposedRect(m_clipsToExposedRect);
</ins><span class="cx"> 
</span><span class="cx">     for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it)
</span><span class="cx">         if (TiledBacking* tiledBacking = it-&gt;value-&gt;tiledBacking())
</span><del>-            tiledBacking-&gt;setClipsToExposedRect(!isScrollable);
</del><ins>+            tiledBacking-&gt;setClipsToExposedRect(m_clipsToExposedRect);
</ins><span class="cx"> 
</span><span class="cx">     Frame* frame = m_webPage-&gt;corePage()-&gt;mainFrame();
</span><span class="cx">     if (!frame)
</span><span class="lines">@@ -589,7 +590,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (TiledBacking* tiledBacking = layer-&gt;tiledBacking()) {
</span><span class="cx">         tiledBacking-&gt;setExposedRect(m_exposedRect);
</span><del>-        tiledBacking-&gt;setClipsToExposedRect(!m_webPage-&gt;mainFrameIsScrollable());
</del><ins>+        tiledBacking-&gt;setClipsToExposedRect(m_clipsToExposedRect);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     [CATransaction begin];
</span><span class="lines">@@ -637,7 +638,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (TiledBacking* tiledBacking = layer-&gt;tiledBacking()) {
</span><span class="cx">         tiledBacking-&gt;setExposedRect(m_exposedRect);
</span><del>-        tiledBacking-&gt;setClipsToExposedRect(!m_webPage-&gt;mainFrameIsScrollable());
</del><ins>+        tiledBacking-&gt;setClipsToExposedRect(m_clipsToExposedRect);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_pageOverlayPlatformLayers.set(layer, layer-&gt;platformLayer());
</span></span></pre>
</div>
</div>

</body>
</html>