<!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>[199111] 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/199111">199111</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2016-04-06 12:22:57 -0700 (Wed, 06 Apr 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Rename exposedRect to viewExposedRect and propagate it as Optional<> through WK2
https://bugs.webkit.org/show_bug.cgi?id=156274
Reviewed by NOBODY (OOPS!).
DrawingArea and FrameView have an "exposedRect" property that is used by applications
on Mac, like Mail, that embed web views inside scroll views. However, this name is very
similar to the "exposedContentRect" that is used on iOS to denote the part of the view
whose pixels are visible, including through blurring overlaid UI.
To disambiguate these two, rename the Mac "exposedRect" to "viewExposedRect" to
emphasize that it's a rect that takes into account clipping in the native view
hierarchy.
Also make this rect Optional<> through the DrawingArea, removing comparisons against
FloatRect::infiniteRect().
Do some other minor renaming in VisibleContentRectUpdateInfo.
Source/WebCore:
* page/FrameView.cpp:
(WebCore::FrameView::setViewExposedRect): This now takes an Optional<> because WebViewImpl::updateViewExposedRect()
can clear it.
* page/FrameView.h:
* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::didChangeViewExposedRect):
(WebCore::PageOverlayController::didChangeExposedRect): Deleted.
* page/PageOverlayController.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::computeTileCoverage):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
Source/WebKit2:
* Shared/VisibleContentRectUpdateInfo.cpp: Rename "exposedRect" and "unobscuredRect" to
have "Content" in the names.
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::exposedContentRect):
(WebKit::VisibleContentRectUpdateInfo::unobscuredContentRect):
(WebKit::operator==):
(WebKit::VisibleContentRectUpdateInfo::exposedRect): Deleted.
(WebKit::VisibleContentRectUpdateInfo::unobscuredRect): Deleted.
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::updateViewExposedRect):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::setViewExposedRect):
(WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
(WebKit::DrawingAreaProxy::setExposedRect): Deleted.
(WebKit::DrawingAreaProxy::exposedRectChangedTimerFired): Deleted.
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::viewExposedRect):
(WebKit::DrawingAreaProxy::exposedRect): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::exposedContentRect):
(WebKit::WebPageProxy::unobscuredContentRect):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::setViewExposedRect):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
(WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect): Deleted.
(WebKit::RemoteLayerTreeDrawingAreaProxy::setExposedRect): Deleted. This was only used
to position the indicator, and confusingly used either exposedContentRect() or viewExposedRect()
depending on platform.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setViewExposedRect):
(WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea): Deleted.
(WebKit::RemoteLayerTreeDrawingArea::setExposedRect): Deleted.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::setViewExposedRect):
(WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Deleted.
(WebKit::TiledCoreAnimationDrawingArea::setExposedRect): Deleted.</pre>
<h3>Modified Paths</h3>
<ul>
<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="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#trunkSourceWebCorepagePageOverlayControllercpp">trunk/Source/WebCore/page/PageOverlayController.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageOverlayControllerh">trunk/Source/WebCore/page/PageOverlayController.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingcpp">trunk/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedVisibleContentRectUpdateInfocpp">trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedVisibleContentRectUpdateInfoh">trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplmm">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDrawingAreaProxycpp">trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDrawingAreaProxyh">trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxyh">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreamessagesin">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm</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="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/ChangeLog        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2016-04-05 Simon Fraser <simon.fraser@apple.com>
+
+ Rename exposedRect to viewExposedRect and propagate it as Optional<> through WK2
+ https://bugs.webkit.org/show_bug.cgi?id=156274
+
+ Reviewed by Tim Horton.
+
+ DrawingArea and FrameView have an "exposedRect" property that is used by applications
+ on Mac, like Mail, that embed web views inside scroll views. However, this name is very
+ similar to the "exposedContentRect" that is used on iOS to denote the part of the view
+ whose pixels are visible, including through blurring overlaid UI.
+
+ To disambiguate these two, rename the Mac "exposedRect" to "viewExposedRect" to
+ emphasize that it's a rect that takes into account clipping in the native view
+ hierarchy.
+
+ Also make this rect Optional<> through the DrawingArea, removing comparisons against
+ FloatRect::infiniteRect().
+
+ Do some other minor renaming in VisibleContentRectUpdateInfo.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::setViewExposedRect): This now takes an Optional<> because WebViewImpl::updateViewExposedRect()
+ can clear it.
+ * page/FrameView.h:
+ * page/PageOverlayController.cpp:
+ (WebCore::PageOverlayController::didChangeViewExposedRect):
+ (WebCore::PageOverlayController::didChangeExposedRect): Deleted.
+ * page/PageOverlayController.h:
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::computeTileCoverage):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
+
</ins><span class="cx"> 2016-04-06 Joanmarie Diggs <jdiggs@igalia.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION(r195463): [GTK] accessibility/roles-computedRoleString.html and accessibility/roles-exposed.html failing
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/page/FrameView.cpp        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -4907,25 +4907,25 @@
</span><span class="cx"> widget->notifyWidget(notification);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void FrameView::setExposedRect(FloatRect exposedRect)
</del><ins>+void FrameView::setViewExposedRect(Optional<FloatRect> viewExposedRect)
</ins><span class="cx"> {
</span><del>- if (m_exposedRect && m_exposedRect.value() == exposedRect)
</del><ins>+ if (m_viewExposedRect == viewExposedRect)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- m_exposedRect = exposedRect;
</del><ins>+ m_viewExposedRect = viewExposedRect;
</ins><span class="cx">
</span><span class="cx"> // FIXME: We should support clipping to the exposed rect for subframes as well.
</span><span class="cx"> if (!frame().isMainFrame())
</span><span class="cx"> return;
</span><span class="cx"> if (TiledBacking* tiledBacking = this->tiledBacking()) {
</span><span class="cx"> adjustTiledBackingCoverage();
</span><del>- tiledBacking->setTiledScrollingIndicatorPosition(exposedRect.location());
</del><ins>+ tiledBacking->setTiledScrollingIndicatorPosition(m_viewExposedRect.value().location());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (auto* view = renderView())
</span><span class="cx"> view->compositor().scheduleLayerFlush(false /* canThrottle */);
</span><span class="cx">
</span><del>- frame().mainFrame().pageOverlayController().didChangeExposedRect();
</del><ins>+ frame().mainFrame().pageOverlayController().didChangeViewExposedRect();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void FrameView::setViewportSizeForCSSViewportUnits(IntSize size)
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/page/FrameView.h        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -542,8 +542,8 @@
</span><span class="cx"> // of the view is actually exposed on screen (taking into account
</span><span class="cx"> // clipping by other UI elements), whereas visibleContentRect is
</span><span class="cx"> // internal to WebCore and doesn't respect those things.
</span><del>- WEBCORE_EXPORT void setExposedRect(FloatRect);
- Optional<FloatRect> exposedRect() const { return m_exposedRect; }
</del><ins>+ WEBCORE_EXPORT void setViewExposedRect(Optional<FloatRect>);
+ Optional<FloatRect> viewExposedRect() const { return m_viewExposedRect; }
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP)
</span><span class="cx"> void updateSnapOffsets() override;
</span><span class="lines">@@ -754,7 +754,7 @@
</span><span class="cx">
</span><span class="cx"> bool m_shouldUpdateWhileOffscreen;
</span><span class="cx">
</span><del>- Optional<FloatRect> m_exposedRect;
</del><ins>+ Optional<FloatRect> m_viewExposedRect;
</ins><span class="cx">
</span><span class="cx"> unsigned m_deferSetNeedsLayoutCount;
</span><span class="cx"> bool m_setNeedsLayoutWasDeferred;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageOverlayControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageOverlayController.cpp (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageOverlayController.cpp        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/page/PageOverlayController.cpp        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -243,7 +243,7 @@
</span><span class="cx"> graphicsLayer->setNeedsDisplay();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PageOverlayController::didChangeExposedRect()
</del><ins>+void PageOverlayController::didChangeViewExposedRect()
</ins><span class="cx"> {
</span><span class="cx"> m_mainFrame.page()->chrome().client().scheduleCompositingLayerFlush();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageOverlayControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageOverlayController.h (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageOverlayController.h        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/page/PageOverlayController.h        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> void didChangeDocumentSize();
</span><span class="cx"> void didChangeSettings();
</span><span class="cx"> void didChangeDeviceScaleFactor();
</span><del>- void didChangeExposedRect();
</del><ins>+ void didChangeViewExposedRect();
</ins><span class="cx"> void didScrollFrame(Frame&);
</span><span class="cx">
</span><span class="cx"> void didChangeOverlayFrame(PageOverlay&);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -226,7 +226,7 @@
</span><span class="cx"> TiledBacking::TileCoverage tileCoverage = TiledBacking::CoverageForVisibleArea;
</span><span class="cx"> bool useMinimalTilesDuringLiveResize = frameView.inLiveResize();
</span><span class="cx"> if (frameView.speculativeTilingEnabled() && !useMinimalTilesDuringLiveResize) {
</span><del>- bool clipsToExposedRect = static_cast<bool>(frameView.exposedRect());
</del><ins>+ bool clipsToExposedRect = static_cast<bool>(frameView.viewExposedRect());
</ins><span class="cx"> if (frameView.horizontalScrollbarMode() != ScrollbarAlwaysOff || clipsToExposedRect)
</span><span class="cx"> tileCoverage |= TiledBacking::CoverageForHorizontalScrolling;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -461,8 +461,8 @@
</span><span class="cx"> // Having a m_clipLayer indicates that we're doing scrolling via GraphicsLayers.
</span><span class="cx"> FloatRect visibleRect = m_clipLayer ? FloatRect({ 0, 0 }, frameView.unscaledVisibleContentSizeIncludingObscuredArea()) : frameView.visibleContentRect();
</span><span class="cx">
</span><del>- if (frameView.exposedRect())
- visibleRect.intersect(frameView.exposedRect().value());
</del><ins>+ if (frameView.viewExposedRect())
+ visibleRect.intersect(frameView.viewExposedRect().value());
</ins><span class="cx">
</span><span class="cx"> LOG_WITH_STREAM(Compositing, stream << "RenderLayerCompositor " << this << " flushPendingLayerChanges(" << isFlushRoot << ") " << visibleRect << " (stable viewport " << frameView.viewportIsStable() << ")");
</span><span class="cx"> rootLayer->flushCompositingState(visibleRect, frameView.viewportIsStable());
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/ChangeLog        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -1,3 +1,79 @@
</span><ins>+2016-04-05 Simon Fraser <simon.fraser@apple.com>
+
+ Rename exposedRect to viewExposedRect and propagate it as Optional<> through WK2
+ https://bugs.webkit.org/show_bug.cgi?id=156274
+
+ Reviewed by Tim Horton.
+
+ DrawingArea and FrameView have an "exposedRect" property that is used by applications
+ on Mac, like Mail, that embed web views inside scroll views. However, this name is very
+ similar to the "exposedContentRect" that is used on iOS to denote the part of the view
+ whose pixels are visible, including through blurring overlaid UI.
+
+ To disambiguate these two, rename the Mac "exposedRect" to "viewExposedRect" to
+ emphasize that it's a rect that takes into account clipping in the native view
+ hierarchy.
+
+ Also make this rect Optional<> through the DrawingArea, removing comparisons against
+ FloatRect::infiniteRect().
+
+ Do some other minor renaming in VisibleContentRectUpdateInfo.
+
+ * Shared/VisibleContentRectUpdateInfo.cpp: Rename "exposedRect" and "unobscuredRect" to
+ have "Content" in the names.
+ (WebKit::VisibleContentRectUpdateInfo::encode):
+ (WebKit::VisibleContentRectUpdateInfo::decode):
+ * Shared/VisibleContentRectUpdateInfo.h:
+ (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
+ (WebKit::VisibleContentRectUpdateInfo::exposedContentRect):
+ (WebKit::VisibleContentRectUpdateInfo::unobscuredContentRect):
+ (WebKit::operator==):
+ (WebKit::VisibleContentRectUpdateInfo::exposedRect): Deleted.
+ (WebKit::VisibleContentRectUpdateInfo::unobscuredRect): Deleted.
+ * UIProcess/Cocoa/WebViewImpl.mm:
+ (WebKit::WebViewImpl::updateViewExposedRect):
+ * UIProcess/DrawingAreaProxy.cpp:
+ (WebKit::DrawingAreaProxy::DrawingAreaProxy):
+ (WebKit::DrawingAreaProxy::setViewExposedRect):
+ (WebKit::DrawingAreaProxy::viewExposedRectChangedTimerFired):
+ (WebKit::DrawingAreaProxy::setExposedRect): Deleted.
+ (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired): Deleted.
+ * UIProcess/DrawingAreaProxy.h:
+ (WebKit::DrawingAreaProxy::viewExposedRect):
+ (WebKit::DrawingAreaProxy::exposedRect): Deleted.
+ * UIProcess/WebPageProxy.h:
+ (WebKit::WebPageProxy::exposedContentRect):
+ (WebKit::WebPageProxy::unobscuredContentRect):
+ * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
+ * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::setViewExposedRect):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect): Deleted.
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::setExposedRect): Deleted. This was only used
+ to position the indicator, and confusingly used either exposedContentRect() or viewExposedRect()
+ depending on platform.
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
+ * WebProcess/WebPage/DrawingArea.h:
+ * WebProcess/WebPage/DrawingArea.messages.in:
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::updateVisibleContentRects):
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+ (WebKit::RemoteLayerTreeDrawingArea::setViewExposedRect):
+ (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
+ (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
+ (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea): Deleted.
+ (WebKit::RemoteLayerTreeDrawingArea::setExposedRect): Deleted.
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
+ (WebKit::TiledCoreAnimationDrawingArea::setViewExposedRect):
+ (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
+ (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Deleted.
+ (WebKit::TiledCoreAnimationDrawingArea::setExposedRect): Deleted.
+
</ins><span class="cx"> 2016-04-05 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Make CMake-generated binaries on Mac able to run
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedVisibleContentRectUpdateInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -32,8 +32,8 @@
</span><span class="cx">
</span><span class="cx"> void VisibleContentRectUpdateInfo::encode(IPC::ArgumentEncoder& encoder) const
</span><span class="cx"> {
</span><del>- encoder << m_exposedRect;
- encoder << m_unobscuredRect;
</del><ins>+ encoder << m_exposedContentRect;
+ encoder << m_unobscuredContentRect;
</ins><span class="cx"> encoder << m_unobscuredRectInScrollViewCoordinates;
</span><span class="cx"> encoder << m_customFixedPositionRect;
</span><span class="cx"> encoder << m_lastLayerTreeTransactionID;
</span><span class="lines">@@ -49,9 +49,9 @@
</span><span class="cx">
</span><span class="cx"> bool VisibleContentRectUpdateInfo::decode(IPC::ArgumentDecoder& decoder, VisibleContentRectUpdateInfo& result)
</span><span class="cx"> {
</span><del>- if (!decoder.decode(result.m_exposedRect))
</del><ins>+ if (!decoder.decode(result.m_exposedContentRect))
</ins><span class="cx"> return false;
</span><del>- if (!decoder.decode(result.m_unobscuredRect))
</del><ins>+ if (!decoder.decode(result.m_unobscuredContentRect))
</ins><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(result.m_unobscuredRectInScrollViewCoordinates))
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedVisibleContentRectUpdateInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -39,9 +39,9 @@
</span><span class="cx"> public:
</span><span class="cx"> VisibleContentRectUpdateInfo() = default;
</span><span class="cx">
</span><del>- VisibleContentRectUpdateInfo(const WebCore::FloatRect& exposedRect, const WebCore::FloatRect& unobscuredRect, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate, uint64_t lastLayerTreeTransactionId)
- : m_exposedRect(exposedRect)
- , m_unobscuredRect(unobscuredRect)
</del><ins>+ VisibleContentRectUpdateInfo(const WebCore::FloatRect& exposedContentRect, const WebCore::FloatRect& unobscuredContentRect, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate, uint64_t lastLayerTreeTransactionId)
+ : m_exposedContentRect(exposedContentRect)
+ , m_unobscuredContentRect(unobscuredContentRect)
</ins><span class="cx"> , m_unobscuredRectInScrollViewCoordinates(unobscuredRectInScrollViewCoordinates)
</span><span class="cx"> , m_customFixedPositionRect(customFixedPositionRect)
</span><span class="cx"> , m_lastLayerTreeTransactionID(lastLayerTreeTransactionId)
</span><span class="lines">@@ -56,8 +56,8 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- const WebCore::FloatRect& exposedRect() const { return m_exposedRect; }
- const WebCore::FloatRect& unobscuredRect() const { return m_unobscuredRect; }
</del><ins>+ const WebCore::FloatRect& exposedContentRect() const { return m_exposedContentRect; }
+ const WebCore::FloatRect& unobscuredContentRect() const { return m_unobscuredContentRect; }
</ins><span class="cx"> const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates() const { return m_unobscuredRectInScrollViewCoordinates; }
</span><span class="cx"> const WebCore::FloatRect& customFixedPositionRect() const { return m_customFixedPositionRect; }
</span><span class="cx"> double scale() const { return m_scale; }
</span><span class="lines">@@ -76,8 +76,8 @@
</span><span class="cx"> static bool decode(IPC::ArgumentDecoder&, VisibleContentRectUpdateInfo&);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- WebCore::FloatRect m_exposedRect;
- WebCore::FloatRect m_unobscuredRect;
</del><ins>+ WebCore::FloatRect m_exposedContentRect;
+ WebCore::FloatRect m_unobscuredContentRect;
</ins><span class="cx"> WebCore::FloatRect m_unobscuredRectInScrollViewCoordinates;
</span><span class="cx"> WebCore::FloatRect m_customFixedPositionRect;
</span><span class="cx"> uint64_t m_lastLayerTreeTransactionID { 0 };
</span><span class="lines">@@ -95,8 +95,8 @@
</span><span class="cx"> {
</span><span class="cx"> // Note: the comparison doesn't include timestamp and velocity since we care about equality based on the other data.
</span><span class="cx"> return a.scale() == b.scale()
</span><del>- && a.exposedRect() == b.exposedRect()
- && a.unobscuredRect() == b.unobscuredRect()
</del><ins>+ && a.exposedContentRect() == b.exposedContentRect()
+ && a.unobscuredContentRect() == b.unobscuredContentRect()
</ins><span class="cx"> && a.customFixedPositionRect() == b.customFixedPositionRect()
</span><span class="cx"> && a.horizontalVelocity() == b.horizontalVelocity()
</span><span class="cx"> && a.verticalVelocity() == b.verticalVelocity()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -871,7 +871,7 @@
</span><span class="cx"> exposedRect = CGRectUnion(m_contentPreparationRect, exposedRect);
</span><span class="cx">
</span><span class="cx"> if (auto drawingArea = m_page->drawingArea())
</span><del>- drawingArea->setExposedRect(m_clipsToVisibleRect ? WebCore::FloatRect(exposedRect) : WebCore::FloatRect::infiniteRect());
</del><ins>+ drawingArea->setViewExposedRect(m_clipsToVisibleRect ? Optional<WebCore::FloatRect>(exposedRect) : Nullopt);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebViewImpl::setClipsToVisibleRect(bool clipsToVisibleRect)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDrawingAreaProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> , m_webPageProxy(webPageProxy)
</span><span class="cx"> , m_size(webPageProxy.viewSize())
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>- , m_exposedRectChangedTimer(RunLoop::main(), this, &DrawingAreaProxy::exposedRectChangedTimerFired)
</del><ins>+ , m_viewExposedRectChangedTimer(RunLoop::main(), this, &DrawingAreaProxy::viewExposedRectChangedTimerFired)
</ins><span class="cx"> #endif
</span><span class="cx"> {
</span><span class="cx"> m_webPageProxy.process().addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_webPageProxy.pageID(), *this);
</span><span class="lines">@@ -63,27 +63,27 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-void DrawingAreaProxy::setExposedRect(const FloatRect& exposedRect)
</del><ins>+void DrawingAreaProxy::setViewExposedRect(Optional<WebCore::FloatRect> viewExposedRect)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_webPageProxy.isValid())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_exposedRect = exposedRect;
</del><ins>+ m_viewExposedRect = viewExposedRect;
</ins><span class="cx">
</span><del>- if (!m_exposedRectChangedTimer.isActive())
- m_exposedRectChangedTimer.startOneShot(0);
</del><ins>+ if (!m_viewExposedRectChangedTimer.isActive())
+ m_viewExposedRectChangedTimer.startOneShot(0);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void DrawingAreaProxy::exposedRectChangedTimerFired()
</del><ins>+void DrawingAreaProxy::viewExposedRectChangedTimerFired()
</ins><span class="cx"> {
</span><span class="cx"> if (!m_webPageProxy.isValid())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (m_exposedRect == m_lastSentExposedRect)
</del><ins>+ if (m_viewExposedRect == m_lastSentViewExposedRect)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- m_webPageProxy.process().send(Messages::DrawingArea::SetExposedRect(m_exposedRect), m_webPageProxy.pageID());
- m_lastSentExposedRect = m_exposedRect;
</del><ins>+ m_webPageProxy.process().send(Messages::DrawingArea::SetViewExposedRect(m_viewExposedRect), m_webPageProxy.pageID());
+ m_lastSentViewExposedRect = m_viewExposedRect;
</ins><span class="cx"> }
</span><span class="cx"> #endif // PLATFORM(MAC)
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDrawingAreaProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -76,12 +76,10 @@
</span><span class="cx"> virtual void commitTransientZoom(double, WebCore::FloatPoint) { }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>- virtual void setExposedRect(const WebCore::FloatRect&);
- WebCore::FloatRect exposedRect() const { return m_exposedRect; }
</del><ins>+ virtual void setViewExposedRect(Optional<WebCore::FloatRect>);
+ Optional<WebCore::FloatRect> viewExposedRect() const { return m_viewExposedRect; }
+ void viewExposedRectChangedTimerFired();
</ins><span class="cx"> #endif
</span><del>-#if PLATFORM(COCOA)
- void exposedRectChangedTimerFired();
-#endif
</del><span class="cx">
</span><span class="cx"> virtual void updateDebugIndicator() { }
</span><span class="cx">
</span><span class="lines">@@ -128,9 +126,9 @@
</span><span class="cx"> virtual void intrinsicContentSizeDidChange(const WebCore::IntSize&) { }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>- RunLoop::Timer<DrawingAreaProxy> m_exposedRectChangedTimer;
- WebCore::FloatRect m_exposedRect;
- WebCore::FloatRect m_lastSentExposedRect;
</del><ins>+ RunLoop::Timer<DrawingAreaProxy> m_viewExposedRectChangedTimer;
+ Optional<WebCore::FloatRect> m_viewExposedRect;
+ Optional<WebCore::FloatRect> m_lastSentViewExposedRect;
</ins><span class="cx"> #endif // PLATFORM(MAC)
</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 (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -449,8 +449,8 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> void executeEditCommand(const String& commandName, std::function<void (CallbackBase::Error)>);
</span><span class="cx"> double displayedContentScale() const { return m_lastVisibleContentRectUpdate.scale(); }
</span><del>- const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedRect(); }
- const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredRect(); }
</del><ins>+ const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedContentRect(); }
+ const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredContentRect(); }
</ins><span class="cx">
</span><span class="cx"> void updateVisibleContentRects(const WebCore::FloatRect& exposedRect, const WebCore::FloatRect& unobscuredRect, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate);
</span><span class="cx"> void resendLastVisibleContentRects();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -63,10 +63,8 @@
</span><span class="cx"> // Once we have other callbacks, it may make sense to have a before-commit/after-commit option.
</span><span class="cx"> void dispatchAfterEnsuringDrawing(std::function<void (CallbackBase::Error)>) override;
</span><span class="cx">
</span><del>- WebCore::FloatRect scaledExposedRect() const;
-
</del><span class="cx"> #if PLATFORM(MAC)
</span><del>- void setExposedRect(const WebCore::FloatRect&) override;
</del><ins>+ void setViewExposedRect(Optional<WebCore::FloatRect>) override;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> float indicatorScale(WebCore::IntSize contentsSize) const;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -157,18 +157,6 @@
</span><span class="cx"> sendUpdateGeometry();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-FloatRect RemoteLayerTreeDrawingAreaProxy::scaledExposedRect() const
-{
-#if PLATFORM(IOS)
- return m_webPageProxy.exposedContentRect();
-#else
- FloatRect scaledExposedRect = exposedRect();
- float scale = 1 / m_webPageProxy.pageScaleFactor();
- scaledExposedRect.scale(scale, scale);
- return scaledExposedRect;
-#endif
-}
-
</del><span class="cx"> void RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry()
</span><span class="cx"> {
</span><span class="cx"> m_lastSentSize = m_size;
</span><span class="lines">@@ -259,9 +247,9 @@
</span><span class="cx"> static const float indicatorInset = 10;
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-void RemoteLayerTreeDrawingAreaProxy::setExposedRect(const WebCore::FloatRect& r)
</del><ins>+void RemoteLayerTreeDrawingAreaProxy::setViewExposedRect(Optional<WebCore::FloatRect> viewExposedRect)
</ins><span class="cx"> {
</span><del>- DrawingAreaProxy::setExposedRect(r);
</del><ins>+ DrawingAreaProxy::setViewExposedRect(viewExposedRect);
</ins><span class="cx"> updateDebugIndicatorPosition();
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="lines">@@ -274,7 +262,10 @@
</span><span class="cx"> float absoluteInset = indicatorInset / m_webPageProxy.displayedContentScale();
</span><span class="cx"> tiledMapLocation += FloatSize(absoluteInset, absoluteInset);
</span><span class="cx"> #else
</span><del>- FloatPoint tiledMapLocation = exposedRect().location();
</del><ins>+ FloatPoint tiledMapLocation;
+ if (viewExposedRect())
+ tiledMapLocation = viewExposedRect().value().location();
+
</ins><span class="cx"> tiledMapLocation += FloatSize(indicatorInset, indicatorInset);
</span><span class="cx"> float scale = 1 / m_webPageProxy.pageScaleFactor();
</span><span class="cx"> tiledMapLocation.scale(scale, scale);
</span><span class="lines">@@ -339,7 +330,15 @@
</span><span class="cx"> [m_exposedRectIndicatorLayer setBorderWidth:counterScaledBorder];
</span><span class="cx">
</span><span class="cx"> if (m_webPageProxy.delegatesScrolling()) {
</span><del>- FloatRect scaledExposedRect = this->scaledExposedRect();
</del><ins>+ FloatRect scaledExposedRect;
+#if PLATFORM(IOS)
+ scaledExposedRect = m_webPageProxy.exposedContentRect();
+#else
+ if (viewExposedRect())
+ scaledExposedRect = viewExposedRect().value();
+ float scale = 1 / m_webPageProxy.pageScaleFactor();
+ scaledExposedRect.scale(scale, scale);
+#endif
</ins><span class="cx"> [m_exposedRectIndicatorLayer setPosition:scaledExposedRect.location()];
</span><span class="cx"> [m_exposedRectIndicatorLayer setBounds:FloatRect(FloatPoint(), scaledExposedRect.size())];
</span><span class="cx"> } else {
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -1343,7 +1343,7 @@
</span><span class="cx"> m_frame->coreFrame()->view()->setProhibitsScrolling(shouldDisableScrolling);
</span><span class="cx"> m_frame->coreFrame()->view()->setVisualUpdatesAllowedByClient(!webPage->shouldExtendIncrementalRenderingSuppression());
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>- m_frame->coreFrame()->view()->setExposedRect(webPage->drawingArea()->exposedRect());
</del><ins>+ m_frame->coreFrame()->view()->setViewExposedRect(webPage->drawingArea()->viewExposedRect());
</ins><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> m_frame->coreFrame()->view()->setDelegatesScrolling(true);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -88,8 +88,9 @@
</span><span class="cx"> virtual void mainFrameContentSizeChanged(const WebCore::IntSize&) { }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>- virtual void setExposedRect(const WebCore::FloatRect&) = 0;
- virtual WebCore::FloatRect exposedRect() const = 0;
</del><ins>+ virtual void setViewExposedRect(Optional<WebCore::FloatRect>) = 0;
+ virtual Optional<WebCore::FloatRect> viewExposedRect() const = 0;
+
</ins><span class="cx"> virtual void acceleratedAnimationDidStart(uint64_t /*layerID*/, const String& /*key*/, double /*startTime*/) { }
</span><span class="cx"> virtual void acceleratedAnimationDidEnd(uint64_t /*layerID*/, const String& /*key*/) { }
</span><span class="cx"> virtual void addFence(const WebCore::MachSendRight&) { }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreamessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> UpdateGeometry(WebCore::IntSize viewSize, WebCore::IntSize layerPosition, bool flushSynchronously, WebCore::MachSendRight fencePort)
</span><span class="cx"> SetDeviceScaleFactor(float deviceScaleFactor)
</span><span class="cx"> SetColorSpace(struct WebKit::ColorSpaceData colorSpace)
</span><del>- SetExposedRect(WebCore::FloatRect exposedRect)
</del><ins>+ SetViewExposedRect(Optional<WebCore::FloatRect> viewExposedRect)
</ins><span class="cx">
</span><span class="cx"> AdjustTransientZoom(double scale, WebCore::FloatPoint origin)
</span><span class="cx"> CommitTransientZoom(double scale, WebCore::FloatPoint origin)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -2932,11 +2932,11 @@
</span><span class="cx"> m_oldestNonStableUpdateVisibleContentRectsTimestamp = std::chrono::milliseconds(static_cast<std::chrono::milliseconds::rep>(oldestTimestamp * 1000));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- FloatRect exposedRect = visibleContentRectUpdateInfo.exposedRect();
- FloatRect adjustedExposedRect = adjustExposedRectForBoundedScale(exposedRect, visibleContentRectUpdateInfo.scale(), boundedScale);
- m_drawingArea->setExposedContentRect(adjustedExposedRect);
</del><ins>+ FloatRect exposedContentRect = visibleContentRectUpdateInfo.exposedContentRect();
+ FloatRect adjustedExposedContentRect = adjustExposedRectForBoundedScale(exposedContentRect, visibleContentRectUpdateInfo.scale(), boundedScale);
+ m_drawingArea->setExposedContentRect(adjustedExposedContentRect);
</ins><span class="cx">
</span><del>- IntPoint scrollPosition = roundedIntPoint(visibleContentRectUpdateInfo.unobscuredRect().location());
</del><ins>+ IntPoint scrollPosition = roundedIntPoint(visibleContentRectUpdateInfo.unobscuredContentRect().location());
</ins><span class="cx">
</span><span class="cx"> float floatBoundedScale = boundedScale;
</span><span class="cx"> bool hasSetPageScale = false;
</span><span class="lines">@@ -2963,7 +2963,7 @@
</span><span class="cx"> if (m_viewportConfiguration.setCanIgnoreScalingConstraints(m_ignoreViewportScalingConstraints && visibleContentRectUpdateInfo.allowShrinkToFit()))
</span><span class="cx"> viewportConfigurationChanged();
</span><span class="cx">
</span><del>- frameView.setUnobscuredContentSize(visibleContentRectUpdateInfo.unobscuredRect().size());
</del><ins>+ frameView.setUnobscuredContentSize(visibleContentRectUpdateInfo.unobscuredContentRect().size());
</ins><span class="cx">
</span><span class="cx"> double horizontalVelocity = visibleContentRectUpdateInfo.horizontalVelocity();
</span><span class="cx"> double verticalVelocity = visibleContentRectUpdateInfo.verticalVelocity();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -88,8 +88,8 @@
</span><span class="cx"> void forceRepaint() override;
</span><span class="cx"> bool forceRepaintAsync(uint64_t) override { return false; }
</span><span class="cx">
</span><del>- void setExposedRect(const WebCore::FloatRect&) override;
- WebCore::FloatRect exposedRect() const override { return m_scrolledExposedRect; }
</del><ins>+ void setViewExposedRect(Optional<WebCore::FloatRect>) override;
+ Optional<WebCore::FloatRect> viewExposedRect() const override { return m_scrolledViewExposedRect; }
</ins><span class="cx">
</span><span class="cx"> void acceleratedAnimationDidStart(uint64_t layerID, const String& key, double startTime) override;
</span><span class="cx"> void acceleratedAnimationDidEnd(uint64_t layerID, const String& key) override;
</span><span class="lines">@@ -146,8 +146,8 @@
</span><span class="cx">
</span><span class="cx"> WebCore::IntSize m_viewSize;
</span><span class="cx">
</span><del>- WebCore::FloatRect m_exposedRect;
- WebCore::FloatRect m_scrolledExposedRect;
</del><ins>+ Optional<WebCore::FloatRect> m_viewExposedRect;
+ Optional<WebCore::FloatRect> m_scrolledViewExposedRect;
</ins><span class="cx">
</span><span class="cx"> WebCore::Timer m_layerFlushTimer;
</span><span class="cx"> bool m_isFlushingSuspended;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -58,8 +58,6 @@
</span><span class="cx"> : DrawingArea(DrawingAreaTypeRemoteLayerTree, webPage)
</span><span class="cx"> , m_remoteLayerTreeContext(std::make_unique<RemoteLayerTreeContext>(webPage))
</span><span class="cx"> , m_rootLayer(GraphicsLayer::create(graphicsLayerFactory(), *this))
</span><del>- , m_exposedRect(FloatRect::infiniteRect())
- , m_scrolledExposedRect(FloatRect::infiniteRect())
</del><span class="cx"> , m_layerFlushTimer(*this, &RemoteLayerTreeDrawingArea::flushLayers)
</span><span class="cx"> , m_isFlushingSuspended(false)
</span><span class="cx"> , m_hasDeferredFlush(false)
</span><span class="lines">@@ -231,9 +229,9 @@
</span><span class="cx"> m_remoteLayerTreeContext->animationDidEnd(layerID, key);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RemoteLayerTreeDrawingArea::setExposedRect(const FloatRect& exposedRect)
</del><ins>+void RemoteLayerTreeDrawingArea::setViewExposedRect(Optional<WebCore::FloatRect> viewExposedRect)
</ins><span class="cx"> {
</span><del>- m_exposedRect = exposedRect;
</del><ins>+ m_viewExposedRect = viewExposedRect;
</ins><span class="cx"> updateScrolledExposedRect();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -266,16 +264,16 @@
</span><span class="cx"> if (!frameView)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_scrolledExposedRect = m_exposedRect;
</del><ins>+ m_scrolledViewExposedRect = m_viewExposedRect;
</ins><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><del>- if (!m_exposedRect.isInfinite()) {
</del><ins>+ if (m_viewExposedRect) {
</ins><span class="cx"> ScrollOffset scrollOffset = frameView->scrollOffsetFromPosition(frameView->scrollPosition());
</span><del>- m_scrolledExposedRect.moveBy(scrollOffset);
</del><ins>+ m_scrolledViewExposedRect.value().moveBy(scrollOffset);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- frameView->setExposedRect(m_scrolledExposedRect);
</del><ins>+ frameView->setViewExposedRect(m_scrolledViewExposedRect);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> TiledBacking* RemoteLayerTreeDrawingArea::mainFrameTiledBacking() const
</span><span class="lines">@@ -355,9 +353,10 @@
</span><span class="cx"> m_webPage.layoutIfNeeded();
</span><span class="cx">
</span><span class="cx"> FloatRect visibleRect(FloatPoint(), m_viewSize);
</span><del>- visibleRect.intersect(m_scrolledExposedRect);
</del><ins>+ if (m_scrolledViewExposedRect)
+ visibleRect.intersect(m_scrolledViewExposedRect.value());
</ins><span class="cx">
</span><del>-#if TARGET_OS_IPHONE || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
</del><ins>+#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
</ins><span class="cx"> RefPtr<WebPage> retainedPage = &m_webPage;
</span><span class="cx"> [CATransaction addCommitHandler:[retainedPage] {
</span><span class="cx"> if (Page* corePage = retainedPage->corePage()) {
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -72,8 +72,8 @@
</span><span class="cx"> void updatePreferences(const WebPreferencesStore&) override;
</span><span class="cx"> void mainFrameContentSizeChanged(const WebCore::IntSize&) override;
</span><span class="cx">
</span><del>- void setExposedRect(const WebCore::FloatRect&) override;
- WebCore::FloatRect exposedRect() const override { return m_scrolledExposedRect; }
</del><ins>+ void setViewExposedRect(Optional<WebCore::FloatRect>) override;
+ Optional<WebCore::FloatRect> viewExposedRect() const override { return m_scrolledViewExposedRect; }
</ins><span class="cx">
</span><span class="cx"> bool supportsAsyncScrolling() override { return true; }
</span><span class="cx">
</span><span class="lines">@@ -133,8 +133,8 @@
</span><span class="cx">
</span><span class="cx"> bool m_isPaintingSuspended;
</span><span class="cx">
</span><del>- WebCore::FloatRect m_exposedRect;
- WebCore::FloatRect m_scrolledExposedRect;
</del><ins>+ Optional<WebCore::FloatRect> m_viewExposedRect;
+ Optional<WebCore::FloatRect> m_scrolledViewExposedRect;
</ins><span class="cx">
</span><span class="cx"> WebCore::IntSize m_lastSentIntrinsicContentSize;
</span><span class="cx"> bool m_inUpdateGeometry;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (199110 => 199111)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2016-04-06 19:13:50 UTC (rev 199110)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2016-04-06 19:22:57 UTC (rev 199111)
</span><span class="lines">@@ -78,8 +78,6 @@
</span><span class="cx"> , m_layerTreeStateIsFrozen(false)
</span><span class="cx"> , m_layerFlushScheduler(this)
</span><span class="cx"> , m_isPaintingSuspended(!(parameters.viewState & ViewState::IsVisible))
</span><del>- , m_exposedRect(FloatRect::infiniteRect())
- , m_scrolledExposedRect(FloatRect::infiniteRect())
</del><span class="cx"> , m_transientZoomScale(1)
</span><span class="cx"> , m_sendDidUpdateViewStateTimer(RunLoop::main(), this, &TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired)
</span><span class="cx"> , m_wantsDidUpdateViewState(false)
</span><span class="lines">@@ -413,7 +411,8 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> FloatRect visibleRect = [m_hostingLayer frame];
</span><del>- visibleRect.intersect(m_scrolledExposedRect);
</del><ins>+ if (m_scrolledViewExposedRect)
+ visibleRect.intersect(m_scrolledViewExposedRect.value());
</ins><span class="cx">
</span><span class="cx"> // Because our view-relative overlay root layer is not attached to the main GraphicsLayer tree, we need to flush it manually.
</span><span class="cx"> if (m_viewOverlayRootLayer)
</span><span class="lines">@@ -496,9 +495,9 @@
</span><span class="cx"> [[NSNotificationCenter defaultCenter] postNotificationName:@"NSCAViewRenderDidResumeNotification" object:nil userInfo:[NSDictionary dictionaryWithObject:m_hostingLayer.get() forKey:@"layer"]];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void TiledCoreAnimationDrawingArea::setExposedRect(const FloatRect& exposedRect)
</del><ins>+void TiledCoreAnimationDrawingArea::setViewExposedRect(Optional<WebCore::FloatRect> viewExposedRect)
</ins><span class="cx"> {
</span><del>- m_exposedRect = exposedRect;
</del><ins>+ m_viewExposedRect = viewExposedRect;
</ins><span class="cx"> updateScrolledExposedRect();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -508,16 +507,16 @@
</span><span class="cx"> if (!frameView)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_scrolledExposedRect = m_exposedRect;
</del><ins>+ m_scrolledViewExposedRect = m_viewExposedRect;
</ins><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><del>- if (!m_exposedRect.isInfinite()) {
</del><ins>+ if (m_viewExposedRect) {
</ins><span class="cx"> ScrollOffset scrollOffset = frameView->scrollOffsetFromPosition(frameView->scrollPosition());
</span><del>- m_scrolledExposedRect.moveBy(scrollOffset);
</del><ins>+ m_scrolledViewExposedRect.value().moveBy(scrollOffset);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- frameView->setExposedRect(m_scrolledExposedRect);
</del><ins>+ frameView->setViewExposedRect(m_scrolledViewExposedRect);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TiledCoreAnimationDrawingArea::updateGeometry(const IntSize& viewSize, const IntSize& layerPosition, bool flushSynchronously, const WebCore::MachSendRight& fencePort)
</span></span></pre>
</div>
</div>
</body>
</html>