<!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>[175296] branches/safari-600.3-branch/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/175296">175296</a></dd>
<dt>Author</dt> <dd>dburkart@apple.com</dd>
<dt>Date</dt> <dd>2014-10-28 19:26:28 -0700 (Tue, 28 Oct 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/174231">r174231</a>. rdar://problem/18640833</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6003branchSourceWebCoreCMakeListstxt">branches/safari-600.3-branch/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#branchessafari6003branchSourceWebCoreChangeLog">branches/safari-600.3-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6003branchSourceWebCoreWebCoreexpin">branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#branchessafari6003branchSourceWebCoreWebCorevcxprojWebCorevcxproj">branches/safari-600.3-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#branchessafari6003branchSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">branches/safari-600.3-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#branchessafari6003branchSourceWebCoreWebCorexcodeprojprojectpbxproj">branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari6003branchSourceWebCoreloaderEmptyClientsh">branches/safari-600.3-branch/Source/WebCore/loader/EmptyClients.h</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepageChromeClienth">branches/safari-600.3-branch/Source/WebCore/page/ChromeClient.h</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepageEventHandlercpp">branches/safari-600.3-branch/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepageFrameViewcpp">branches/safari-600.3-branch/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepageFrameViewh">branches/safari-600.3-branch/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepageMainFramecpp">branches/safari-600.3-branch/Source/WebCore/page/MainFrame.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepageMainFrameh">branches/safari-600.3-branch/Source/WebCore/page/MainFrame.h</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepagePagecpp">branches/safari-600.3-branch/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebCoreplatformgraphicsGraphicsLayerClienth">branches/safari-600.3-branch/Source/WebCore/platform/graphics/GraphicsLayerClient.h</a></li>
<li><a href="#branchessafari6003branchSourceWebCorerenderingRenderLayercpp">branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayer.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebCorerenderingRenderLayerCompositorcpp">branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebCorerenderingRenderLayerCompositorh">branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayerCompositor.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKitmacChangeLog">branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#branchessafari6003branchSourceWebKitmacWebCoreSupportWebChromeClienth">branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKitmacWebCoreSupportWebChromeClientmm">branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKitwinChangeLog">branches/safari-600.3-branch/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#branchessafari6003branchSourceWebKitwinWebCoreSupportWebChromeClientcpp">branches/safari-600.3-branch/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKitwinWebCoreSupportWebChromeClienth">branches/safari-600.3-branch/Source/WebKit/win/WebCoreSupport/WebChromeClient.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2CMakeListstxt">branches/safari-600.3-branch/Source/WebKit2/CMakeLists.txt</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2ChangeLog">branches/safari-600.3-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2SharedWebRenderLayercpp">branches/safari-600.3-branch/Source/WebKit2/Shared/WebRenderLayer.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2SharedWebRenderObjectcpp">branches/safari-600.3-branch/Source/WebKit2/Shared/WebRenderObject.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebKit2xcodeprojprojectpbxproj">branches/safari-600.3-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessInjectedBundleAPIcWKBundleAPICasth">branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePagecpp">branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePageOverlaycpp">branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessInjectedBundleAPImacWKWebProcessPlugInBrowserContextControllermm">branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebCoreSupportWebChromeClienth">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebCoreSupportWebInspectorClientcpp">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebCoreSupportWebInspectorClienth">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebCoreSupportmacWebEditorClientMacmm">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageDrawingAreah">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/DrawingArea.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageFindControllercpp">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/FindController.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageFindControllerh">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/FindController.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageLayerTreeHosth">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageServicesOverlayControllerh">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageWebPagecpp">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageWebPageh">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageiosFindControllerIOSmm">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/ios/FindControllerIOS.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageiosFindIndicatorOverlayClientIOSh">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPagemacServicesOverlayControllermm">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPagemacWKAccessibilityWebPageObjectMacmm">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebProcesscpp">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari6003branchSourceWebCorepagePageOverlaycpp">branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepagePageOverlayh">branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.h</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepagePageOverlayControllercpp">branches/safari-600.3-branch/Source/WebCore/page/PageOverlayController.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebCorepagePageOverlayControllerh">branches/safari-600.3-branch/Source/WebCore/page/PageOverlayController.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageWebPageOverlaycpp">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPageWebPageOverlayh">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPagePageOverlaycpp">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPagePageOverlayh">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlay.h</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPagePageOverlayControllercpp">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp</a></li>
<li><a href="#branchessafari6003branchSourceWebKit2WebProcessWebPagePageOverlayControllerh">branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlayController.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6003branchSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/CMakeLists.txt (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/CMakeLists.txt        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/CMakeLists.txt        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -1917,6 +1917,8 @@
</span><span class="cx"> page/PageConsole.cpp
</span><span class="cx"> page/PageGroup.cpp
</span><span class="cx"> page/PageGroupLoadDeferrer.cpp
</span><ins>+ page/PageOverlay.cpp
+ page/PageOverlayController.cpp
</ins><span class="cx"> page/PageSerializer.cpp
</span><span class="cx"> page/PageThrottler.cpp
</span><span class="cx"> page/PageVisibilityState.cpp
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/ChangeLog (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/ChangeLog        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/ChangeLog        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -1,5 +1,160 @@
</span><span class="cx"> 2014-10-28 Dana Burkart <dburkart@apple.com>
</span><span class="cx">
</span><ins>+ Merge r174231. <rdar://problem/18640833>
+
+ 2014-10-02 Tim Horton <timothy_horton@apple.com>
+
+ Move PageOverlay[Controller] to WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=137164
+ <rdar://problem/18508258>
+
+ Reviewed by Anders Carlsson.
+
+ * CMakeLists.txt:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+ Make the appropriate build system changes.
+
+ * WebCore.exp.in:
+ Export the new PageOverlay[Controller] symbols from WebCore.
+
+ * loader/EmptyClients.h:
+ * page/ChromeClient.h:
+ (WebCore::ChromeClient::documentOverlayLayerForFrame): Deleted.
+ Add attachViewOverlayGraphicsLayer, which allows PageOverlayController
+ to push view-relative page overlay root layers down to WebKit to be
+ installed just inside the view.
+
+ Remove documentOverlayLayerForFrame because RenderLayerCompositor can now
+ talk directly to PageOverlayController.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleMousePressEvent):
+ (WebCore::EventHandler::mouseMoved):
+ (WebCore::EventHandler::handleMouseReleaseEvent):
+ When the mouse is moved, pressed, or released, give PageOverlayController
+ the first shot at handling the event.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::setFrameRect):
+ Inform PageOverlayController that the main FrameView's size changed,
+ so it can update the size of view-relative overlays.
+
+ (WebCore::FrameView::setContentsSize):
+ Inform PageOverlayController that the main FrameView's contents size changed,
+ so it can update the size of document-relative overlays.
+
+ (WebCore::FrameView::setFixedVisibleContentRect):
+ (WebCore::FrameView::didChangeScrollOffset):
+ (WebCore::FrameView::scrollTo):
+ (WebCore::FrameView::wheelEvent):
+ Inform PageOverlayController that something scrolled.
+
+ (WebCore::FrameView::setExposedRect):
+ Inform PageOverlayController that the exposed rect changed, so it can push
+ the new exposed rect down to the overlays.
+
+ * page/FrameView.h:
+ Add didChangeScrollOffset.
+
+ * page/MainFrame.cpp:
+ (WebCore::MainFrame::MainFrame):
+ * page/MainFrame.h:
+ Keep one PageOverlayController per MainFrame.
+
+ * page/Page.cpp:
+ (WebCore::Page::setDeviceScaleFactor):
+ Inform PageOverlayController that the device scale factor changed.
+
+ (WebCore::Page::setSessionID):
+ Remove a blank line.
+
+ * page/PageOverlay.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp.
+ Move PageOverlay from WebKit2 to WebCore.
+ A few overarching changes that I won't detail in each place:
+ - references instead of pointers in many places
+ - WebCore types instead of WebKit2 types everywhere
+
+ (WebCore::PageOverlay::bounds):
+ It is possible to install an overlay before we have a FrameView.
+ We will eventually get a view/contents size changed notification and try again.
+
+ (WebCore::PageOverlay::copyAccessibilityAttributeStringValueForPoint):
+ (WebCore::PageOverlay::copyAccessibilityAttributeBoolValueForPoint):
+ (WebCore::PageOverlay::copyAccessibilityAttributeNames):
+ Split copyAccessibilityAttribute into "StringValueForPoint" and "BoolValueForPoint"
+ variants, because we don't have anything like WKTypeRef here.
+
+ * page/PageOverlay.h: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlay.h.
+ Make PageOverlay a normal RefCounted object instead of a WebKit2 API object.
+ Leave a comment noting that we should move the PageOverlay's GraphicsLayer
+ to PageOverlay instead of a map on PageOverlayController.
+
+ * page/PageOverlayController.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp.
+ Move PageOverlayController from WebKit2 to WebCore.
+ A few overarching changes that I won't detail in each place:
+ - references instead of pointers in many places
+ - WebCore types instead of WebKit2 types everywhere
+
+ Leave a FIXME that didChangeSettings is not currently called when settings change.
+ This is not a problem for normal use of overlays, only for dynamically changing
+ layer border/repaint counter settings.
+
+ (WebCore::PageOverlayController::PageOverlayController):
+ (WebCore::PageOverlayController::createRootLayersIfNeeded):
+ We will now lazily initialize the root layers when we first try to use them,
+ because otherwise we try to create them before the ChromeClient's GraphicsLayerFactory
+ is hooked up, in some cases, and that can cause us to create the wrong kind of GraphicsLayers.
+
+ (WebCore::PageOverlayController::installPageOverlay):
+ Enter compositing mode when installing a PageOverlay.
+ Avoid pushing the Page to the PageOverlay until after we've set up
+ its root layer, so that the installation process can make use of that layer;
+ clients may, for example, expect to be able to setNeedsDisplay() in the
+ didMoveToPage callback.
+ Avoid updateOverlayGeometry until the layer is created and we've pushed
+ the Page down, so that e.g. bounds() will use the right Page.
+
+ (WebCore::PageOverlayController::didChangeSettings):
+ Leave a FIXME about a future improvement to didChangeSettings.
+
+ (WebCore::PageOverlayController::deviceScaleFactor):
+ (WebCore::PageOverlayController::notifyFlushRequired):
+ Null-check Page; these can get called when tearing down the Frame.
+
+ * page/PageOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/PageOverlayController.h.
+
+ * platform/graphics/GraphicsLayerClient.h:
+ Add wtf/Forward.h, because GraphicsLayerClient.h uses String.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::scrollTo):
+ Inform PageOverlayController that something scrolled.
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::hasAnyAdditionalCompositedLayers):
+ Make hasAnyAdditionalCompositedLayers return true if there are any page overlays,
+ because we need to avoid falling out of compositing mode if we still have
+ page overlays.
+
+ (WebCore::RenderLayerCompositor::updateCompositingLayers):
+ Enter compositing mode if we have page overlays.
+
+ (WebCore::RenderLayerCompositor::appendOverlayLayers): Deleted.
+ (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
+ Rename appendOverlayLayers -> appendDocumentOverlayLayers.
+
+ (WebCore::RenderLayerCompositor::attachRootLayer):
+ (WebCore::RenderLayerCompositor::detachRootLayer):
+ Attach/detach the view overlay root layer when attaching/detaching the
+ normal compositing root layer.
+
+ (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
+ * rendering/RenderLayerCompositor.h:
+
+2014-10-28 Dana Burkart <dburkart@apple.com>
+
</ins><span class="cx"> Merge r174541. <rdar://problem/18753175>
</span><span class="cx">
</span><span class="cx"> 2014-10-09 Roger Fong <roger_fong@apple.com>
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/WebCore.exp.in        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -189,6 +189,13 @@
</span><span class="cx"> __ZN7WebCore11MemoryCache25removeResourcesWithOriginEPNS_14SecurityOriginE
</span><span class="cx"> __ZN7WebCore11PageConsole21shouldPrintExceptionsEv
</span><span class="cx"> __ZN7WebCore11PageConsole24setShouldPrintExceptionsEb
</span><ins>+__ZN7WebCore11PageOverlay15setNeedsDisplayERKNS_7IntRectE
+__ZN7WebCore11PageOverlay15setNeedsDisplayEv
+__ZN7WebCore11PageOverlay20stopFadeOutAnimationEv
+__ZN7WebCore11PageOverlay5clearEv
+__ZN7WebCore11PageOverlay5layerEv
+__ZN7WebCore11PageOverlay6createERNS0_6ClientENS0_11OverlayTypeE
+__ZN7WebCore11PageOverlay8setFrameENS_7IntRectE
</ins><span class="cx"> __ZN7WebCore11SQLResultOkE
</span><span class="cx"> __ZN7WebCore11URLWithDataEP6NSDataP5NSURL
</span><span class="cx"> __ZN7WebCore11getURLBytesEPK7__CFURLRN3WTF6VectorIcLm512ENS3_15CrashOnOverflowEEE
</span><span class="lines">@@ -908,6 +915,12 @@
</span><span class="cx"> __ZN7WebCore21NetworkStorageSession21defaultStorageSessionEv
</span><span class="cx"> __ZN7WebCore21NetworkStorageSession25switchToNewTestingSessionEv
</span><span class="cx"> __ZN7WebCore21NetworkStorageSession28createPrivateBrowsingSessionERKN3WTF6StringE
</span><ins>+__ZN7WebCore21PageOverlayController18installPageOverlayEN3WTF10PassRefPtrINS_11PageOverlayEEENS3_8FadeModeE
+__ZN7WebCore21PageOverlayController20uninstallPageOverlayEPNS_11PageOverlayENS1_8FadeModeE
+__ZN7WebCore21PageOverlayController20viewOverlayRootLayerEv
+__ZN7WebCore21PageOverlayController32copyAccessibilityAttributesNamesEb
+__ZN7WebCore21PageOverlayController43copyAccessibilityAttributeBoolValueForPointEN3WTF6StringENS_10FloatPointERb
+__ZN7WebCore21PageOverlayController45copyAccessibilityAttributeStringValueForPointEN3WTF6StringENS_10FloatPointERS2_
</ins><span class="cx"> __ZN7WebCore21PlatformKeyboardEvent24disambiguateKeyDownEventENS_13PlatformEvent4TypeEb
</span><span class="cx"> __ZN7WebCore21RemoteCommandListener6createERNS_27RemoteCommandListenerClientE
</span><span class="cx"> __ZN7WebCore21ResourceLoadScheduler20servePendingRequestsENS_20ResourceLoadPriorityE
</span><span class="lines">@@ -1608,6 +1621,8 @@
</span><span class="cx"> __ZNK7WebCore11HistoryItem8referrerEv
</span><span class="cx"> __ZNK7WebCore11HistoryItem9urlStringEv
</span><span class="cx"> __ZNK7WebCore11HistoryItem9viewStateEv
</span><ins>+__ZNK7WebCore11PageOverlay5frameEv
+__ZNK7WebCore11PageOverlay6boundsEv
</ins><span class="cx"> __ZNK7WebCore11RenderBlock25inlineElementContinuationEv
</span><span class="cx"> __ZNK7WebCore11RenderLayer19absoluteBoundingBoxEv
</span><span class="cx"> __ZNK7WebCore11RenderLayer24needsCompositedScrollingEv
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -7169,6 +7169,8 @@
</span><span class="cx"> <ClCompile Include="..\page\PageConsole.cpp" />
</span><span class="cx"> <ClCompile Include="..\page\PageGroup.cpp" />
</span><span class="cx"> <ClCompile Include="..\page\PageGroupLoadDeferrer.cpp" />
</span><ins>+ <ClCompile Include="..\page\PageOverlay.cpp" />
+ <ClCompile Include="..\page\PageOverlayController.cpp" />
</ins><span class="cx"> <ClCompile Include="..\page\PageSerializer.cpp" />
</span><span class="cx"> <ClCompile Include="..\page\PageThrottler.cpp" />
</span><span class="cx"> <ClCompile Include="..\page\PageVisibilityState.cpp" />
</span><span class="lines">@@ -19161,6 +19163,8 @@
</span><span class="cx"> <ClInclude Include="..\page\PageConsole.h" />
</span><span class="cx"> <ClInclude Include="..\page\PageGroup.h" />
</span><span class="cx"> <ClInclude Include="..\page\PageGroupLoadDeferrer.h" />
</span><ins>+ <ClInclude Include="..\page\PageOverlay.h" />
+ <ClInclude Include="..\page\PageOverlayController.h" />
</ins><span class="cx"> <ClInclude Include="..\page\PageSerializer.h" />
</span><span class="cx"> <ClInclude Include="..\page\PageVisibilityState.h" />
</span><span class="cx"> <ClInclude Include="..\page\Performance.h" />
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -5004,6 +5004,12 @@
</span><span class="cx"> <ClCompile Include="..\page\PageGroupLoadDeferrer.cpp">
</span><span class="cx"> <Filter>page</Filter>
</span><span class="cx"> </ClCompile>
</span><ins>+ <ClCompile Include="..\page\PageOverlay.cpp">
+ <Filter>page</Filter>
+ </ClCompile>
+ <ClCompile Include="..\page\PageOverlayController.cpp">
+ <Filter>page</Filter>
+ </ClCompile>
</ins><span class="cx"> <ClCompile Include="..\page\PageSerializer.cpp">
</span><span class="cx"> <Filter>page</Filter>
</span><span class="cx"> </ClCompile>
</span><span class="lines">@@ -12967,6 +12973,12 @@
</span><span class="cx"> <ClInclude Include="..\page\PageGroupLoadDeferrer.h">
</span><span class="cx"> <Filter>page</Filter>
</span><span class="cx"> </ClInclude>
</span><ins>+ <ClInclude Include="..\page\PageOverlay.h">
+ <Filter>page</Filter>
+ </ClInclude>
+ <ClInclude Include="..\page\PageOverlayController.h">
+ <Filter>page</Filter>
+ </ClInclude>
</ins><span class="cx"> <ClInclude Include="..\page\PageSerializer.h">
</span><span class="cx"> <Filter>page</Filter>
</span><span class="cx"> </ClInclude>
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -1092,6 +1092,10 @@
</span><span class="cx">                 2D5A592F152525230036EE51 /* ImageOrientation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8748D7412CC3F89001FBA41 /* ImageOrientation.cpp */; };
</span><span class="cx">                 2D5A5931152525D00036EE51 /* ImageOrientation.h in Headers */ = {isa = PBXBuildFile; fileRef = A8748D6612CC3763001FBA41 /* ImageOrientation.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2D5BC42716F882EE007048D0 /* SecurityPolicyViolationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5BC42516F882BE007048D0 /* SecurityPolicyViolationEvent.h */; };
</span><ins>+                2D5C9CFF19C7B52E00B3C5C1 /* PageOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5C9CFB19C7B52E00B3C5C1 /* PageOverlay.cpp */; };
+                2D5C9D0019C7B52E00B3C5C1 /* PageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5C9CFC19C7B52E00B3C5C1 /* PageOverlay.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                2D5C9D0119C7B52E00B3C5C1 /* PageOverlayController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5C9CFD19C7B52E00B3C5C1 /* PageOverlayController.cpp */; };
+                2D5C9D0219C7B52E00B3C5C1 /* PageOverlayController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5C9CFE19C7B52E00B3C5C1 /* PageOverlayController.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 2D6E468417D660F500ECF8BB /* PDFDocumentImageMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D6E468217D660F500ECF8BB /* PDFDocumentImageMac.mm */; };
</span><span class="cx">                 2D70BA1318074DDF0001908A /* PlatformCALayerMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D70BA1218074DDF0001908A /* PlatformCALayerMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2D70BA1518074F860001908A /* PlatformCALayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D70BA1418074F850001908A /* PlatformCALayer.cpp */; };
</span><span class="lines">@@ -8096,6 +8100,10 @@
</span><span class="cx">                 2D46F04F17B96FD2005647F0 /* IntSize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntSize.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 2D5BC42516F882BE007048D0 /* SecurityPolicyViolationEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecurityPolicyViolationEvent.h; sourceTree = "<group>"; };
</span><span class="cx">                 2D5BC42616F882BE007048D0 /* SecurityPolicyViolationEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SecurityPolicyViolationEvent.idl; sourceTree = "<group>"; };
</span><ins>+                2D5C9CFB19C7B52E00B3C5C1 /* PageOverlay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageOverlay.cpp; sourceTree = "<group>"; };
+                2D5C9CFC19C7B52E00B3C5C1 /* PageOverlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageOverlay.h; sourceTree = "<group>"; };
+                2D5C9CFD19C7B52E00B3C5C1 /* PageOverlayController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageOverlayController.cpp; sourceTree = "<group>"; };
+                2D5C9CFE19C7B52E00B3C5C1 /* PageOverlayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageOverlayController.h; sourceTree = "<group>"; };
</ins><span class="cx">                 2D6E468217D660F500ECF8BB /* PDFDocumentImageMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PDFDocumentImageMac.mm; sourceTree = "<group>"; };
</span><span class="cx">                 2D70BA1218074DDF0001908A /* PlatformCALayerMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformCALayerMac.h; path = ca/mac/PlatformCALayerMac.h; sourceTree = "<group>"; };
</span><span class="cx">                 2D70BA1418074F850001908A /* PlatformCALayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PlatformCALayer.cpp; path = ca/PlatformCALayer.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -16662,6 +16670,10 @@
</span><span class="cx">                                 9302B0BE0D79F82C00C7EE83 /* PageGroup.h */,
</span><span class="cx">                                 7A674BD90F9EBF4E006CF099 /* PageGroupLoadDeferrer.cpp */,
</span><span class="cx">                                 7A674BDA0F9EBF4E006CF099 /* PageGroupLoadDeferrer.h */,
</span><ins>+                                2D5C9CFB19C7B52E00B3C5C1 /* PageOverlay.cpp */,
+                                2D5C9CFC19C7B52E00B3C5C1 /* PageOverlay.h */,
+                                2D5C9CFD19C7B52E00B3C5C1 /* PageOverlayController.cpp */,
+                                2D5C9CFE19C7B52E00B3C5C1 /* PageOverlayController.h */,
</ins><span class="cx">                                 371E65CD13661EED00BEEDB0 /* PageSerializer.cpp */,
</span><span class="cx">                                 371E65CB13661EDC00BEEDB0 /* PageSerializer.h */,
</span><span class="cx">                                 A7197F2517568AE5007B9442 /* PageThrottler.cpp */,
</span><span class="lines">@@ -23742,6 +23754,7 @@
</span><span class="cx">                                 97BC6A211505F081001B74AC /* Database.h in Headers */,
</span><span class="cx">                                 97BC6A241505F081001B74AC /* DatabaseAuthorizer.h in Headers */,
</span><span class="cx">                                 FE16CFD4169D1DED00D3A0C7 /* DatabaseBackend.h in Headers */,
</span><ins>+                                2D5C9D0219C7B52E00B3C5C1 /* PageOverlayController.h in Headers */,
</ins><span class="cx">                                 97BC69DB1505F076001B74AC /* DatabaseBackendBase.h in Headers */,
</span><span class="cx">                                 FE6F6AB0169E057500FC30A2 /* DatabaseBackendContext.h in Headers */,
</span><span class="cx">                                 FE16CFD6169D1DED00D3A0C7 /* DatabaseBackendSync.h in Headers */,
</span><span class="lines">@@ -25719,6 +25732,7 @@
</span><span class="cx">                                 439046EC12DA25E800AF80A9 /* RenderMathMLToken.h in Headers */,
</span><span class="cx">                                 439046EA12DA25E800AF80A2 /* RenderMathMLUnderOver.h in Headers */,
</span><span class="cx">                                 E4C279590CF9741900E97B98 /* RenderMedia.h in Headers */,
</span><ins>+                                2D5C9D0019C7B52E00B3C5C1 /* PageOverlay.h in Headers */,
</ins><span class="cx">                                 DEBCCDD216646E8200A452E1 /* RenderMediaControlElements.h in Headers */,
</span><span class="cx">                                 41FA303F1316C29C00C0BFC5 /* RenderMediaControls.h in Headers */,
</span><span class="cx">                                 ABDDFE7A0A5C6E7000A3E11D /* RenderMenuList.h in Headers */,
</span><span class="lines">@@ -28112,6 +28126,7 @@
</span><span class="cx">                                 A5840E1C187B74D500843B10 /* InspectorInstrumentationCookie.cpp in Sources */,
</span><span class="cx">                                 71B1E1261640491A00B1880A /* InspectorLayerTreeAgent.cpp in Sources */,
</span><span class="cx">                                 504AACCD1834455900E3D9BC /* InspectorNodeFinder.cpp in Sources */,
</span><ins>+                                2D5C9D0119C7B52E00B3C5C1 /* PageOverlayController.cpp in Sources */,
</ins><span class="cx">                                 7C522D4B15B477E8009B7C95 /* InspectorOverlay.cpp in Sources */,
</span><span class="cx">                                 4F6FDD641341DEDD001F8EE3 /* InspectorPageAgent.cpp in Sources */,
</span><span class="cx">                                 99CC0B6618BE9F15006CEBCC /* InspectorReplayAgent.cpp in Sources */,
</span><span class="lines">@@ -28180,6 +28195,7 @@
</span><span class="cx">                                 BCC065870F3CE2A700CD2D87 /* JSClientRect.cpp in Sources */,
</span><span class="cx">                                 BCC065890F3CE2A700CD2D87 /* JSClientRectList.cpp in Sources */,
</span><span class="cx">                                 5C4304B5191AEF46000E2BC0 /* JSEXTShaderTextureLOD.cpp in Sources */,
</span><ins>+                                2D5C9CFF19C7B52E00B3C5C1 /* PageOverlay.cpp in Sources */,
</ins><span class="cx">                                 BCA83E4F0D7CE1E9003421A8 /* JSDataTransfer.cpp in Sources */,
</span><span class="cx">                                 BCA83E520D7CE205003421A8 /* JSDataTransferCustom.cpp in Sources */,
</span><span class="cx">                                 51FB5505113E3E9100821176 /* JSCloseEvent.cpp in Sources */,
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreloaderEmptyClientsh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/loader/EmptyClients.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/loader/EmptyClients.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/loader/EmptyClients.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -182,6 +182,7 @@
</span><span class="cx"> virtual void scrollRectIntoView(const IntRect&) const override { }
</span><span class="cx">
</span><span class="cx"> virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*) override { }
</span><ins>+ virtual void attachViewOverlayGraphicsLayer(Frame*, GraphicsLayer*) override { }
</ins><span class="cx"> virtual void setNeedsOneShotDrawingSynchronization() override { }
</span><span class="cx"> virtual void scheduleCompositingLayerFlush() override { }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepageChromeClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/page/ChromeClient.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/ChromeClient.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/page/ChromeClient.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -300,6 +300,7 @@
</span><span class="cx">
</span><span class="cx"> // Pass 0 as the GraphicsLayer to detatch the root layer.
</span><span class="cx"> virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*) = 0;
</span><ins>+ virtual void attachViewOverlayGraphicsLayer(Frame*, GraphicsLayer*) = 0;
</ins><span class="cx"> // Sets a flag to specify that the next time content is drawn to the window,
</span><span class="cx"> // the changes appear on the screen in synchrony with updates to GraphicsLayers.
</span><span class="cx"> virtual void setNeedsOneShotDrawingSynchronization() = 0;
</span><span class="lines">@@ -309,8 +310,6 @@
</span><span class="cx"> // Returns whether or not the client can render the composited layer,
</span><span class="cx"> // regardless of the settings.
</span><span class="cx"> virtual bool allowsAcceleratedCompositing() const { return true; }
</span><del>- // Supply a layer that will added as an overlay over other document layers (scrolling with the document).
- virtual GraphicsLayer* documentOverlayLayerForFrame(Frame&) { return nullptr; }
</del><span class="cx">
</span><span class="cx"> enum CompositingTrigger {
</span><span class="cx"> ThreeDTransformTrigger = 1 << 0,
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/page/EventHandler.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/EventHandler.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/page/EventHandler.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -66,6 +66,7 @@
</span><span class="cx"> #include "MouseEvent.h"
</span><span class="cx"> #include "MouseEventWithHitTestResults.h"
</span><span class="cx"> #include "Page.h"
</span><ins>+#include "PageOverlayController.h"
</ins><span class="cx"> #include "PlatformEvent.h"
</span><span class="cx"> #include "PlatformKeyboardEvent.h"
</span><span class="cx"> #include "PlatformWheelEvent.h"
</span><span class="lines">@@ -1530,6 +1531,9 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (m_frame.mainFrame().pageOverlayController().handleMouseEvent(mouseEvent))
+ return true;
+
</ins><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx"> bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent);
</span><span class="cx"> if (defaultPrevented)
</span><span class="lines">@@ -1726,6 +1730,9 @@
</span><span class="cx"> RefPtr<FrameView> protector(m_frame.view());
</span><span class="cx"> MaximumDurationTracker maxDurationTracker(&m_maxMouseMovedDuration);
</span><span class="cx">
</span><ins>+ if (m_frame.mainFrame().pageOverlayController().handleMouseEvent(event))
+ return true;
+
</ins><span class="cx"> HitTestResult hoveredNode = HitTestResult(LayoutPoint());
</span><span class="cx"> bool result = handleMouseMoveEvent(event, &hoveredNode);
</span><span class="cx">
</span><span class="lines">@@ -1906,6 +1913,9 @@
</span><span class="cx">
</span><span class="cx"> m_frame.selection().setCaretBlinkingSuspended(false);
</span><span class="cx">
</span><ins>+ if (m_frame.mainFrame().pageOverlayController().handleMouseEvent(mouseEvent))
+ return true;
+
</ins><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx"> bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent);
</span><span class="cx"> if (defaultPrevented)
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/page/FrameView.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/FrameView.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/page/FrameView.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx"> #include "MemoryCache.h"
</span><span class="cx"> #include "MemoryPressureHandler.h"
</span><span class="cx"> #include "OverflowEvent.h"
</span><ins>+#include "PageOverlayController.h"
</ins><span class="cx"> #include "ProgressTracker.h"
</span><span class="cx"> #include "RenderEmbeddedObject.h"
</span><span class="cx"> #include "RenderFullScreen.h"
</span><span class="lines">@@ -419,7 +420,6 @@
</span><span class="cx"> #if ENABLE(TEXT_AUTOSIZING)
</span><span class="cx"> // Autosized font sizes depend on the width of the viewing area.
</span><span class="cx"> if (newRect.width() != oldRect.width()) {
</span><del>- Page* page = frame().page();
</del><span class="cx"> if (frame().isMainFrame() && page->settings().textAutosizingEnabled()) {
</span><span class="cx"> for (Frame* frame = &page->mainFrame(); frame; frame = frame->tree().traverseNext())
</span><span class="cx"> frame().document()->textAutosizer()->recalculateMultipliers();
</span><span class="lines">@@ -435,6 +435,9 @@
</span><span class="cx"> if (renderView->usesCompositing())
</span><span class="cx"> renderView->compositor().frameViewDidChangeSize();
</span><span class="cx"> }
</span><ins>+
+ if (frame().isMainFrame())
+ frame().mainFrame().pageOverlayController().didChangeViewSize();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(REQUEST_ANIMATION_FRAME)
</span><span class="lines">@@ -548,6 +551,9 @@
</span><span class="cx">
</span><span class="cx"> page->chrome().contentsSizeChanged(&frame(), size); // Notify only.
</span><span class="cx">
</span><ins>+ if (frame().isMainFrame())
+ frame().mainFrame().pageOverlayController().didChangeDocumentSize();
+
</ins><span class="cx"> ASSERT(m_deferSetNeedsLayouts);
</span><span class="cx"> m_deferSetNeedsLayouts--;
</span><span class="cx">
</span><span class="lines">@@ -2020,7 +2026,7 @@
</span><span class="cx"> // Update the scroll-bars to calculate new page-step size.
</span><span class="cx"> updateScrollbars(scrollOffset());
</span><span class="cx"> }
</span><del>- frame().loader().client().didChangeScrollOffset();
</del><ins>+ didChangeScrollOffset();
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -2033,6 +2039,12 @@
</span><span class="cx"> renderer->setNeedsLayout();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void FrameView::didChangeScrollOffset()
+{
+ frame().mainFrame().pageOverlayController().didScrollFrame(frame());
+ frame().loader().client().didChangeScrollOffset();
+}
+
</ins><span class="cx"> void FrameView::scrollPositionChangedViaPlatformWidget(const IntPoint& oldPosition, const IntPoint& newPosition)
</span><span class="cx"> {
</span><span class="cx"> updateLayerPositionsAfterScrolling();
</span><span class="lines">@@ -3187,7 +3199,7 @@
</span><span class="cx"> ScrollView::scrollTo(newOffset);
</span><span class="cx"> if (offset != scrollOffset())
</span><span class="cx"> scrollPositionChanged(oldPosition, scrollPosition());
</span><del>- frame().loader().client().didChangeScrollOffset();
</del><ins>+ didChangeScrollOffset();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void FrameView::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect)
</span><span class="lines">@@ -4191,7 +4203,7 @@
</span><span class="cx"> if (offset != newOffset) {
</span><span class="cx"> ScrollView::scrollTo(newOffset);
</span><span class="cx"> scrollPositionChanged(oldPosition, scrollPosition());
</span><del>- frame().loader().client().didChangeScrollOffset();
</del><ins>+ didChangeScrollOffset();
</ins><span class="cx"> }
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="lines">@@ -4514,6 +4526,8 @@
</span><span class="cx">
</span><span class="cx"> if (auto* view = renderView())
</span><span class="cx"> view->compositor().scheduleLayerFlush(false /* canThrottle */);
</span><ins>+
+ frame().mainFrame().pageOverlayController().didChangeExposedRect();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void FrameView::setViewportSizeForCSSViewportUnits(IntSize size)
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/page/FrameView.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/FrameView.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/page/FrameView.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -496,6 +496,8 @@
</span><span class="cx"> void setExposedRect(FloatRect);
</span><span class="cx"> FloatRect exposedRect() const { return m_exposedRect; }
</span><span class="cx">
</span><ins>+ void didChangeScrollOffset();
+
</ins><span class="cx"> protected:
</span><span class="cx"> virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) override;
</span><span class="cx"> virtual void scrollContentsSlowPath(const IntRect& updateRect) override;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepageMainFramecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/page/MainFrame.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/MainFrame.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/page/MainFrame.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -27,11 +27,14 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "MainFrame.h"
</span><span class="cx">
</span><ins>+#include "PageOverlayController.h"
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> inline MainFrame::MainFrame(Page& page, FrameLoaderClient& client)
</span><span class="cx"> : Frame(page, nullptr, client)
</span><span class="cx"> , m_selfOnlyRefCount(0)
</span><ins>+ , m_pageOverlayController(std::make_unique<PageOverlayController>(*this))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepageMainFrameh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/page/MainFrame.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/MainFrame.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/page/MainFrame.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -31,6 +31,8 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+class PageOverlayController;
+
</ins><span class="cx"> class MainFrame final : public Frame {
</span><span class="cx"> public:
</span><span class="cx"> static RefPtr<MainFrame> create(Page&, FrameLoaderClient&);
</span><span class="lines">@@ -38,12 +40,15 @@
</span><span class="cx"> void selfOnlyRef();
</span><span class="cx"> void selfOnlyDeref();
</span><span class="cx">
</span><ins>+ PageOverlayController& pageOverlayController() { return *m_pageOverlayController; }
+
</ins><span class="cx"> private:
</span><span class="cx"> MainFrame(Page&, FrameLoaderClient&);
</span><span class="cx">
</span><span class="cx"> void dropChildren();
</span><span class="cx">
</span><span class="cx"> unsigned m_selfOnlyRefCount;
</span><ins>+ std::unique_ptr<PageOverlayController> m_pageOverlayController;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> inline bool Frame::isMainFrame() const
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/page/Page.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/Page.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/page/Page.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx"> #include "PageConsole.h"
</span><span class="cx"> #include "PageDebuggable.h"
</span><span class="cx"> #include "PageGroup.h"
</span><ins>+#include "PageOverlayController.h"
</ins><span class="cx"> #include "PageThrottler.h"
</span><span class="cx"> #include "PlugInClient.h"
</span><span class="cx"> #include "PluginData.h"
</span><span class="lines">@@ -810,6 +811,8 @@
</span><span class="cx">
</span><span class="cx"> pageCache()->markPagesForFullStyleRecalc(this);
</span><span class="cx"> GraphicsContext::updateDocumentMarkerResources();
</span><ins>+
+ mainFrame().pageOverlayController().didChangeDeviceScaleFactor();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void Page::setTopContentInset(float contentInset)
</span><span class="lines">@@ -1619,7 +1622,6 @@
</span><span class="cx">
</span><span class="cx"> for (auto& view : pluginViews())
</span><span class="cx"> view->privateBrowsingStateChanged(sessionID.isEphemeral());
</span><del>-
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Page::PageClients::PageClients()
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepagePageOverlaycppfromrev174231trunkSourceWebCorepagePageOverlaycpp"></a>
<div class="copfile"><h4>Copied: branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.cpp (from rev 174231, trunk/Source/WebCore/page/PageOverlay.cpp) (0 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.cpp         (rev 0)
+++ branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -0,0 +1,264 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PageOverlay.h"
+
+#include "FrameView.h"
+#include "GraphicsContext.h"
+#include "MainFrame.h"
+#include "Page.h"
+#include "PageOverlayController.h"
+#include "PlatformMouseEvent.h"
+#include "ScrollbarTheme.h"
+#include <wtf/CurrentTime.h>
+
+namespace WebCore {
+
+static const double fadeAnimationDuration = 0.2;
+static const double fadeAnimationFrameRate = 30;
+
+PassRefPtr<PageOverlay> PageOverlay::create(Client& client, OverlayType overlayType)
+{
+ return adoptRef(new PageOverlay(client, overlayType));
+}
+
+PageOverlay::PageOverlay(Client& client, OverlayType overlayType)
+ : m_client(client)
+ , m_page(nullptr)
+ , m_fadeAnimationTimer(this, &PageOverlay::fadeAnimationTimerFired)
+ , m_fadeAnimationStartTime(0)
+ , m_fadeAnimationDuration(fadeAnimationDuration)
+ , m_fadeAnimationType(NoAnimation)
+ , m_fractionFadedIn(1)
+ , m_overlayType(overlayType)
+ , m_backgroundColor(Color::transparent)
+{
+}
+
+PageOverlay::~PageOverlay()
+{
+}
+
+PageOverlayController* PageOverlay::controller() const
+{
+ if (!m_page)
+ return nullptr;
+ return &m_page->mainFrame().pageOverlayController();
+}
+
+IntRect PageOverlay::bounds() const
+{
+ if (!m_overrideFrame.isEmpty())
+ return IntRect(IntPoint(), m_overrideFrame.size());
+
+ FrameView* frameView = m_page->mainFrame().view();
+
+ if (!frameView)
+ return IntRect();
+
+ switch (m_overlayType) {
+ case OverlayType::View: {
+ int width = frameView->width();
+ int height = frameView->height();
+
+ if (!ScrollbarTheme::theme()->usesOverlayScrollbars()) {
+ if (frameView->verticalScrollbar())
+ width -= frameView->verticalScrollbar()->width();
+ if (frameView->horizontalScrollbar())
+ height -= frameView->horizontalScrollbar()->height();
+ }
+ return IntRect(0, 0, width, height);
+ }
+ case OverlayType::Document:
+ return IntRect(IntPoint(), frameView->contentsSize());
+ };
+
+ ASSERT_NOT_REACHED();
+ return IntRect(IntPoint(), frameView->contentsSize());
+}
+
+IntRect PageOverlay::frame() const
+{
+ if (!m_overrideFrame.isEmpty())
+ return m_overrideFrame;
+
+ return bounds();
+}
+
+void PageOverlay::setFrame(IntRect frame)
+{
+ if (m_overrideFrame == frame)
+ return;
+
+ m_overrideFrame = frame;
+
+ if (auto pageOverlayController = controller())
+ pageOverlayController->didChangeOverlayFrame(*this);
+}
+
+void PageOverlay::setBackgroundColor(RGBA32 backgroundColor)
+{
+ if (m_backgroundColor == backgroundColor)
+ return;
+
+ m_backgroundColor = backgroundColor;
+
+ if (auto pageOverlayController = controller())
+ pageOverlayController->didChangeOverlayBackgroundColor(*this);
+}
+
+void PageOverlay::setPage(Page* page)
+{
+ m_client.willMoveToPage(*this, page);
+ m_page = page;
+ m_client.didMoveToPage(*this, page);
+
+ m_fadeAnimationTimer.stop();
+}
+
+void PageOverlay::setNeedsDisplay(const IntRect& dirtyRect)
+{
+ if (auto pageOverlayController = controller()) {
+ pageOverlayController->setPageOverlayOpacity(*this, m_fractionFadedIn);
+ pageOverlayController->setPageOverlayNeedsDisplay(*this, dirtyRect);
+ }
+}
+
+void PageOverlay::setNeedsDisplay()
+{
+ setNeedsDisplay(bounds());
+}
+
+void PageOverlay::drawRect(GraphicsContext& graphicsContext, const IntRect& dirtyRect)
+{
+ // If the dirty rect is outside the bounds, ignore it.
+ IntRect paintRect = intersection(dirtyRect, bounds());
+ if (paintRect.isEmpty())
+ return;
+
+ GraphicsContextStateSaver stateSaver(graphicsContext);
+ m_client.drawRect(*this, graphicsContext, paintRect);
+}
+
+bool PageOverlay::mouseEvent(const PlatformMouseEvent& mouseEvent)
+{
+ IntPoint mousePositionInOverlayCoordinates(mouseEvent.position());
+
+ if (m_overlayType == PageOverlay::OverlayType::Document)
+ mousePositionInOverlayCoordinates = m_page->mainFrame().view()->rootViewToContents(mousePositionInOverlayCoordinates);
+
+ // Ignore events outside the bounds.
+ if (!bounds().contains(mousePositionInOverlayCoordinates))
+ return false;
+
+ return m_client.mouseEvent(*this, mouseEvent);
+}
+
+void PageOverlay::didScrollFrame(Frame& frame)
+{
+ m_client.didScrollFrame(*this, frame);
+}
+
+bool PageOverlay::copyAccessibilityAttributeStringValueForPoint(String attribute, FloatPoint parameter, String& value)
+{
+ return m_client.copyAccessibilityAttributeStringValueForPoint(*this, attribute, parameter, value);
+}
+
+bool PageOverlay::copyAccessibilityAttributeBoolValueForPoint(String attribute, FloatPoint parameter, bool& value)
+{
+ return m_client.copyAccessibilityAttributeBoolValueForPoint(*this, attribute, parameter, value);
+}
+
+Vector<String> PageOverlay::copyAccessibilityAttributeNames(bool parameterizedNames)
+{
+ return m_client.copyAccessibilityAttributeNames(*this, parameterizedNames);
+}
+
+void PageOverlay::startFadeInAnimation()
+{
+ m_fractionFadedIn = 0;
+ m_fadeAnimationType = FadeInAnimation;
+
+ startFadeAnimation();
+}
+
+void PageOverlay::startFadeOutAnimation()
+{
+ m_fractionFadedIn = 1;
+ m_fadeAnimationType = FadeOutAnimation;
+
+ startFadeAnimation();
+}
+
+void PageOverlay::stopFadeOutAnimation()
+{
+ m_fractionFadedIn = 1.0;
+ m_fadeAnimationTimer.stop();
+}
+
+void PageOverlay::startFadeAnimation()
+{
+ m_fadeAnimationStartTime = currentTime();
+ m_fadeAnimationTimer.startRepeating(1 / fadeAnimationFrameRate);
+}
+
+void PageOverlay::fadeAnimationTimerFired(Timer<PageOverlay>&)
+{
+ float animationProgress = (currentTime() - m_fadeAnimationStartTime) / m_fadeAnimationDuration;
+
+ if (animationProgress >= 1.0)
+ animationProgress = 1.0;
+
+ double sine = sin(piOverTwoFloat * animationProgress);
+ float fadeAnimationValue = sine * sine;
+
+ m_fractionFadedIn = (m_fadeAnimationType == FadeInAnimation) ? fadeAnimationValue : 1 - fadeAnimationValue;
+ controller()->setPageOverlayOpacity(*this, m_fractionFadedIn);
+
+ if (animationProgress == 1.0) {
+ m_fadeAnimationTimer.stop();
+
+ bool wasFadingOut = m_fadeAnimationType == FadeOutAnimation;
+ m_fadeAnimationType = NoAnimation;
+
+ // If this was a fade out, go ahead and uninstall the page overlay.
+ if (wasFadingOut)
+ controller()->uninstallPageOverlay(this, PageOverlay::FadeMode::DoNotFade);
+ }
+}
+
+void PageOverlay::clear()
+{
+ if (auto pageOverlayController = controller())
+ pageOverlayController->clearPageOverlay(*this);
+}
+
+GraphicsLayer& PageOverlay::layer()
+{
+ return controller()->layerForOverlay(*this);
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepagePageOverlayhfromrev174231trunkSourceWebCorepagePageOverlayh"></a>
<div class="copfile"><h4>Copied: branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.h (from rev 174231, trunk/Source/WebCore/page/PageOverlay.h) (0 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.h         (rev 0)
+++ branches/safari-600.3-branch/Source/WebCore/page/PageOverlay.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -0,0 +1,141 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PageOverlay_h
+#define PageOverlay_h
+
+#include "Color.h"
+#include "FloatPoint.h"
+#include "IntRect.h"
+#include "Timer.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class Frame;
+class GraphicsContext;
+class GraphicsLayer;
+class Page;
+class PageOverlayController;
+class PlatformMouseEvent;
+
+class PageOverlay final : public RefCounted<PageOverlay> {
+ WTF_MAKE_NONCOPYABLE(PageOverlay);
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ class Client {
+ protected:
+ virtual ~Client() { }
+
+ public:
+ virtual void pageOverlayDestroyed(PageOverlay&) = 0;
+ virtual void willMoveToPage(PageOverlay&, Page*) = 0;
+ virtual void didMoveToPage(PageOverlay&, Page*) = 0;
+ virtual void drawRect(PageOverlay&, GraphicsContext&, const IntRect& dirtyRect) = 0;
+ virtual bool mouseEvent(PageOverlay&, const PlatformMouseEvent&) = 0;
+ virtual void didScrollFrame(PageOverlay&, Frame&) { }
+
+ virtual bool copyAccessibilityAttributeStringValueForPoint(PageOverlay&, String /* attribute */, FloatPoint, String&) { return false; }
+ virtual bool copyAccessibilityAttributeBoolValueForPoint(PageOverlay&, String /* attribute */, FloatPoint, bool&) { return false; }
+ virtual Vector<String> copyAccessibilityAttributeNames(PageOverlay&, bool /* parameterizedNames */) { return { }; }
+ };
+
+ enum class OverlayType {
+ View, // Fixed to the view size; does not scale or scroll with the document, repaints on scroll.
+ Document, // Scales and scrolls with the document.
+ };
+
+ static PassRefPtr<PageOverlay> create(Client&, OverlayType = OverlayType::View);
+ virtual ~PageOverlay();
+
+ PageOverlayController* controller() const;
+
+ void setPage(Page*);
+ void setNeedsDisplay(const IntRect& dirtyRect);
+ void setNeedsDisplay();
+
+ void drawRect(GraphicsContext&, const IntRect& dirtyRect);
+ bool mouseEvent(const PlatformMouseEvent&);
+ void didScrollFrame(Frame&);
+
+ bool copyAccessibilityAttributeStringValueForPoint(String attribute, FloatPoint parameter, String& value);
+ bool copyAccessibilityAttributeBoolValueForPoint(String attribute, FloatPoint parameter, bool& value);
+ Vector<String> copyAccessibilityAttributeNames(bool parameterizedNames);
+
+ void startFadeInAnimation();
+ void startFadeOutAnimation();
+ void stopFadeOutAnimation();
+
+ void clear();
+
+ Client& client() const { return m_client; }
+
+ enum class FadeMode { DoNotFade, Fade };
+
+ OverlayType overlayType() { return m_overlayType; }
+
+ IntRect bounds() const;
+ IntRect frame() const;
+ void setFrame(IntRect);
+
+ RGBA32 backgroundColor() const { return m_backgroundColor; }
+ void setBackgroundColor(RGBA32);
+
+ // FIXME: PageOverlay should own its layer, instead of PageOverlayController.
+ GraphicsLayer& layer();
+
+private:
+ explicit PageOverlay(Client&, OverlayType);
+
+ void startFadeAnimation();
+ void fadeAnimationTimerFired(Timer<PageOverlay>&);
+
+ Client& m_client;
+ Page* m_page;
+
+ Timer<PageOverlay> m_fadeAnimationTimer;
+ double m_fadeAnimationStartTime;
+ double m_fadeAnimationDuration;
+
+ enum FadeAnimationType {
+ NoAnimation,
+ FadeInAnimation,
+ FadeOutAnimation,
+ };
+
+ FadeAnimationType m_fadeAnimationType;
+ float m_fractionFadedIn;
+
+ OverlayType m_overlayType;
+ IntRect m_overrideFrame;
+
+ RGBA32 m_backgroundColor;
+};
+
+} // namespace WebKit
+
+#endif // PageOverlay_h
</ins></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepagePageOverlayControllercppfromrev174231trunkSourceWebCorepagePageOverlayControllercpp"></a>
<div class="copfile"><h4>Copied: branches/safari-600.3-branch/Source/WebCore/page/PageOverlayController.cpp (from rev 174231, trunk/Source/WebCore/page/PageOverlayController.cpp) (0 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/PageOverlayController.cpp         (rev 0)
+++ branches/safari-600.3-branch/Source/WebCore/page/PageOverlayController.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -0,0 +1,361 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PageOverlayController.h"
+
+#include "Chrome.h"
+#include "ChromeClient.h"
+#include "Frame.h"
+#include "FrameView.h"
+#include "GraphicsContext.h"
+#include "GraphicsLayer.h"
+#include "MainFrame.h"
+#include "Page.h"
+#include "PageOverlay.h"
+#include "ScrollingCoordinator.h"
+#include "Settings.h"
+#include "TiledBacking.h"
+
+// FIXME: Someone needs to call didChangeSettings() if we want dynamic updates of layer border/repaint counter settings.
+
+namespace WebCore {
+
+PageOverlayController::PageOverlayController(MainFrame& mainFrame)
+ : m_initialized(false)
+ , m_mainFrame(mainFrame)
+{
+}
+
+PageOverlayController::~PageOverlayController()
+{
+
+}
+
+void PageOverlayController::createRootLayersIfNeeded()
+{
+ if (m_initialized)
+ return;
+
+ m_initialized = true;
+
+ ASSERT(!m_documentOverlayRootLayer);
+ ASSERT(!m_viewOverlayRootLayer);
+
+ m_documentOverlayRootLayer = GraphicsLayer::create(m_mainFrame.page()->chrome().client().graphicsLayerFactory(), *this);
+ m_viewOverlayRootLayer = GraphicsLayer::create(m_mainFrame.page()->chrome().client().graphicsLayerFactory(), *this);
+#ifndef NDEBUG
+ m_documentOverlayRootLayer->setName("Page Overlay container (document-relative)");
+ m_viewOverlayRootLayer->setName("Page Overlay container (view-relative)");
+#endif
+}
+
+GraphicsLayer& PageOverlayController::documentOverlayRootLayer()
+{
+ createRootLayersIfNeeded();
+ return *m_documentOverlayRootLayer;
+}
+
+GraphicsLayer& PageOverlayController::viewOverlayRootLayer()
+{
+ createRootLayersIfNeeded();
+ return *m_viewOverlayRootLayer;
+}
+
+static void updateOverlayGeometry(PageOverlay& overlay, GraphicsLayer& graphicsLayer)
+{
+ IntRect overlayFrame = overlay.frame();
+
+ if (overlayFrame.location() == graphicsLayer.position() && overlayFrame.size() == graphicsLayer.size())
+ return;
+
+ graphicsLayer.setPosition(overlayFrame.location());
+ graphicsLayer.setSize(overlayFrame.size());
+}
+
+void PageOverlayController::installPageOverlay(PassRefPtr<PageOverlay> pageOverlay, PageOverlay::FadeMode fadeMode)
+{
+ createRootLayersIfNeeded();
+
+ RefPtr<PageOverlay> overlay = pageOverlay;
+
+ if (m_pageOverlays.contains(overlay))
+ return;
+
+ m_pageOverlays.append(overlay);
+
+ std::unique_ptr<GraphicsLayer> layer = GraphicsLayer::create(m_mainFrame.page()->chrome().client().graphicsLayerFactory(), *this);
+ layer->setAnchorPoint(FloatPoint3D());
+ layer->setBackgroundColor(overlay->backgroundColor());
+#ifndef NDEBUG
+ layer->setName("Page Overlay content");
+#endif
+
+ updateSettingsForLayer(*layer);
+
+ switch (overlay->overlayType()) {
+ case PageOverlay::OverlayType::View:
+ m_viewOverlayRootLayer->addChild(layer.get());
+ break;
+ case PageOverlay::OverlayType::Document:
+ m_documentOverlayRootLayer->addChild(layer.get());
+ break;
+ }
+
+ GraphicsLayer& rawLayer = *layer;
+ m_overlayGraphicsLayers.set(overlay.get(), WTF::move(layer));
+
+ updateForceSynchronousScrollLayerPositionUpdates();
+
+ overlay->setPage(m_mainFrame.page());
+
+ if (FrameView* frameView = m_mainFrame.view())
+ frameView->enterCompositingMode();
+
+ updateOverlayGeometry(*overlay, rawLayer);
+
+ if (fadeMode == PageOverlay::FadeMode::Fade)
+ overlay->startFadeInAnimation();
+}
+
+void PageOverlayController::uninstallPageOverlay(PageOverlay* overlay, PageOverlay::FadeMode fadeMode)
+{
+ if (fadeMode == PageOverlay::FadeMode::Fade) {
+ overlay->startFadeOutAnimation();
+ return;
+ }
+
+ overlay->setPage(nullptr);
+
+ m_overlayGraphicsLayers.take(overlay)->removeFromParent();
+
+ size_t overlayIndex = m_pageOverlays.find(overlay);
+ ASSERT(overlayIndex != notFound);
+ m_pageOverlays.remove(overlayIndex);
+
+ updateForceSynchronousScrollLayerPositionUpdates();
+}
+
+void PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates()
+{
+#if ENABLE(ASYNC_SCROLLING)
+ bool forceSynchronousScrollLayerPositionUpdates = false;
+
+ for (auto& overlay : m_pageOverlays) {
+ if (overlay->overlayType() == PageOverlay::OverlayType::View)
+ forceSynchronousScrollLayerPositionUpdates = true;
+ }
+
+ if (ScrollingCoordinator* scrollingCoordinator = m_mainFrame.page()->scrollingCoordinator())
+ scrollingCoordinator->setForceSynchronousScrollLayerPositionUpdates(forceSynchronousScrollLayerPositionUpdates);
+#endif
+}
+
+void PageOverlayController::setPageOverlayNeedsDisplay(PageOverlay& overlay, const WebCore::IntRect& dirtyRect)
+{
+ ASSERT(m_pageOverlays.contains(&overlay));
+ GraphicsLayer& graphicsLayer = *m_overlayGraphicsLayers.get(&overlay);
+
+ if (!graphicsLayer.drawsContent()) {
+ graphicsLayer.setDrawsContent(true);
+ updateOverlayGeometry(overlay, graphicsLayer);
+ }
+
+ graphicsLayer.setNeedsDisplayInRect(dirtyRect);
+}
+
+void PageOverlayController::setPageOverlayOpacity(PageOverlay& overlay, float opacity)
+{
+ ASSERT(m_pageOverlays.contains(&overlay));
+ m_overlayGraphicsLayers.get(&overlay)->setOpacity(opacity);
+}
+
+void PageOverlayController::clearPageOverlay(PageOverlay& overlay)
+{
+ ASSERT(m_pageOverlays.contains(&overlay));
+ m_overlayGraphicsLayers.get(&overlay)->setDrawsContent(false);
+}
+
+GraphicsLayer& PageOverlayController::layerForOverlay(PageOverlay& overlay) const
+{
+ ASSERT(m_pageOverlays.contains(&overlay));
+ return *m_overlayGraphicsLayers.get(&overlay);
+}
+
+void PageOverlayController::willAttachRootLayer()
+{
+ for (auto& overlayAndLayer : m_overlayGraphicsLayers)
+ updateOverlayGeometry(*overlayAndLayer.key, *overlayAndLayer.value);
+}
+
+void PageOverlayController::didChangeViewSize()
+{
+ for (auto& overlayAndLayer : m_overlayGraphicsLayers) {
+ if (overlayAndLayer.key->overlayType() == PageOverlay::OverlayType::View)
+ updateOverlayGeometry(*overlayAndLayer.key, *overlayAndLayer.value);
+ }
+}
+
+void PageOverlayController::didChangeDocumentSize()
+{
+ for (auto& overlayAndLayer : m_overlayGraphicsLayers) {
+ if (overlayAndLayer.key->overlayType() == PageOverlay::OverlayType::Document)
+ updateOverlayGeometry(*overlayAndLayer.key, *overlayAndLayer.value);
+ }
+}
+
+void PageOverlayController::didChangeSettings()
+{
+ // FIXME: We should apply these settings to all overlay sublayers recursively.
+ for (auto& graphicsLayer : m_overlayGraphicsLayers.values())
+ updateSettingsForLayer(*graphicsLayer);
+}
+
+void PageOverlayController::didChangeDeviceScaleFactor()
+{
+ createRootLayersIfNeeded();
+
+ m_documentOverlayRootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
+ m_viewOverlayRootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
+
+ for (auto& graphicsLayer : m_overlayGraphicsLayers.values())
+ graphicsLayer->setNeedsDisplay();
+}
+
+void PageOverlayController::didChangeExposedRect()
+{
+ m_mainFrame.page()->chrome().client().scheduleCompositingLayerFlush();
+}
+
+void PageOverlayController::didScrollFrame(Frame& frame)
+{
+ for (auto& overlayAndLayer : m_overlayGraphicsLayers) {
+ if (overlayAndLayer.key->overlayType() == PageOverlay::OverlayType::View || !frame.isMainFrame())
+ overlayAndLayer.value->setNeedsDisplay();
+ overlayAndLayer.key->didScrollFrame(frame);
+ }
+}
+
+void PageOverlayController::updateSettingsForLayer(GraphicsLayer& layer)
+{
+ Settings& settings = m_mainFrame.page()->settings();
+ layer.setAcceleratesDrawing(settings.acceleratedDrawingEnabled());
+ layer.setShowDebugBorder(settings.showDebugBorders());
+ layer.setShowRepaintCounter(settings.showRepaintCounter());
+}
+
+bool PageOverlayController::handleMouseEvent(const PlatformMouseEvent& mouseEvent)
+{
+ if (m_pageOverlays.isEmpty())
+ return false;
+
+ for (auto it = m_pageOverlays.rbegin(), end = m_pageOverlays.rend(); it != end; ++it) {
+ if ((*it)->mouseEvent(mouseEvent))
+ return true;
+ }
+
+ return false;
+}
+
+bool PageOverlayController::copyAccessibilityAttributeStringValueForPoint(String attribute, FloatPoint parameter, String& value)
+{
+ if (m_pageOverlays.isEmpty())
+ return false;
+
+ for (auto it = m_pageOverlays.rbegin(), end = m_pageOverlays.rend(); it != end; ++it) {
+ if ((*it)->copyAccessibilityAttributeStringValueForPoint(attribute, parameter, value))
+ return true;
+ }
+
+ return false;
+}
+
+bool PageOverlayController::copyAccessibilityAttributeBoolValueForPoint(String attribute, FloatPoint parameter, bool& value)
+{
+ if (m_pageOverlays.isEmpty())
+ return false;
+
+ for (auto it = m_pageOverlays.rbegin(), end = m_pageOverlays.rend(); it != end; ++it) {
+ if ((*it)->copyAccessibilityAttributeBoolValueForPoint(attribute, parameter, value))
+ return true;
+ }
+
+ return false;
+}
+
+Vector<String> PageOverlayController::copyAccessibilityAttributesNames(bool parameterizedNames)
+{
+ if (m_pageOverlays.isEmpty())
+ return { };
+
+ for (auto it = m_pageOverlays.rbegin(), end = m_pageOverlays.rend(); it != end; ++it) {
+ Vector<String> names = (*it)->copyAccessibilityAttributeNames(parameterizedNames);
+ if (!names.isEmpty())
+ return names;
+ }
+
+ return { };
+}
+
+void PageOverlayController::paintContents(const WebCore::GraphicsLayer* graphicsLayer, WebCore::GraphicsContext& graphicsContext, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& clipRect)
+{
+ for (auto& overlayAndGraphicsLayer : m_overlayGraphicsLayers) {
+ if (overlayAndGraphicsLayer.value.get() != graphicsLayer)
+ continue;
+
+ GraphicsContextStateSaver stateSaver(graphicsContext);
+ graphicsContext.clip(clipRect);
+ overlayAndGraphicsLayer.key->drawRect(graphicsContext, enclosingIntRect(clipRect));
+
+ return;
+ }
+}
+
+float PageOverlayController::deviceScaleFactor() const
+{
+ if (Page* page = m_mainFrame.page())
+ return page->deviceScaleFactor();
+ return 1;
+}
+
+void PageOverlayController::notifyFlushRequired(const WebCore::GraphicsLayer*)
+{
+ if (Page* page = m_mainFrame.page())
+ page->chrome().client().scheduleCompositingLayerFlush();
+}
+
+void PageOverlayController::didChangeOverlayFrame(PageOverlay& overlay)
+{
+ ASSERT(m_pageOverlays.contains(&overlay));
+ updateOverlayGeometry(overlay, *m_overlayGraphicsLayers.get(&overlay));
+}
+
+void PageOverlayController::didChangeOverlayBackgroundColor(PageOverlay& overlay)
+{
+ ASSERT(m_pageOverlays.contains(&overlay));
+ m_overlayGraphicsLayers.get(&overlay)->setBackgroundColor(overlay.backgroundColor());
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="branchessafari6003branchSourceWebCorepagePageOverlayControllerhfromrev174231trunkSourceWebCorepagePageOverlayControllerh"></a>
<div class="copfile"><h4>Copied: branches/safari-600.3-branch/Source/WebCore/page/PageOverlayController.h (from rev 174231, trunk/Source/WebCore/page/PageOverlayController.h) (0 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/page/PageOverlayController.h         (rev 0)
+++ branches/safari-600.3-branch/Source/WebCore/page/PageOverlayController.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -0,0 +1,103 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PageOverlayController_h
+#define PageOverlayController_h
+
+#include "GraphicsLayerClient.h"
+#include "PageOverlay.h"
+#include <wtf/HashMap.h>
+#include <wtf/RefPtr.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class Frame;
+class MainFrame;
+class Page;
+class PlatformMouseEvent;
+
+class PageOverlayController final : public GraphicsLayerClient {
+ WTF_MAKE_NONCOPYABLE(PageOverlayController);
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ PageOverlayController(MainFrame&);
+ virtual ~PageOverlayController();
+
+ GraphicsLayer& documentOverlayRootLayer();
+ GraphicsLayer& viewOverlayRootLayer();
+
+ void installPageOverlay(PassRefPtr<PageOverlay>, PageOverlay::FadeMode);
+ void uninstallPageOverlay(PageOverlay*, PageOverlay::FadeMode);
+
+ void setPageOverlayNeedsDisplay(PageOverlay&, const IntRect&);
+ void setPageOverlayOpacity(PageOverlay&, float);
+ void clearPageOverlay(PageOverlay&);
+ GraphicsLayer& layerForOverlay(PageOverlay&) const;
+
+ void willAttachRootLayer();
+
+ void didChangeViewSize();
+ void didChangeDocumentSize();
+ void didChangeSettings();
+ void didChangeDeviceScaleFactor();
+ void didChangeExposedRect();
+ void didScrollFrame(Frame&);
+
+ void didChangeOverlayFrame(PageOverlay&);
+ void didChangeOverlayBackgroundColor(PageOverlay&);
+
+ int overlayCount() const { return m_overlayGraphicsLayers.size(); }
+
+ bool handleMouseEvent(const PlatformMouseEvent&);
+
+ bool copyAccessibilityAttributeStringValueForPoint(String attribute, FloatPoint, String& value);
+ bool copyAccessibilityAttributeBoolValueForPoint(String attribute, FloatPoint, bool& value);
+ Vector<String> copyAccessibilityAttributesNames(bool parameterizedNames);
+
+private:
+ void createRootLayersIfNeeded();
+
+ void updateSettingsForLayer(GraphicsLayer&);
+ void updateForceSynchronousScrollLayerPositionUpdates();
+
+ // GraphicsLayerClient
+ virtual void notifyFlushRequired(const GraphicsLayer*) override;
+ virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const FloatRect& clipRect) override;
+ virtual float deviceScaleFactor() const override;
+ virtual bool shouldSkipLayerInDump(const GraphicsLayer*) const override { return true; }
+
+ std::unique_ptr<GraphicsLayer> m_documentOverlayRootLayer;
+ std::unique_ptr<GraphicsLayer> m_viewOverlayRootLayer;
+ bool m_initialized;
+
+ HashMap<PageOverlay*, std::unique_ptr<GraphicsLayer>> m_overlayGraphicsLayers;
+ Vector<RefPtr<PageOverlay>> m_pageOverlays;
+ MainFrame& m_mainFrame;
+};
+
+} // namespace WebKit
+
+#endif // PageOverlayController_h
</ins></span></pre></div>
<a id="branchessafari6003branchSourceWebCoreplatformgraphicsGraphicsLayerClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/platform/graphics/GraphicsLayerClient.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/platform/graphics/GraphicsLayerClient.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/platform/graphics/GraphicsLayerClient.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #ifndef GraphicsLayerClient_h
</span><span class="cx"> #define GraphicsLayerClient_h
</span><span class="cx">
</span><ins>+#include <wtf/Forward.h>
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class FloatPoint;
</span><span class="lines">@@ -62,7 +64,7 @@
</span><span class="cx"> virtual void tiledBackingUsageChanged(const GraphicsLayer*, bool /*usingTiledBacking*/) { }
</span><span class="cx">
</span><span class="cx"> // Callback for when hardware-accelerated animation started.
</span><del>- virtual void notifyAnimationStarted(const GraphicsLayer*, double time) = 0;
</del><ins>+ virtual void notifyAnimationStarted(const GraphicsLayer*, double /*time*/) { }
</ins><span class="cx">
</span><span class="cx"> // Notification that a layer property changed that requires a subsequent call to flushCompositingState()
</span><span class="cx"> // to appear on the screen.
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayer.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayer.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayer.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -2315,7 +2315,7 @@
</span><span class="cx">
</span><span class="cx"> InspectorInstrumentation::didScrollLayer(&frame);
</span><span class="cx"> if (scrollsOverflow())
</span><del>- frame.loader().client().didChangeScrollOffset();
</del><ins>+ view.frameView().didChangeScrollOffset();
</ins><span class="cx">
</span><span class="cx"> view.frameView().resumeVisibleImageAnimationsIncludingSubframes();
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> #include "MainFrame.h"
</span><span class="cx"> #include "NodeList.h"
</span><span class="cx"> #include "Page.h"
</span><ins>+#include "PageOverlayController.h"
</ins><span class="cx"> #include "RenderEmbeddedObject.h"
</span><span class="cx"> #include "RenderFlowThread.h"
</span><span class="cx"> #include "RenderFullScreen.h"
</span><span class="lines">@@ -643,7 +644,8 @@
</span><span class="cx">
</span><span class="cx"> bool RenderLayerCompositor::hasAnyAdditionalCompositedLayers(const RenderLayer& rootLayer) const
</span><span class="cx"> {
</span><del>- return m_compositedLayerCount > (rootLayer.isComposited() ? 1 : 0);
</del><ins>+ int layerCount = m_compositedLayerCount + m_renderView.frame().mainFrame().pageOverlayController().overlayCount();
+ return layerCount > (rootLayer.isComposited() ? 1 : 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType updateType, RenderLayer* updateRoot)
</span><span class="lines">@@ -660,7 +662,7 @@
</span><span class="cx"> if (m_renderView.needsLayout())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (m_forceCompositingMode && !m_compositing)
</del><ins>+ if ((m_forceCompositingMode || m_renderView.frame().mainFrame().pageOverlayController().overlayCount()) && !m_compositing)
</ins><span class="cx"> enableCompositingMode(true);
</span><span class="cx">
</span><span class="cx"> if (!m_reevaluateCompositingAfterLayout && !m_compositing)
</span><span class="lines">@@ -743,7 +745,7 @@
</span><span class="cx">
</span><span class="cx"> // Host the document layer in the RenderView's root layer.
</span><span class="cx"> if (isFullUpdate) {
</span><del>- appendOverlayLayers(childList);
</del><ins>+ appendDocumentOverlayLayers(childList);
</ins><span class="cx"> // Even when childList is empty, don't drop out of compositing mode if there are
</span><span class="cx"> // composited layers that we didn't hit in our traversal (e.g. because of visibility:hidden).
</span><span class="cx"> if (childList.isEmpty() && !hasAnyAdditionalCompositedLayers(*updateRoot))
</span><span class="lines">@@ -779,15 +781,19 @@
</span><span class="cx"> InspectorInstrumentation::layerTreeDidChange(page());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RenderLayerCompositor::appendOverlayLayers(Vector<GraphicsLayer*>& childList)
</del><ins>+void RenderLayerCompositor::appendDocumentOverlayLayers(Vector<GraphicsLayer*>& childList)
</ins><span class="cx"> {
</span><span class="cx"> Frame& frame = m_renderView.frameView().frame();
</span><ins>+ if (!frame.isMainFrame())
+ return;
+
</ins><span class="cx"> Page* page = frame.page();
</span><span class="cx"> if (!page)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (GraphicsLayer* overlayLayer = page->chrome().client().documentOverlayLayerForFrame(frame))
- childList.append(overlayLayer);
</del><ins>+ PageOverlayController& pageOverlayController = frame.mainFrame().pageOverlayController();
+ pageOverlayController.willAttachRootLayer();
+ childList.append(&pageOverlayController.documentOverlayRootLayer());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RenderLayerCompositor::layerBecameNonComposited(const RenderLayer& layer)
</span><span class="lines">@@ -3369,6 +3375,11 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> page->chrome().client().attachRootGraphicsLayer(&frame, rootGraphicsLayer());
</span><ins>+ if (frame.isMainFrame()) {
+ PageOverlayController& pageOverlayController = frame.mainFrame().pageOverlayController();
+ pageOverlayController.willAttachRootLayer();
+ page->chrome().client().attachViewOverlayGraphicsLayer(&frame, &pageOverlayController.viewOverlayRootLayer());
+ }
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case RootLayerAttachedViaEnclosingFrame: {
</span><span class="lines">@@ -3413,6 +3424,8 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> page->chrome().client().attachRootGraphicsLayer(&frame, 0);
</span><ins>+ if (frame.isMainFrame())
+ page->chrome().client().attachViewOverlayGraphicsLayer(&frame, 0);
</ins><span class="cx"> }
</span><span class="cx"> break;
</span><span class="cx"> case RootLayerUnattached:
</span><span class="lines">@@ -3447,8 +3460,12 @@
</span><span class="cx"> if (!page)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (GraphicsLayer* overlayLayer = page->chrome().client().documentOverlayLayerForFrame(frame))
- m_rootContentLayer->addChild(overlayLayer);
</del><ins>+ if (!frame.isMainFrame())
+ return;
+
+ PageOverlayController& pageOverlayController = frame.mainFrame().pageOverlayController();
+ pageOverlayController.willAttachRootLayer();
+ m_rootContentLayer->addChild(&pageOverlayController.documentOverlayRootLayer());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // IFrames are special, because we hook compositing layers together across iframe boundaries
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebCorerenderingRenderLayerCompositorh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayerCompositor.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayerCompositor.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebCore/rendering/RenderLayerCompositor.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -361,7 +361,7 @@
</span><span class="cx"> bool layerHas3DContent(const RenderLayer&) const;
</span><span class="cx"> bool isRunningAcceleratedTransformAnimation(RenderLayerModelObject&) const;
</span><span class="cx">
</span><del>- void appendOverlayLayers(Vector<GraphicsLayer*>&);
</del><ins>+ void appendDocumentOverlayLayers(Vector<GraphicsLayer*>&);
</ins><span class="cx"> bool hasAnyAdditionalCompositedLayers(const RenderLayer& rootLayer) const;
</span><span class="cx">
</span><span class="cx"> void ensureRootLayer();
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2014-10-28 Dana Burkart <dburkart@apple.com>
+
+ Merge r174231. <rdar://problem/18640833>
+
+ 2014-10-02 Tim Horton <timothy_horton@apple.com>
+
+ Move PageOverlay[Controller] to WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=137164
+ <rdar://problem/18508258>
+
+ Reviewed by Anders Carlsson.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::attachViewOverlayGraphicsLayer):
+ Add an empty ChromeClient override.
+
</ins><span class="cx"> 2014-08-19 Dana Burkart <dburkart@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r172709. <rdar://problem/17850158>
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKitmacWebCoreSupportWebChromeClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -163,6 +163,7 @@
</span><span class="cx"> virtual bool shouldPaintEntireContents() const override;
</span><span class="cx">
</span><span class="cx"> virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override;
</span><ins>+ virtual void attachViewOverlayGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override;
</ins><span class="cx"> virtual void setNeedsOneShotDrawingSynchronization() override;
</span><span class="cx"> virtual void scheduleCompositingLayerFlush() override;
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKitmacWebCoreSupportWebChromeClientmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -924,6 +924,11 @@
</span><span class="cx"> END_BLOCK_OBJC_EXCEPTIONS;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebChromeClient::attachViewOverlayGraphicsLayer(Frame*, GraphicsLayer*)
+{
+ // FIXME: If we want view-relative page overlays in Legacy WebKit, this would be the place to hook them up.
+}
+
</ins><span class="cx"> void WebChromeClient::setNeedsOneShotDrawingSynchronization()
</span><span class="cx"> {
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit/win/ChangeLog (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit/win/ChangeLog        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit/win/ChangeLog        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2014-10-28 Dana Burkart <dburkart@apple.com>
+
+ Merge r174231. <rdar://problem/18640833>
+
+ 2014-10-02 Tim Horton <timothy_horton@apple.com>
+
+ Move PageOverlay[Controller] to WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=137164
+ <rdar://problem/18508258>
+
+ Reviewed by Anders Carlsson.
+
+ * WebCoreSupport/WebChromeClient.cpp:
+ (WebChromeClient::attachViewOverlayGraphicsLayer):
+ * WebCoreSupport/WebChromeClient.h:
+ Add an empty ChromeClient override.
+
</ins><span class="cx"> 2014-08-26 Dana Burkart <dburkart@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r172977. <rdar://problem/18141703>
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKitwinWebCoreSupportWebChromeClientcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -752,6 +752,11 @@
</span><span class="cx"> m_webView->setRootChildLayer(graphicsLayer);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebChromeClient::attachViewOverlayGraphicsLayer(Frame*, GraphicsLayer*)
+{
+ // FIXME: If we want view-relative page overlays in Legacy WebKit on Windows, this would be the place to hook them up.
+}
+
</ins><span class="cx"> void WebChromeClient::scheduleCompositingLayerFlush()
</span><span class="cx"> {
</span><span class="cx"> m_webView->flushPendingGraphicsLayerChangesSoon();
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKitwinWebCoreSupportWebChromeClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit/win/WebCoreSupport/WebChromeClient.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit/win/WebCoreSupport/WebChromeClient.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit/win/WebCoreSupport/WebChromeClient.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -130,6 +130,7 @@
</span><span class="cx">
</span><span class="cx"> // Pass 0 as the GraphicsLayer to detatch the root layer.
</span><span class="cx"> virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*);
</span><ins>+ virtual void attachViewOverlayGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override;
</ins><span class="cx"> // Sets a flag to specify that the next time content is drawn to the window,
</span><span class="cx"> // the changes appear on the screen in synchrony with updates to GraphicsLayers.
</span><span class="cx"> virtual void setNeedsOneShotDrawingSynchronization() { }
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2CMakeListstxt"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/CMakeLists.txt (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/CMakeLists.txt        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/CMakeLists.txt        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -548,8 +548,6 @@
</span><span class="cx"> WebProcess/WebPage/FindController.cpp
</span><span class="cx"> WebProcess/WebPage/LayerTreeHost.cpp
</span><span class="cx"> WebProcess/WebPage/PageBanner.cpp
</span><del>- WebProcess/WebPage/PageOverlay.cpp
- WebProcess/WebPage/PageOverlayController.cpp
</del><span class="cx"> WebProcess/WebPage/TapHighlightController.cpp
</span><span class="cx"> WebProcess/WebPage/WebBackForwardListProxy.cpp
</span><span class="cx"> WebProcess/WebPage/WebContextMenu.cpp
</span><span class="lines">@@ -559,6 +557,7 @@
</span><span class="cx"> WebProcess/WebPage/WebOpenPanelResultListener.cpp
</span><span class="cx"> WebProcess/WebPage/WebPage.cpp
</span><span class="cx"> WebProcess/WebPage/WebPageGroupProxy.cpp
</span><ins>+ WebProcess/WebPage/WebPageOverlay.cpp
</ins><span class="cx"> WebProcess/WebPage/VisitedLinkTableController.cpp
</span><span class="cx"> WebProcess/WebPage/WebUndoStep.cpp
</span><span class="cx"> )
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/ChangeLog (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/ChangeLog        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/ChangeLog        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -1,5 +1,140 @@
</span><span class="cx"> 2014-10-28 Dana Burkart <dburkart@apple.com>
</span><span class="cx">
</span><ins>+ Merge r174231. <rdar://problem/18640833>
+
+ 2014-10-02 Tim Horton <timothy_horton@apple.com>
+
+ Move PageOverlay[Controller] to WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=137164
+ <rdar://problem/18508258>
+
+ Reviewed by Anders Carlsson.
+
+ * CMakeLists.txt:
+ * WebKit2.xcodeproj/project.pbxproj:
+ Make the appropriate build system changes.
+
+ * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
+ Make WKBundlePageOverlayRef map to WebPageOverlay instead of PageOverlay.
+
+ * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+ (WKBundlePageInstallPageOverlay):
+ (WKBundlePageUninstallPageOverlay):
+ (WKBundlePageInstallPageOverlayWithAnimation):
+ (WKBundlePageUninstallPageOverlayWithAnimation):
+ Forward PageOverlay installation/uninstallation to WebCore.
+
+ * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
+ (WKBundlePageOverlayGetTypeID):
+ (WKBundlePageOverlayCreate):
+ (WKBundlePageOverlaySetAccessibilityClient):
+ Use WebPageOverlay instead of PageOverlay, and references instead of pointers.
+ We forward client callbacks through from PageOverlay::Client to WebPageOverlay::Client.
+
+ (PageOverlayClientImpl::copyAccessibilityAttributeValue):
+ (PageOverlayClientImpl::copyAccessibilityAttributeNames):
+ Convert from wtf types to WebKit2 types.
+
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::graphicsLayerFactory):
+ If we don't have a drawing area, don't dereference it!
+
+ (WebKit::WebChromeClient::attachViewOverlayGraphicsLayer):
+ Forward attachViewOverlayGraphicsLayer to the DrawingArea.
+
+ * WebProcess/WebCoreSupport/WebChromeClient.h:
+
+ * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
+ * WebProcess/WebCoreSupport/WebInspectorClient.h:
+ * WebProcess/WebPage/FindController.cpp:
+ * WebProcess/WebPage/FindController.h:
+ * WebProcess/WebPage/ios/FindControllerIOS.mm:
+ * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
+ * WebProcess/WebPage/mac/ServicesOverlayController.mm:
+ * WebProcess/WebPage/ServicesOverlayController.h:
+ Mechanical changes to adopt to the fact that PageOverlay is in WebCore now.
+
+ * WebProcess/WebPage/LayerTreeHost.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ * WebProcess/WebPage/WebPage.h:
+ Remove support for WebKit2-based page overlays.
+ Return MainFrame instead of Frame from mainFrame().
+
+ * WebProcess/WebPage/WebPageOverlay.cpp: Added.
+ * WebProcess/WebPage/WebPageOverlay.h: Added.
+ (WebKit::WebPageOverlay::create):
+ (WebKit::WebPageOverlay::WebPageOverlay):
+ (WebKit::WebPageOverlay::~WebPageOverlay):
+ (WebKit::WebPageOverlay::setNeedsDisplay):
+ (WebKit::WebPageOverlay::clear):
+ (WebKit::WebPageOverlay::pageOverlayDestroyed):
+ (WebKit::WebPageOverlay::willMoveToPage):
+ (WebKit::WebPageOverlay::didMoveToPage):
+ (WebKit::WebPageOverlay::drawRect):
+ (WebKit::WebPageOverlay::mouseEvent):
+ (WebKit::WebPageOverlay::didScrollFrame):
+ (WebKit::WebPageOverlay::copyAccessibilityAttributeStringValueForPoint):
+ (WebKit::WebPageOverlay::copyAccessibilityAttributeBoolValueForPoint):
+ (WebKit::WebPageOverlay::copyAccessibilityAttributeNames):
+ WebPageOverlay exists to be our API object, but forwards everything
+ to its WebCore::PageOverlay, and implements WebCore::PageOverlay::Client, and
+ forwards client callbacks to its WebPageOverlay::Client (which
+ WKBundlePageOverlay implements).
+
+ * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
+ (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
+ (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
+ Forward the three AX properties that PageOverlays are ever queried for
+ to the appropriate PageOverlayController function.
+
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+ (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
+ (WebKit::RemoteLayerTreeDrawingArea::updateRootLayers):
+ Factor updateRootLayers out of setRootCompositingLayer.
+
+ (WebKit::RemoteLayerTreeDrawingArea::attachViewOverlayGraphicsLayer):
+ If we attach/detach the view-relative page overlay root layer,
+ reattach the root compositing layer's children.
+
+ (WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
+ Ditto for the root compositing layer.
+
+ (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
+ (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
+ (WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
+ Informing PageOverlayController of exposed rect/document size changes is now
+ WebCore's job.
+
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
+ (WebKit::TiledCoreAnimationDrawingArea::updateRootLayers):
+ Factor updateRootLayers out of setRootCompositingLayer.
+
+ (WebKit::TiledCoreAnimationDrawingArea::attachViewOverlayGraphicsLayer):
+ (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
+ Make use of updateRootLayers when we attach/detach root compositing layer/view overlay layer.
+
+ (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
+ (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
+ (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
+ Informing PageOverlayController of exposed rect/document size changes is now
+ WebCore's job.
+
+ * WebProcess/WebPage/DrawingArea.h:
+ (WebKit::DrawingArea::attachViewOverlayGraphicsLayer):
+
+ * Shared/WebRenderLayer.cpp:
+ * Shared/WebRenderObject.cpp:
+ * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
+ * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
+ * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
+ * WebProcess/WebProcess.cpp:
+ Include MainFrame.h because WebPage::mainFrame returns a MainFrame now.
+
+2014-10-28 Dana Burkart <dburkart@apple.com>
+
</ins><span class="cx"> Merge r174369. <rdar://problem/18640842>
</span><span class="cx">
</span><span class="cx"> 2014-10-06 Chris Dumez <cdumez@apple.com>
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2SharedWebRenderLayercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/Shared/WebRenderLayer.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/Shared/WebRenderLayer.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/Shared/WebRenderLayer.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include <WebCore/Frame.h>
</span><span class="cx"> #include <WebCore/FrameLoader.h>
</span><span class="cx"> #include <WebCore/FrameLoaderClient.h>
</span><ins>+#include <WebCore/MainFrame.h>
</ins><span class="cx"> #include <WebCore/RenderLayer.h>
</span><span class="cx"> #include <WebCore/RenderLayerBacking.h>
</span><span class="cx"> #include <WebCore/RenderView.h>
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2SharedWebRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/Shared/WebRenderObject.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/Shared/WebRenderObject.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/Shared/WebRenderObject.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include <WebCore/Frame.h>
</span><span class="cx"> #include <WebCore/FrameLoader.h>
</span><span class="cx"> #include <WebCore/FrameLoaderClient.h>
</span><ins>+#include <WebCore/MainFrame.h>
</ins><span class="cx"> #include <WebCore/RenderText.h>
</span><span class="cx"> #include <WebCore/RenderView.h>
</span><span class="cx"> #include <WebCore/RenderWidget.h>
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -307,8 +307,6 @@
</span><span class="cx">                 1A90C1EE1264FD50003E44D4 /* WebFindOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A90C1ED1264FD50003E44D4 /* WebFindOptions.h */; };
</span><span class="cx">                 1A90C1F41264FD71003E44D4 /* FindController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A90C1F21264FD71003E44D4 /* FindController.h */; };
</span><span class="cx">                 1A90C1F51264FD71003E44D4 /* FindController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A90C1F31264FD71003E44D4 /* FindController.cpp */; };
</span><del>-                1A90C23712650717003E44D4 /* PageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A90C23512650717003E44D4 /* PageOverlay.h */; };
-                1A90C23812650717003E44D4 /* PageOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A90C23612650717003E44D4 /* PageOverlay.cpp */; };
</del><span class="cx">                 1A910071126675C4001842F5 /* FindIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A91006F126675C3001842F5 /* FindIndicator.h */; };
</span><span class="cx">                 1A910072126675C4001842F5 /* FindIndicator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A910070126675C4001842F5 /* FindIndicator.cpp */; };
</span><span class="cx">                 1A92DC1112F8BA460017AF65 /* LayerTreeContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A92DC1012F8BA460017AF65 /* LayerTreeContext.h */; };
</span><span class="lines">@@ -566,8 +564,6 @@
</span><span class="cx">                 29D55DF2161BF9F10031A2E3 /* WebPageGroupProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 29D55DF0161BF9F10031A2E3 /* WebPageGroupProxyMessages.h */; };
</span><span class="cx">                 2D125C5E1857EA05003BA3CB /* ViewGestureController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D125C5C1857EA05003BA3CB /* ViewGestureController.h */; };
</span><span class="cx">                 2D125C5F1857EA05003BA3CB /* ViewGestureControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D125C5D1857EA05003BA3CB /* ViewGestureControllerMac.mm */; };
</span><del>-                2D140EAF18F37BE0005E75A0 /* PageOverlayController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D140EAD18F37BE0005E75A0 /* PageOverlayController.cpp */; };
-                2D140EB018F37BE0005E75A0 /* PageOverlayController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D140EAE18F37BE0005E75A0 /* PageOverlayController.h */; };
</del><span class="cx">                 2D1B5D5D185869C8006C6596 /* ViewGestureControllerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D1B5D5B185869C8006C6596 /* ViewGestureControllerMessageReceiver.cpp */; };
</span><span class="cx">                 2D1B5D5E185869C8006C6596 /* ViewGestureControllerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D1B5D5C185869C8006C6596 /* ViewGestureControllerMessages.h */; };
</span><span class="cx">                 2D28F3E41885CCC1004B9EAE /* WebChromeClientIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D28F3E01885CCC1004B9EAE /* WebChromeClientIOS.mm */; };
</span><span class="lines">@@ -586,6 +582,8 @@
</span><span class="cx">                 2D429BFD1721E2C700EC681F /* PDFPluginPasswordField.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D429BFB1721E2BA00EC681F /* PDFPluginPasswordField.mm */; };
</span><span class="cx">                 2D47B56C1810714E003A3AEE /* RemoteLayerBackingStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D47B56A1810714E003A3AEE /* RemoteLayerBackingStore.mm */; };
</span><span class="cx">                 2D47B56D1810714E003A3AEE /* RemoteLayerBackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D47B56B1810714E003A3AEE /* RemoteLayerBackingStore.h */; };
</span><ins>+                2D5C9D0519C81D8F00B3C5C1 /* WebPageOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D5C9D0319C81D8F00B3C5C1 /* WebPageOverlay.cpp */; };
+                2D5C9D0619C81D8F00B3C5C1 /* WebPageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D5C9D0419C81D8F00B3C5C1 /* WebPageOverlay.h */; };
</ins><span class="cx">                 2D6AB541192B1C4A003A9FD1 /* WKPDFPageNumberIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D6AB53F192B1C4A003A9FD1 /* WKPDFPageNumberIndicator.h */; };
</span><span class="cx">                 2D6AB542192B1C4A003A9FD1 /* WKPDFPageNumberIndicator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D6AB540192B1C4A003A9FD1 /* WKPDFPageNumberIndicator.mm */; };
</span><span class="cx">                 2D6B371B18A967AD0042AE80 /* _WKThumbnailView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D6B371918A967AD0042AE80 /* _WKThumbnailView.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -2287,8 +2285,6 @@
</span><span class="cx">                 1A90C1ED1264FD50003E44D4 /* WebFindOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFindOptions.h; sourceTree = "<group>"; };
</span><span class="cx">                 1A90C1F21264FD71003E44D4 /* FindController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FindController.h; sourceTree = "<group>"; };
</span><span class="cx">                 1A90C1F31264FD71003E44D4 /* FindController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FindController.cpp; sourceTree = "<group>"; };
</span><del>-                1A90C23512650717003E44D4 /* PageOverlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageOverlay.h; sourceTree = "<group>"; };
-                1A90C23612650717003E44D4 /* PageOverlay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageOverlay.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 1A91006F126675C3001842F5 /* FindIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FindIndicator.h; sourceTree = "<group>"; };
</span><span class="cx">                 1A910070126675C4001842F5 /* FindIndicator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FindIndicator.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 1A92DC1012F8BA460017AF65 /* LayerTreeContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayerTreeContext.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -2571,8 +2567,6 @@
</span><span class="cx">                 29D55DF0161BF9F10031A2E3 /* WebPageGroupProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPageGroupProxyMessages.h; sourceTree = "<group>"; };
</span><span class="cx">                 2D125C5C1857EA05003BA3CB /* ViewGestureController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewGestureController.h; sourceTree = "<group>"; };
</span><span class="cx">                 2D125C5D1857EA05003BA3CB /* ViewGestureControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ViewGestureControllerMac.mm; sourceTree = "<group>"; };
</span><del>-                2D140EAD18F37BE0005E75A0 /* PageOverlayController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageOverlayController.cpp; sourceTree = "<group>"; };
-                2D140EAE18F37BE0005E75A0 /* PageOverlayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageOverlayController.h; sourceTree = "<group>"; };
</del><span class="cx">                 2D1B5D5A18586599006C6596 /* ViewGestureController.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = ViewGestureController.messages.in; sourceTree = "<group>"; };
</span><span class="cx">                 2D1B5D5B185869C8006C6596 /* ViewGestureControllerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewGestureControllerMessageReceiver.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 2D1B5D5C185869C8006C6596 /* ViewGestureControllerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewGestureControllerMessages.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -2597,6 +2591,8 @@
</span><span class="cx">                 2D429BFB1721E2BA00EC681F /* PDFPluginPasswordField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PDFPluginPasswordField.mm; path = PDF/PDFPluginPasswordField.mm; sourceTree = "<group>"; };
</span><span class="cx">                 2D47B56A1810714E003A3AEE /* RemoteLayerBackingStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteLayerBackingStore.mm; sourceTree = "<group>"; };
</span><span class="cx">                 2D47B56B1810714E003A3AEE /* RemoteLayerBackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteLayerBackingStore.h; sourceTree = "<group>"; };
</span><ins>+                2D5C9D0319C81D8F00B3C5C1 /* WebPageOverlay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPageOverlay.cpp; sourceTree = "<group>"; };
+                2D5C9D0419C81D8F00B3C5C1 /* WebPageOverlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPageOverlay.h; sourceTree = "<group>"; };
</ins><span class="cx">                 2D6AB53F192B1C4A003A9FD1 /* WKPDFPageNumberIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKPDFPageNumberIndicator.h; path = ios/WKPDFPageNumberIndicator.h; sourceTree = "<group>"; };
</span><span class="cx">                 2D6AB540192B1C4A003A9FD1 /* WKPDFPageNumberIndicator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKPDFPageNumberIndicator.mm; path = ios/WKPDFPageNumberIndicator.mm; sourceTree = "<group>"; };
</span><span class="cx">                 2D6B371918A967AD0042AE80 /* _WKThumbnailView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKThumbnailView.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -5749,10 +5745,8 @@
</span><span class="cx">                                 1A90C1F21264FD71003E44D4 /* FindController.h */,
</span><span class="cx">                                 7C387433172F5615001BD88A /* PageBanner.cpp */,
</span><span class="cx">                                 7CF47FF917275C57008ACB91 /* PageBanner.h */,
</span><del>-                                1A90C23612650717003E44D4 /* PageOverlay.cpp */,
-                                1A90C23512650717003E44D4 /* PageOverlay.h */,
-                                2D140EAD18F37BE0005E75A0 /* PageOverlayController.cpp */,
-                                2D140EAE18F37BE0005E75A0 /* PageOverlayController.h */,
</del><ins>+                                2D5C9D0319C81D8F00B3C5C1 /* WebPageOverlay.cpp */,
+                                2D5C9D0419C81D8F00B3C5C1 /* WebPageOverlay.h */,
</ins><span class="cx">                                 5192D5711961FA2F00CD19AA /* ServicesOverlayController.h */,
</span><span class="cx">                                 2D819B99186275B3001F03D1 /* ViewGestureGeometryCollector.cpp */,
</span><span class="cx">                                 2D819B9A186275B3001F03D1 /* ViewGestureGeometryCollector.h */,
</span><span class="lines">@@ -7092,6 +7086,7 @@
</span><span class="cx">                                 7C85FD8019341665000177C4 /* WebPreferencesKeys.h in Headers */,
</span><span class="cx">                                 512F589712A8838800629530 /* AuthenticationChallengeProxy.h in Headers */,
</span><span class="cx">                                 1A445B9F184D5FB5004B3414 /* WKContextInjectedBundleClient.h in Headers */,
</span><ins>+                                2D5C9D0619C81D8F00B3C5C1 /* WebPageOverlay.h in Headers */,
</ins><span class="cx">                                 512F589912A8838800629530 /* AuthenticationDecisionListener.h in Headers */,
</span><span class="cx">                                 518E8EF916B2091C00E91429 /* AuthenticationManager.h in Headers */,
</span><span class="cx">                                 512F58A312A883AD00629530 /* AuthenticationManagerMessages.h in Headers */,
</span><span class="lines">@@ -7200,7 +7195,6 @@
</span><span class="cx">                                 1AE52F9219201DA700A1FA37 /* APIContextConfiguration.h in Headers */,
</span><span class="cx">                                 7C361D731927FA360036A59D /* WebScriptMessageHandler.h in Headers */,
</span><span class="cx">                                 E105FE5418D7B9DE008F57A8 /* EditingRange.h in Headers */,
</span><del>-                                2D140EB018F37BE0005E75A0 /* PageOverlayController.h in Headers */,
</del><span class="cx">                                 BC17753F118BABF0007D9E9A /* GenericCallback.h in Headers */,
</span><span class="cx">                                 379A873618BBFA4300588AF2 /* _WKActivatedElementInfoInternal.h in Headers */,
</span><span class="cx">                                 BC06F42F12DBB9B6002D78DE /* GeolocationPermissionRequestManager.h in Headers */,
</span><span class="lines">@@ -7326,7 +7320,6 @@
</span><span class="cx">                                 1A5B1C511898606F004FCF9B /* WKNavigation.h in Headers */,
</span><span class="cx">                                 7CF47FFB17275C57008ACB91 /* PageBanner.h in Headers */,
</span><span class="cx">                                 BC6EDAA6111271C600E7678B /* PageClient.h in Headers */,
</span><del>-                                1A90C23712650717003E44D4 /* PageOverlay.h in Headers */,
</del><span class="cx">                                 C574A58112E66681002DFE98 /* PasteboardTypes.h in Headers */,
</span><span class="cx">                                 E19582D3153CBFD700B60875 /* PDFKitImports.h in Headers */,
</span><span class="cx">                                 51FCB18917BBFE0300394CD8 /* SynchronousNetworkLoaderClient.h in Headers */,
</span><span class="lines">@@ -9000,7 +8993,6 @@
</span><span class="cx">                                 51E351F5180F5C7500E53BE9 /* WebIDBFactoryBackend.cpp in Sources */,
</span><span class="cx">                                 7C387434172F5615001BD88A /* PageBanner.cpp in Sources */,
</span><span class="cx">                                 7C6D37FC172F555F009D2847 /* PageBannerMac.mm in Sources */,
</span><del>-                                1A90C23812650717003E44D4 /* PageOverlay.cpp in Sources */,
</del><span class="cx">                                 C574A58212E66681002DFE98 /* PasteboardTypes.mm in Sources */,
</span><span class="cx">                                 E19582D6153CC05400B60875 /* PDFKitImports.mm in Sources */,
</span><span class="cx">                                 2D870D1016234FFE000A3F20 /* PDFPlugin.mm in Sources */,
</span><span class="lines">@@ -9201,7 +9193,6 @@
</span><span class="cx">                                 A54293A5195A43DD002782C7 /* WKInspectorNodeSearchGestureRecognizer.mm in Sources */,
</span><span class="cx">                                 C0337DAE127A24FE008FF4F4 /* WebEvent.cpp in Sources */,
</span><span class="cx">                                 BC032DBA10F4380F0058C15A /* WebEventConversion.cpp in Sources */,
</span><del>-                                2D140EAF18F37BE0005E75A0 /* PageOverlayController.cpp in Sources */,
</del><span class="cx">                                 BC111B5E112F629800337BAB /* WebEventFactory.mm in Sources */,
</span><span class="cx">                                 A118A9EE1907AD6F00F7C92B /* QuickLookDocumentData.cpp in Sources */,
</span><span class="cx">                                 1A3DD1FD125E59F3004515E6 /* WebFindClient.cpp in Sources */,
</span><span class="lines">@@ -9286,6 +9277,7 @@
</span><span class="cx">                                 C06C6095124C144B0001682F /* WebPageCreationParameters.cpp in Sources */,
</span><span class="cx">                                 C59C4A5818B81174007BDCB6 /* AssistedNodeInformation.cpp in Sources */,
</span><span class="cx">                                 BC7B6207129A0A6700D174A4 /* WebPageGroup.cpp in Sources */,
</span><ins>+                                2D5C9D0519C81D8F00B3C5C1 /* WebPageOverlay.cpp in Sources */,
</ins><span class="cx">                                 BC7B625312A43C9600D174A4 /* WebPageGroupData.cpp in Sources */,
</span><span class="cx">                                 BC7B621612A4219A00D174A4 /* WebPageGroupProxy.cpp in Sources */,
</span><span class="cx">                                 29D55DF1161BF9F10031A2E3 /* WebPageGroupProxyMessageReceiver.cpp in Sources */,
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessInjectedBundleAPIcWKBundleAPICasth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleAPICast.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -49,11 +49,11 @@
</span><span class="cx"> class InjectedBundleRangeHandle;
</span><span class="cx"> class InjectedBundleScriptWorld;
</span><span class="cx"> class PageBanner;
</span><del>-class PageOverlay;
</del><span class="cx"> class WebFrame;
</span><span class="cx"> class WebInspector;
</span><span class="cx"> class WebPage;
</span><span class="cx"> class WebPageGroupProxy;
</span><ins>+class WebPageOverlay;
</ins><span class="cx">
</span><span class="cx"> WK_ADD_API_MAPPING(WKBundleBackForwardListItemRef, InjectedBundleBackForwardListItem)
</span><span class="cx"> WK_ADD_API_MAPPING(WKBundleBackForwardListRef, InjectedBundleBackForwardList)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> WK_ADD_API_MAPPING(WKBundleNodeHandleRef, InjectedBundleNodeHandle)
</span><span class="cx"> WK_ADD_API_MAPPING(WKBundlePageBannerRef, PageBanner)
</span><span class="cx"> WK_ADD_API_MAPPING(WKBundlePageGroupRef, WebPageGroupProxy)
</span><del>-WK_ADD_API_MAPPING(WKBundlePageOverlayRef, PageOverlay)
</del><ins>+WK_ADD_API_MAPPING(WKBundlePageOverlayRef, WebPageOverlay)
</ins><span class="cx"> WK_ADD_API_MAPPING(WKBundlePageRef, WebPage)
</span><span class="cx"> WK_ADD_API_MAPPING(WKBundleRangeHandleRef, InjectedBundleRangeHandle)
</span><span class="cx"> WK_ADD_API_MAPPING(WKBundleRef, InjectedBundle)
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -47,12 +47,15 @@
</span><span class="cx"> #include "WebFullScreenManager.h"
</span><span class="cx"> #include "WebImage.h"
</span><span class="cx"> #include "WebPage.h"
</span><ins>+#include "WebPageOverlay.h"
</ins><span class="cx"> #include "WebRenderLayer.h"
</span><span class="cx"> #include "WebRenderObject.h"
</span><span class="cx"> #include <WebCore/AXObjectCache.h>
</span><span class="cx"> #include <WebCore/AccessibilityObject.h>
</span><span class="cx"> #include <WebCore/MainFrame.h>
</span><span class="cx"> #include <WebCore/Page.h>
</span><ins>+#include <WebCore/PageOverlay.h>
+#include <WebCore/PageOverlayController.h>
</ins><span class="cx"> #include <WebCore/URL.h>
</span><span class="cx"> #include <wtf/StdLibExtras.h>
</span><span class="cx">
</span><span class="lines">@@ -354,22 +357,22 @@
</span><span class="cx">
</span><span class="cx"> void WKBundlePageInstallPageOverlay(WKBundlePageRef pageRef, WKBundlePageOverlayRef pageOverlayRef)
</span><span class="cx"> {
</span><del>- toImpl(pageRef)->installPageOverlay(toImpl(pageOverlayRef));
</del><ins>+ toImpl(pageRef)->mainFrame()->pageOverlayController().installPageOverlay(toImpl(pageOverlayRef)->coreOverlay(), WebCore::PageOverlay::FadeMode::DoNotFade);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WKBundlePageUninstallPageOverlay(WKBundlePageRef pageRef, WKBundlePageOverlayRef pageOverlayRef)
</span><span class="cx"> {
</span><del>- toImpl(pageRef)->uninstallPageOverlay(toImpl(pageOverlayRef));
</del><ins>+ toImpl(pageRef)->mainFrame()->pageOverlayController().uninstallPageOverlay(toImpl(pageOverlayRef)->coreOverlay(), WebCore::PageOverlay::FadeMode::DoNotFade);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WKBundlePageInstallPageOverlayWithAnimation(WKBundlePageRef pageRef, WKBundlePageOverlayRef pageOverlayRef)
</span><span class="cx"> {
</span><del>- toImpl(pageRef)->installPageOverlay(toImpl(pageOverlayRef), PageOverlay::FadeMode::Fade);
</del><ins>+ toImpl(pageRef)->mainFrame()->pageOverlayController().installPageOverlay(toImpl(pageOverlayRef)->coreOverlay(), WebCore::PageOverlay::FadeMode::Fade);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WKBundlePageUninstallPageOverlayWithAnimation(WKBundlePageRef pageRef, WKBundlePageOverlayRef pageOverlayRef)
</span><span class="cx"> {
</span><del>- toImpl(pageRef)->uninstallPageOverlay(toImpl(pageOverlayRef), PageOverlay::FadeMode::Fade);
</del><ins>+ toImpl(pageRef)->mainFrame()->pageOverlayController().uninstallPageOverlay(toImpl(pageOverlayRef)->coreOverlay(), WebCore::PageOverlay::FadeMode::Fade);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WKBundlePageSetTopOverhangImage(WKBundlePageRef pageRef, WKImageRef imageRef)
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessInjectedBundleAPIcWKBundlePageOverlaycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -27,10 +27,17 @@
</span><span class="cx"> #include "WKBundlePageOverlay.h"
</span><span class="cx">
</span><span class="cx"> #include "APIClient.h"
</span><del>-#include "PageOverlay.h"
</del><span class="cx"> #include "WKAPICast.h"
</span><ins>+#include "WKArray.h"
</ins><span class="cx"> #include "WKBundleAPICast.h"
</span><ins>+#include "WKNumber.h"
+#include "WKRetainPtr.h"
+#include "WKSharedAPICast.h"
+#include "WKStringPrivate.h"
</ins><span class="cx"> #include <WebCore/GraphicsContext.h>
</span><ins>+#include <WebCore/PageOverlay.h>
+#include <WebCore/PlatformMouseEvent.h>
+#include <WebKit/WebPageOverlay.h>
</ins><span class="cx">
</span><span class="cx"> namespace API {
</span><span class="cx">
</span><span class="lines">@@ -47,7 +54,7 @@
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> using namespace WebKit;
</span><span class="cx">
</span><del>-class PageOverlayClientImpl : API::Client<WKBundlePageOverlayClientBase>, public PageOverlay::Client {
</del><ins>+class PageOverlayClientImpl : API::Client<WKBundlePageOverlayClientBase>, public WebPageOverlay::Client {
</ins><span class="cx"> public:
</span><span class="cx"> explicit PageOverlayClientImpl(WKBundlePageOverlayClientBase* client)
</span><span class="cx"> {
</span><span class="lines">@@ -60,64 +67,64 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- // PageOverlay::Client.
- virtual void pageOverlayDestroyed(PageOverlay*)
</del><ins>+ // WebPageOverlay::Client.
+ virtual void pageOverlayDestroyed(WebPageOverlay&) override
</ins><span class="cx"> {
</span><span class="cx"> delete this;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void willMoveToWebPage(PageOverlay* pageOverlay, WebPage* page)
</del><ins>+ virtual void willMoveToPage(WebPageOverlay& pageOverlay, WebPage* page) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.willMoveToPage)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.willMoveToPage(toAPI(pageOverlay), toAPI(page), m_client.base.clientInfo);
</del><ins>+ m_client.willMoveToPage(toAPI(&pageOverlay), toAPI(page), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void didMoveToWebPage(PageOverlay* pageOverlay, WebPage* page)
</del><ins>+ virtual void didMoveToPage(WebPageOverlay& pageOverlay, WebPage* page) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didMoveToPage)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didMoveToPage(toAPI(pageOverlay), toAPI(page), m_client.base.clientInfo);
</del><ins>+ m_client.didMoveToPage(toAPI(&pageOverlay), toAPI(page), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void drawRect(PageOverlay* pageOverlay, GraphicsContext& graphicsContext, const IntRect& dirtyRect)
</del><ins>+ virtual void drawRect(WebPageOverlay& pageOverlay, GraphicsContext& graphicsContext, const IntRect& dirtyRect) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.drawRect)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.drawRect(toAPI(pageOverlay), graphicsContext.platformContext(), toAPI(dirtyRect), m_client.base.clientInfo);
</del><ins>+ m_client.drawRect(toAPI(&pageOverlay), graphicsContext.platformContext(), toAPI(dirtyRect), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool mouseEvent(PageOverlay* pageOverlay, const WebMouseEvent& event)
</del><ins>+ virtual bool mouseEvent(WebPageOverlay& pageOverlay, const PlatformMouseEvent& event) override
</ins><span class="cx"> {
</span><span class="cx"> switch (event.type()) {
</span><del>- case WebEvent::MouseDown: {
</del><ins>+ case PlatformMouseEvent::Type::MousePressed: {
</ins><span class="cx"> if (!m_client.mouseDown)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- return m_client.mouseDown(toAPI(pageOverlay), toAPI(event.position()), toAPI(event.button()), m_client.base.clientInfo);
</del><ins>+ return m_client.mouseDown(toAPI(&pageOverlay), toAPI(event.position()), toAPI(event.button()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><del>- case WebEvent::MouseUp: {
</del><ins>+ case PlatformMouseEvent::Type::MouseReleased: {
</ins><span class="cx"> if (!m_client.mouseUp)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- return m_client.mouseUp(toAPI(pageOverlay), toAPI(event.position()), toAPI(event.button()), m_client.base.clientInfo);
</del><ins>+ return m_client.mouseUp(toAPI(&pageOverlay), toAPI(event.position()), toAPI(event.button()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><del>- case WebEvent::MouseMove: {
- if (event.button() == WebMouseEvent::NoButton) {
</del><ins>+ case PlatformMouseEvent::Type::MouseMoved: {
+ if (event.button() == MouseButton::NoButton) {
</ins><span class="cx"> if (!m_client.mouseMoved)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- return m_client.mouseMoved(toAPI(pageOverlay), toAPI(event.position()), m_client.base.clientInfo);
</del><ins>+ return m_client.mouseMoved(toAPI(&pageOverlay), toAPI(event.position()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // This is a MouseMove event with a mouse button pressed. Call mouseDragged.
</span><span class="cx"> if (!m_client.mouseDragged)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- return m_client.mouseDragged(toAPI(pageOverlay), toAPI(event.position()), toAPI(event.button()), m_client.base.clientInfo);
</del><ins>+ return m_client.mouseDragged(toAPI(&pageOverlay), toAPI(event.position()), toAPI(event.button()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> default:
</span><span class="lines">@@ -125,18 +132,43 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual WKTypeRef copyAccessibilityAttributeValue(PageOverlay* pageOverlay, WKStringRef attribute, WKTypeRef parameter)
</del><ins>+ virtual bool copyAccessibilityAttributeStringValueForPoint(WebPageOverlay& pageOverlay, String attribute, WebCore::FloatPoint parameter, String& value) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_accessibilityClient.client().copyAccessibilityAttributeValue)
</span><del>- return 0;
- return m_accessibilityClient.client().copyAccessibilityAttributeValue(toAPI(pageOverlay), attribute, parameter, m_accessibilityClient.client().base.clientInfo);
</del><ins>+ return false;
+ auto wkType = m_accessibilityClient.client().copyAccessibilityAttributeValue(toAPI(&pageOverlay), toCopiedAPI(attribute), WKPointCreate(WKPointMake(parameter.x(), parameter.y())), m_accessibilityClient.client().base.clientInfo);
+ if (toImpl(wkType)->type() != API::String::APIType)
+ return false;
+ value = toWTFString(static_cast<WKStringRef>(wkType));
+ return true;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual WKArrayRef copyAccessibilityAttributeNames(PageOverlay* pageOverlay, bool paramerizedNames)
</del><ins>+ virtual bool copyAccessibilityAttributeBoolValueForPoint(WebPageOverlay& pageOverlay, String attribute, WebCore::FloatPoint parameter, bool& value) override
</ins><span class="cx"> {
</span><ins>+ if (!m_accessibilityClient.client().copyAccessibilityAttributeValue)
+ return false;
+ auto wkType = m_accessibilityClient.client().copyAccessibilityAttributeValue(toAPI(&pageOverlay), toCopiedAPI(attribute), WKPointCreate(WKPointMake(parameter.x(), parameter.y())), m_accessibilityClient.client().base.clientInfo);
+ if (toImpl(wkType)->type() != API::Boolean::APIType)
+ return false;
+ value = WKBooleanGetValue(static_cast<WKBooleanRef>(wkType));
+ return true;
+ }
+
+ virtual Vector<String> copyAccessibilityAttributeNames(WebPageOverlay& pageOverlay, bool paramerizedNames) override
+ {
+ Vector<String> names;
</ins><span class="cx"> if (!m_accessibilityClient.client().copyAccessibilityAttributeNames)
</span><del>- return 0;
- return m_accessibilityClient.client().copyAccessibilityAttributeNames(toAPI(pageOverlay), paramerizedNames, m_accessibilityClient.client().base.clientInfo);
</del><ins>+ return names;
+ auto wkNames = m_accessibilityClient.client().copyAccessibilityAttributeNames(toAPI(&pageOverlay), paramerizedNames, m_accessibilityClient.client().base.clientInfo);
+
+ size_t count = WKArrayGetSize(wkNames);
+ for (size_t k = 0; k < count; k++) {
+ WKTypeRef item = WKArrayGetItemAtIndex(wkNames, k);
+ if (toImpl(item)->type() == API::String::APIType)
+ names.append(toWTFString(static_cast<WKStringRef>(item)));
+ }
+
+ return names;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> API::Client<WKBundlePageOverlayAccessibilityClientBase> m_accessibilityClient;
</span><span class="lines">@@ -144,25 +176,25 @@
</span><span class="cx">
</span><span class="cx"> WKTypeID WKBundlePageOverlayGetTypeID()
</span><span class="cx"> {
</span><del>- return toAPI(PageOverlay::APIType);
</del><ins>+ return toAPI(WebPageOverlay::APIType);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WKBundlePageOverlayRef WKBundlePageOverlayCreate(WKBundlePageOverlayClientBase* wkClient)
</span><span class="cx"> {
</span><span class="cx"> if (wkClient && wkClient->version)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> auto clientImpl = std::make_unique<PageOverlayClientImpl>(wkClient);
</span><span class="cx">
</span><span class="cx"> // FIXME: Looks like this leaks the clientImpl.
</span><del>- return toAPI(PageOverlay::create(clientImpl.release()).leakRef());
</del><ins>+ return toAPI(WebPageOverlay::create(*clientImpl.release()).leakRef());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WKBundlePageOverlaySetAccessibilityClient(WKBundlePageOverlayRef bundlePageOverlayRef, WKBundlePageOverlayAccessibilityClientBase* client)
</span><span class="cx"> {
</span><span class="cx"> if (client && client->version)
</span><span class="cx"> return;
</span><del>- static_cast<PageOverlayClientImpl*>(toImpl(bundlePageOverlayRef)->client())->setAccessibilityClient(client);
</del><ins>+ static_cast<PageOverlayClientImpl&>(toImpl(bundlePageOverlayRef)->client()).setAccessibilityClient(client);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WKBundlePageOverlaySetNeedsDisplay(WKBundlePageOverlayRef bundlePageOverlayRef, WKRect rect)
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessInjectedBundleAPImacWKWebProcessPlugInBrowserContextControllermm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx"> #import <WebCore/Frame.h>
</span><span class="cx"> #import <WebCore/HTMLFormElement.h>
</span><span class="cx"> #import <WebCore/HTMLInputElement.h>
</span><ins>+#import <WebCore/MainFrame.h>
</ins><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> using namespace WebKit;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -806,7 +806,9 @@
</span><span class="cx">
</span><span class="cx"> GraphicsLayerFactory* WebChromeClient::graphicsLayerFactory() const
</span><span class="cx"> {
</span><del>- return m_page->drawingArea()->graphicsLayerFactory();
</del><ins>+ if (auto drawingArea = m_page->drawingArea())
+ return drawingArea->graphicsLayerFactory();
+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
</span><span class="lines">@@ -824,12 +826,10 @@
</span><span class="cx"> m_page->exitAcceleratedCompositingMode();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-GraphicsLayer* WebChromeClient::documentOverlayLayerForFrame(Frame& frame)
</del><ins>+void WebChromeClient::attachViewOverlayGraphicsLayer(Frame* frame, GraphicsLayer* graphicsLayer)
</ins><span class="cx"> {
</span><del>- if (&frame == &m_page->corePage()->mainFrame())
- return m_page->pageOverlayController().documentOverlayRootLayer();
-
- return nullptr;
</del><ins>+ if (auto drawingArea = m_page->drawingArea())
+ drawingArea->attachViewOverlayGraphicsLayer(frame, graphicsLayer);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebChromeClient::setNeedsOneShotDrawingSynchronization()
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebCoreSupportWebChromeClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -211,10 +211,10 @@
</span><span class="cx">
</span><span class="cx"> virtual WebCore::GraphicsLayerFactory* graphicsLayerFactory() const override;
</span><span class="cx"> virtual void attachRootGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override;
</span><ins>+ virtual void attachViewOverlayGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override;
</ins><span class="cx"> virtual void setNeedsOneShotDrawingSynchronization() override;
</span><span class="cx"> virtual void scheduleCompositingLayerFlush() override;
</span><span class="cx"> virtual bool adjustLayerFlushThrottling(WebCore::LayerFlushThrottleState::Flags) override;
</span><del>- virtual WebCore::GraphicsLayer* documentOverlayLayerForFrame(WebCore::Frame&) override;
</del><span class="cx">
</span><span class="cx"> #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
</span><span class="cx"> virtual PassRefPtr<WebCore::DisplayRefreshMonitor> createDisplayRefreshMonitor(PlatformDisplayID) const override;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebCoreSupportWebInspectorClientcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -31,7 +31,9 @@
</span><span class="cx"> #include "WebInspector.h"
</span><span class="cx"> #include "WebPage.h"
</span><span class="cx"> #include <WebCore/InspectorController.h>
</span><ins>+#include <WebCore/MainFrame.h>
</ins><span class="cx"> #include <WebCore/Page.h>
</span><ins>+#include <WebCore/PageOverlayController.h>
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> #include <WebCore/InspectorOverlay.h>
</span><span class="lines">@@ -75,9 +77,9 @@
</span><span class="cx"> {
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> if (!m_highlightOverlay) {
</span><del>- RefPtr<PageOverlay> highlightOverlay = PageOverlay::create(this);
</del><ins>+ RefPtr<PageOverlay> highlightOverlay = PageOverlay::create(*this);
</ins><span class="cx"> m_highlightOverlay = highlightOverlay.get();
</span><del>- m_page->installPageOverlay(highlightOverlay.release(), PageOverlay::FadeMode::Fade);
</del><ins>+ m_page->mainFrame()->pageOverlayController().installPageOverlay(highlightOverlay.release(), PageOverlay::FadeMode::Fade);
</ins><span class="cx"> m_highlightOverlay->setNeedsDisplay();
</span><span class="cx"> } else {
</span><span class="cx"> m_highlightOverlay->stopFadeOutAnimation();
</span><span class="lines">@@ -94,7 +96,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> if (m_highlightOverlay)
</span><del>- m_page->uninstallPageOverlay(m_highlightOverlay, PageOverlay::FadeMode::Fade);
</del><ins>+ m_page->mainFrame()->pageOverlayController().uninstallPageOverlay(m_highlightOverlay, PageOverlay::FadeMode::Fade);
</ins><span class="cx"> #else
</span><span class="cx"> m_page->hideInspectorHighlight();
</span><span class="cx"> #endif
</span><span class="lines">@@ -148,13 +150,13 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::pageOverlayDestroyed(PageOverlay*)
</del><ins>+void WebInspectorClient::pageOverlayDestroyed(PageOverlay&)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::willMoveToWebPage(PageOverlay*, WebPage* webPage)
</del><ins>+void WebInspectorClient::willMoveToPage(PageOverlay&, Page* page)
</ins><span class="cx"> {
</span><del>- if (webPage)
</del><ins>+ if (page)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // The page overlay is moving away from the web page, reset it.
</span><span class="lines">@@ -162,16 +164,16 @@
</span><span class="cx"> m_highlightOverlay = 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::didMoveToWebPage(PageOverlay*, WebPage*)
</del><ins>+void WebInspectorClient::didMoveToPage(PageOverlay&, Page*)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebInspectorClient::drawRect(PageOverlay*, WebCore::GraphicsContext& context, const WebCore::IntRect& /*dirtyRect*/)
</del><ins>+void WebInspectorClient::drawRect(PageOverlay&, WebCore::GraphicsContext& context, const WebCore::IntRect& /*dirtyRect*/)
</ins><span class="cx"> {
</span><span class="cx"> m_page->corePage()->inspectorController().drawHighlight(context);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool WebInspectorClient::mouseEvent(PageOverlay*, const WebMouseEvent&)
</del><ins>+bool WebInspectorClient::mouseEvent(PageOverlay&, const PlatformMouseEvent&)
</ins><span class="cx"> {
</span><span class="cx"> return false;
</span><span class="cx"> }
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebCoreSupportWebInspectorClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -28,21 +28,21 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">
</span><del>-#include "PageOverlay.h"
-
</del><span class="cx"> #include <WebCore/InspectorClient.h>
</span><span class="cx"> #include <WebCore/InspectorForwarding.h>
</span><ins>+#include <WebCore/PageOverlay.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> class GraphicsContext;
</span><span class="cx"> class IntRect;
</span><ins>+class PageOverlay;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> class WebPage;
</span><span class="cx">
</span><del>-class WebInspectorClient : public WebCore::InspectorClient, public WebCore::InspectorFrontendChannel, private PageOverlay::Client {
</del><ins>+class WebInspectorClient : public WebCore::InspectorClient, public WebCore::InspectorFrontendChannel, private WebCore::PageOverlay::Client {
</ins><span class="cx"> public:
</span><span class="cx"> WebInspectorClient(WebPage* page)
</span><span class="cx"> : m_page(page)
</span><span class="lines">@@ -73,14 +73,14 @@
</span><span class="cx"> virtual bool supportsFrameInstrumentation();
</span><span class="cx">
</span><span class="cx"> // PageOverlay::Client
</span><del>- virtual void pageOverlayDestroyed(PageOverlay*) override;
- virtual void willMoveToWebPage(PageOverlay*, WebPage*) override;
- virtual void didMoveToWebPage(PageOverlay*, WebPage*) override;
- virtual void drawRect(PageOverlay*, WebCore::GraphicsContext&, const WebCore::IntRect&) override;
- virtual bool mouseEvent(PageOverlay*, const WebMouseEvent&) override;
</del><ins>+ virtual void pageOverlayDestroyed(WebCore::PageOverlay&) override;
+ virtual void willMoveToPage(WebCore::PageOverlay&, WebCore::Page*) override;
+ virtual void didMoveToPage(WebCore::PageOverlay&, WebCore::Page*) override;
+ virtual void drawRect(WebCore::PageOverlay&, WebCore::GraphicsContext&, const WebCore::IntRect&) override;
+ virtual bool mouseEvent(WebCore::PageOverlay&, const WebCore::PlatformMouseEvent&) override;
</ins><span class="cx">
</span><span class="cx"> WebPage* m_page;
</span><del>- PageOverlay* m_highlightOverlay;
</del><ins>+ WebCore::PageOverlay* m_highlightOverlay;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebCoreSupportmacWebEditorClientMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -44,6 +44,7 @@
</span><span class="cx"> #import <WebCore/FocusController.h>
</span><span class="cx"> #import <WebCore/Frame.h>
</span><span class="cx"> #import <WebCore/KeyboardEvent.h>
</span><ins>+#import <WebCore/MainFrame.h>
</ins><span class="cx"> #import <WebCore/NotImplemented.h>
</span><span class="cx"> #import <WebCore/Page.h>
</span><span class="cx"> #import <WebCore/WebCoreNSURLExtras.h>
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageDrawingAreah"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -44,6 +44,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> class DisplayRefreshMonitor;
</span><ins>+class Frame;
</ins><span class="cx"> class FrameView;
</span><span class="cx"> class GraphicsLayer;
</span><span class="cx"> class GraphicsLayerFactory;
</span><span class="lines">@@ -120,6 +121,8 @@
</span><span class="cx">
</span><span class="cx"> virtual bool adjustLayerFlushThrottling(WebCore::LayerFlushThrottleState::Flags) { return false; }
</span><span class="cx">
</span><ins>+ virtual void attachViewOverlayGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) { }
+
</ins><span class="cx"> protected:
</span><span class="cx"> DrawingArea(DrawingAreaType, WebPage&);
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageFindControllercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/FindController.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/FindController.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/FindController.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -40,6 +40,8 @@
</span><span class="cx"> #include <WebCore/GraphicsContext.h>
</span><span class="cx"> #include <WebCore/MainFrame.h>
</span><span class="cx"> #include <WebCore/Page.h>
</span><ins>+#include <WebCore/PageOverlayController.h>
+#include <WebCore/PlatformMouseEvent.h>
</ins><span class="cx"> #include <WebCore/PluginDocument.h>
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -63,7 +65,7 @@
</span><span class="cx">
</span><span class="cx"> FindController::FindController(WebPage* webPage)
</span><span class="cx"> : m_webPage(webPage)
</span><del>- , m_findPageOverlay(0)
</del><ins>+ , m_findPageOverlay(nullptr)
</ins><span class="cx"> , m_isShowingFindIndicator(false)
</span><span class="cx"> , m_foundStringMatchIndex(-1)
</span><span class="cx"> {
</span><span class="lines">@@ -182,12 +184,12 @@
</span><span class="cx">
</span><span class="cx"> if (!shouldShowOverlay) {
</span><span class="cx"> if (m_findPageOverlay)
</span><del>- m_webPage->uninstallPageOverlay(m_findPageOverlay, PageOverlay::FadeMode::Fade);
</del><ins>+ m_webPage->mainFrame()->pageOverlayController().uninstallPageOverlay(m_findPageOverlay, PageOverlay::FadeMode::Fade);
</ins><span class="cx"> } else {
</span><span class="cx"> if (!m_findPageOverlay) {
</span><del>- RefPtr<PageOverlay> findPageOverlay = PageOverlay::create(this);
</del><ins>+ RefPtr<PageOverlay> findPageOverlay = PageOverlay::create(*this);
</ins><span class="cx"> m_findPageOverlay = findPageOverlay.get();
</span><del>- m_webPage->installPageOverlay(findPageOverlay.release(), PageOverlay::FadeMode::Fade);
</del><ins>+ m_webPage->mainFrame()->pageOverlayController().installPageOverlay(findPageOverlay.release(), PageOverlay::FadeMode::Fade);
</ins><span class="cx"> }
</span><span class="cx"> m_findPageOverlay->setNeedsDisplay();
</span><span class="cx"> }
</span><span class="lines">@@ -330,7 +332,7 @@
</span><span class="cx"> {
</span><span class="cx"> m_findMatches.clear();
</span><span class="cx"> if (m_findPageOverlay)
</span><del>- m_webPage->uninstallPageOverlay(m_findPageOverlay, PageOverlay::FadeMode::Fade);
</del><ins>+ m_webPage->mainFrame()->pageOverlayController().uninstallPageOverlay(m_findPageOverlay, PageOverlay::FadeMode::Fade);
</ins><span class="cx">
</span><span class="cx"> PluginView* pluginView = pluginViewForFrame(m_webPage->mainFrame());
</span><span class="cx">
</span><span class="lines">@@ -439,20 +441,20 @@
</span><span class="cx"> return rects;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void FindController::pageOverlayDestroyed(PageOverlay*)
</del><ins>+void FindController::pageOverlayDestroyed(PageOverlay&)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void FindController::willMoveToWebPage(PageOverlay*, WebPage* webPage)
</del><ins>+void FindController::willMoveToPage(PageOverlay&, Page* page)
</ins><span class="cx"> {
</span><del>- if (webPage)
</del><ins>+ if (page)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> ASSERT(m_findPageOverlay);
</span><span class="cx"> m_findPageOverlay = 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void FindController::didMoveToWebPage(PageOverlay*, WebPage*)
</del><ins>+void FindController::didMoveToPage(PageOverlay&, Page*)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -468,7 +470,7 @@
</span><span class="cx"> const float shadowColorAlpha = 0.5;
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void FindController::drawRect(PageOverlay*, GraphicsContext& graphicsContext, const IntRect& dirtyRect)
</del><ins>+void FindController::drawRect(PageOverlay&, GraphicsContext& graphicsContext, const IntRect& dirtyRect)
</ins><span class="cx"> {
</span><span class="cx"> Color overlayBackgroundColor(0.1f, 0.1f, 0.1f, 0.25f);
</span><span class="cx">
</span><span class="lines">@@ -506,9 +508,9 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool FindController::mouseEvent(PageOverlay*, const WebMouseEvent& mouseEvent)
</del><ins>+bool FindController::mouseEvent(PageOverlay&, const PlatformMouseEvent& mouseEvent)
</ins><span class="cx"> {
</span><del>- if (mouseEvent.type() == WebEvent::MouseDown)
</del><ins>+ if (mouseEvent.type() == PlatformEvent::MousePressed)
</ins><span class="cx"> hideFindUI();
</span><span class="cx">
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageFindControllerh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/FindController.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/FindController.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/FindController.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -26,10 +26,10 @@
</span><span class="cx"> #ifndef FindController_h
</span><span class="cx"> #define FindController_h
</span><span class="cx">
</span><del>-#include "PageOverlay.h"
</del><span class="cx"> #include "ShareableBitmap.h"
</span><span class="cx"> #include "WebFindOptions.h"
</span><span class="cx"> #include <WebCore/IntRect.h>
</span><ins>+#include <WebCore/PageOverlay.h>
</ins><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="lines">@@ -45,10 +45,9 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class PageOverlay;
</del><span class="cx"> class WebPage;
</span><span class="cx">
</span><del>-class FindController : private PageOverlay::Client {
</del><ins>+class FindController : private WebCore::PageOverlay::Client {
</ins><span class="cx"> WTF_MAKE_NONCOPYABLE(FindController);
</span><span class="cx">
</span><span class="cx"> public:
</span><span class="lines">@@ -71,11 +70,11 @@
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> // PageOverlay::Client.
</span><del>- virtual void pageOverlayDestroyed(PageOverlay*);
- virtual void willMoveToWebPage(PageOverlay*, WebPage*);
- virtual void didMoveToWebPage(PageOverlay*, WebPage*);
- virtual bool mouseEvent(PageOverlay*, const WebMouseEvent&);
- virtual void drawRect(PageOverlay*, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect);
</del><ins>+ virtual void pageOverlayDestroyed(WebCore::PageOverlay&);
+ virtual void willMoveToPage(WebCore::PageOverlay&, WebCore::Page*);
+ virtual void didMoveToPage(WebCore::PageOverlay&, WebCore::Page*);
+ virtual bool mouseEvent(WebCore::PageOverlay&, const WebCore::PlatformMouseEvent&);
+ virtual void drawRect(WebCore::PageOverlay&, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect);
</ins><span class="cx">
</span><span class="cx"> Vector<WebCore::IntRect> rectsForTextMatches();
</span><span class="cx"> bool getFindIndicatorBitmapAndRect(WebCore::Frame&, ShareableBitmap::Handle&, WebCore::IntRect& selectionRect);
</span><span class="lines">@@ -88,7 +87,7 @@
</span><span class="cx"> void didHideFindIndicator();
</span><span class="cx">
</span><span class="cx"> WebPage* m_webPage;
</span><del>- PageOverlay* m_findPageOverlay;
</del><ins>+ WebCore::PageOverlay* m_findPageOverlay;
</ins><span class="cx">
</span><span class="cx"> // Whether the UI process is showing the find indicator. Note that this can be true even if
</span><span class="cx"> // the find indicator isn't showing, but it will never be false when it is showing.
</span><span class="lines">@@ -99,7 +98,7 @@
</span><span class="cx"> int m_foundStringMatchIndex;
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>- RefPtr<PageOverlay> m_findIndicatorOverlay;
</del><ins>+ RefPtr<WebCore::PageOverlay> m_findIndicatorOverlay;
</ins><span class="cx"> std::unique_ptr<FindIndicatorOverlayClientIOS> m_findIndicatorOverlayClient;
</span><span class="cx"> #endif
</span><span class="cx"> };
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageLayerTreeHosth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -47,7 +47,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class PageOverlay;
</del><span class="cx"> class UpdateInfo;
</span><span class="cx"> class WebPage;
</span><span class="cx">
</span><span class="lines">@@ -72,11 +71,6 @@
</span><span class="cx"> virtual void deviceOrPageScaleFactorChanged() = 0;
</span><span class="cx"> virtual void pageBackgroundTransparencyChanged() = 0;
</span><span class="cx">
</span><del>- virtual void didInstallPageOverlay(PageOverlay*) { }
- virtual void didUninstallPageOverlay(PageOverlay*) { }
- virtual void setPageOverlayNeedsDisplay(PageOverlay*, const WebCore::IntRect&) { }
- virtual void setPageOverlayOpacity(PageOverlay*, float) { }
-
</del><span class="cx"> virtual void pauseRendering() { }
</span><span class="cx"> virtual void resumeRendering() { }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPagePageOverlaycpp"></a>
<div class="delfile"><h4>Deleted: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlay.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -1,251 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "PageOverlay.h"
-
-#include "WebPage.h"
-#include "WebProcess.h"
-#include <WebCore/FrameView.h>
-#include <WebCore/GraphicsContext.h>
-#include <WebCore/MainFrame.h>
-#include <WebCore/Page.h>
-#include <WebCore/ScrollbarTheme.h>
-#include <wtf/CurrentTime.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-static const double fadeAnimationDuration = 0.2;
-static const double fadeAnimationFrameRate = 30;
-
-PassRefPtr<PageOverlay> PageOverlay::create(Client* client, OverlayType overlayType)
-{
- return adoptRef(new PageOverlay(client, overlayType));
-}
-
-PageOverlay::PageOverlay(Client* client, OverlayType overlayType)
- : m_client(client)
- , m_webPage(nullptr)
- , m_fadeAnimationTimer(RunLoop::main(), this, &PageOverlay::fadeAnimationTimerFired)
- , m_fadeAnimationStartTime(0)
- , m_fadeAnimationDuration(fadeAnimationDuration)
- , m_fadeAnimationType(NoAnimation)
- , m_fractionFadedIn(1)
- , m_overlayType(overlayType)
- , m_backgroundColor(Color::transparent)
-{
-}
-
-PageOverlay::~PageOverlay()
-{
-}
-
-IntRect PageOverlay::bounds() const
-{
- if (!m_overrideFrame.isEmpty())
- return IntRect(IntPoint(), m_overrideFrame.size());
-
- FrameView* frameView = m_webPage->mainFrameView();
-
- switch (m_overlayType) {
- case OverlayType::View: {
- int width = frameView->width();
- int height = frameView->height();
-
- if (!ScrollbarTheme::theme()->usesOverlayScrollbars()) {
- if (frameView->verticalScrollbar())
- width -= frameView->verticalScrollbar()->width();
- if (frameView->horizontalScrollbar())
- height -= frameView->horizontalScrollbar()->height();
- }
- return IntRect(0, 0, width, height);
- }
- case OverlayType::Document:
- return IntRect(IntPoint(), frameView->contentsSize());
- };
-
- ASSERT_NOT_REACHED();
- return IntRect(IntPoint(), frameView->contentsSize());
-}
-
-IntRect PageOverlay::frame() const
-{
- if (!m_overrideFrame.isEmpty())
- return m_overrideFrame;
-
- return bounds();
-}
-
-void PageOverlay::setFrame(IntRect frame)
-{
- if (m_overrideFrame == frame)
- return;
-
- m_overrideFrame = frame;
-
- if (m_webPage)
- m_webPage->pageOverlayController().didChangeOverlayFrame(*this);
-}
-
-void PageOverlay::setBackgroundColor(RGBA32 backgroundColor)
-{
- if (m_backgroundColor == backgroundColor)
- return;
-
- m_backgroundColor = backgroundColor;
-
- if (m_webPage)
- m_webPage->pageOverlayController().didChangeOverlayBackgroundColor(*this);
-}
-
-void PageOverlay::setPage(WebPage* webPage)
-{
- m_client->willMoveToWebPage(this, webPage);
- m_webPage = webPage;
- m_client->didMoveToWebPage(this, webPage);
-
- m_fadeAnimationTimer.stop();
-}
-
-void PageOverlay::setNeedsDisplay(const IntRect& dirtyRect)
-{
- if (!m_webPage)
- return;
-
- m_webPage->pageOverlayController().setPageOverlayOpacity(*this, m_fractionFadedIn);
- m_webPage->pageOverlayController().setPageOverlayNeedsDisplay(*this, dirtyRect);
-}
-
-void PageOverlay::setNeedsDisplay()
-{
- setNeedsDisplay(bounds());
-}
-
-void PageOverlay::drawRect(GraphicsContext& graphicsContext, const IntRect& dirtyRect)
-{
- // If the dirty rect is outside the bounds, ignore it.
- IntRect paintRect = intersection(dirtyRect, bounds());
- if (paintRect.isEmpty())
- return;
-
- GraphicsContextStateSaver stateSaver(graphicsContext);
- m_client->drawRect(this, graphicsContext, paintRect);
-}
-
-bool PageOverlay::mouseEvent(const WebMouseEvent& mouseEvent)
-{
- IntPoint mousePositionInOverlayCoordinates(mouseEvent.position());
-
- if (m_overlayType == PageOverlay::OverlayType::Document)
- mousePositionInOverlayCoordinates = m_webPage->corePage()->mainFrame().view()->rootViewToContents(mousePositionInOverlayCoordinates);
-
- // Ignore events outside the bounds.
- if (!bounds().contains(mousePositionInOverlayCoordinates))
- return false;
-
- return m_client->mouseEvent(this, mouseEvent);
-}
-
-void PageOverlay::didScrollFrame(Frame* frame)
-{
- m_client->didScrollFrame(this, frame);
-}
-
-WKTypeRef PageOverlay::copyAccessibilityAttributeValue(WKStringRef attribute, WKTypeRef parameter)
-{
- return m_client->copyAccessibilityAttributeValue(this, attribute, parameter);
-}
-
-WKArrayRef PageOverlay::copyAccessibilityAttributeNames(bool parameterizedNames)
-{
- return m_client->copyAccessibilityAttributeNames(this, parameterizedNames);
-}
-
-void PageOverlay::startFadeInAnimation()
-{
- m_fractionFadedIn = 0;
- m_fadeAnimationType = FadeInAnimation;
-
- startFadeAnimation();
-}
-
-void PageOverlay::startFadeOutAnimation()
-{
- m_fractionFadedIn = 1;
- m_fadeAnimationType = FadeOutAnimation;
-
- startFadeAnimation();
-}
-
-void PageOverlay::stopFadeOutAnimation()
-{
- m_fractionFadedIn = 1.0;
- m_fadeAnimationTimer.stop();
-}
-
-void PageOverlay::startFadeAnimation()
-{
- m_fadeAnimationStartTime = currentTime();
- m_fadeAnimationTimer.startRepeating(1 / fadeAnimationFrameRate);
-}
-
-void PageOverlay::fadeAnimationTimerFired()
-{
- float animationProgress = (currentTime() - m_fadeAnimationStartTime) / m_fadeAnimationDuration;
-
- if (animationProgress >= 1.0)
- animationProgress = 1.0;
-
- double sine = sin(piOverTwoFloat * animationProgress);
- float fadeAnimationValue = sine * sine;
-
- m_fractionFadedIn = (m_fadeAnimationType == FadeInAnimation) ? fadeAnimationValue : 1 - fadeAnimationValue;
- m_webPage->pageOverlayController().setPageOverlayOpacity(*this, m_fractionFadedIn);
-
- if (animationProgress == 1.0) {
- m_fadeAnimationTimer.stop();
-
- bool wasFadingOut = m_fadeAnimationType == FadeOutAnimation;
- m_fadeAnimationType = NoAnimation;
-
- // If this was a fade out, go ahead and uninstall the page overlay.
- if (wasFadingOut)
- m_webPage->uninstallPageOverlay(this, PageOverlay::FadeMode::DoNotFade);
- }
-}
-
-void PageOverlay::clear()
-{
- m_webPage->pageOverlayController().clearPageOverlay(*this);
-}
-
-WebCore::GraphicsLayer* PageOverlay::layer()
-{
- return m_webPage->pageOverlayController().layerForOverlay(*this);
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPagePageOverlayh"></a>
<div class="delfile"><h4>Deleted: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlay.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlay.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlay.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -1,137 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef PageOverlay_h
-#define PageOverlay_h
-
-#include "APIObject.h"
-#include "WKBase.h"
-#include <WebCore/Color.h>
-#include <WebCore/IntRect.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RunLoop.h>
-
-namespace WebCore {
-class Frame;
-class GraphicsContext;
-class GraphicsLayer;
-}
-
-namespace WebKit {
-
-class WebFrame;
-class WebMouseEvent;
-class WebPage;
-
-class PageOverlay : public API::ObjectImpl<API::Object::Type::BundlePageOverlay> {
-public:
- class Client {
- protected:
- virtual ~Client() { }
-
- public:
- virtual void pageOverlayDestroyed(PageOverlay*) = 0;
- virtual void willMoveToWebPage(PageOverlay*, WebPage*) = 0;
- virtual void didMoveToWebPage(PageOverlay*, WebPage*) = 0;
- virtual void drawRect(PageOverlay*, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect) = 0;
- virtual bool mouseEvent(PageOverlay*, const WebMouseEvent&) = 0;
- virtual void didScrollFrame(PageOverlay*, WebCore::Frame*) { }
-
- virtual WKTypeRef copyAccessibilityAttributeValue(PageOverlay*, WKStringRef /* attribute */, WKTypeRef /* parameter */) { return 0; }
- virtual WKArrayRef copyAccessibilityAttributeNames(PageOverlay*, bool /* parameterizedNames */) { return 0; }
- };
-
- enum class OverlayType {
- View, // Fixed to the view size; does not scale or scroll with the document, repaints on scroll.
- Document, // Scales and scrolls with the document.
- };
-
- static PassRefPtr<PageOverlay> create(Client*, OverlayType = OverlayType::View);
- virtual ~PageOverlay();
-
- void setPage(WebPage*);
- void setNeedsDisplay(const WebCore::IntRect& dirtyRect);
- void setNeedsDisplay();
-
- void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect);
- bool mouseEvent(const WebMouseEvent&);
- void didScrollFrame(WebCore::Frame*);
-
- WKTypeRef copyAccessibilityAttributeValue(WKStringRef attribute, WKTypeRef parameter);
- WKArrayRef copyAccessibilityAttributeNames(bool parameterizedNames);
-
- void startFadeInAnimation();
- void startFadeOutAnimation();
- void stopFadeOutAnimation();
-
- void clear();
-
- Client* client() const { return m_client; }
-
- enum class FadeMode { DoNotFade, Fade };
-
- OverlayType overlayType() { return m_overlayType; }
-
- WebCore::IntRect bounds() const;
- WebCore::IntRect frame() const;
- void setFrame(WebCore::IntRect);
-
- WebCore::RGBA32 backgroundColor() const { return m_backgroundColor; }
- void setBackgroundColor(WebCore::RGBA32);
-
- WebCore::GraphicsLayer* layer();
-
-protected:
- explicit PageOverlay(Client*, OverlayType);
-
-private:
- void startFadeAnimation();
- void fadeAnimationTimerFired();
-
- Client* m_client;
- WebPage* m_webPage;
-
- RunLoop::Timer<PageOverlay> m_fadeAnimationTimer;
- double m_fadeAnimationStartTime;
- double m_fadeAnimationDuration;
-
- enum FadeAnimationType {
- NoAnimation,
- FadeInAnimation,
- FadeOutAnimation,
- };
-
- FadeAnimationType m_fadeAnimationType;
- float m_fractionFadedIn;
-
- OverlayType m_overlayType;
- WebCore::IntRect m_overrideFrame;
-
- WebCore::RGBA32 m_backgroundColor;
-};
-
-} // namespace WebKit
-
-#endif // PageOverlay_h
</del></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPagePageOverlayControllercpp"></a>
<div class="delfile"><h4>Deleted: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlayController.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -1,314 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "PageOverlayController.h"
-
-#include "DrawingArea.h"
-#include "PageOverlay.h"
-#include "WebPage.h"
-#include <WebCore/Frame.h>
-#include <WebCore/FrameView.h>
-#include <WebCore/GraphicsContext.h>
-#include <WebCore/GraphicsLayer.h>
-#include <WebCore/MainFrame.h>
-#include <WebCore/ScrollingCoordinator.h>
-#include <WebCore/Settings.h>
-#include <WebCore/TiledBacking.h>
-
-using namespace WebCore;
-
-namespace WebKit {
-
-PageOverlayController::PageOverlayController(WebPage& webPage)
- : m_webPage(webPage)
-{
-}
-
-void PageOverlayController::initialize()
-{
- ASSERT(!m_documentOverlayRootLayer);
- ASSERT(!m_viewOverlayRootLayer);
-
- m_documentOverlayRootLayer = GraphicsLayer::create(m_webPage.drawingArea()->graphicsLayerFactory(), *this);
- m_viewOverlayRootLayer = GraphicsLayer::create(m_webPage.drawingArea()->graphicsLayerFactory(), *this);
-#ifndef NDEBUG
- m_documentOverlayRootLayer->setName("Page Overlay container (document-relative)");
- m_viewOverlayRootLayer->setName("Page Overlay container (view-relative)");
-#endif
-}
-
-static void updateOverlayGeometry(PageOverlay& overlay, GraphicsLayer& graphicsLayer)
-{
- IntRect overlayFrame = overlay.frame();
-
- if (overlayFrame.location() == graphicsLayer.position() && overlayFrame.size() == graphicsLayer.size())
- return;
-
- graphicsLayer.setPosition(overlayFrame.location());
- graphicsLayer.setSize(overlayFrame.size());
-}
-
-void PageOverlayController::installPageOverlay(PassRefPtr<PageOverlay> pageOverlay, PageOverlay::FadeMode fadeMode)
-{
- ASSERT(m_documentOverlayRootLayer);
- ASSERT(m_viewOverlayRootLayer);
-
- RefPtr<PageOverlay> overlay = pageOverlay;
-
- if (m_pageOverlays.contains(overlay))
- return;
-
- m_pageOverlays.append(overlay);
- overlay->setPage(&m_webPage);
-
- if (fadeMode == PageOverlay::FadeMode::Fade)
- overlay->startFadeInAnimation();
-
- std::unique_ptr<GraphicsLayer> layer = GraphicsLayer::create(m_webPage.drawingArea()->graphicsLayerFactory(), *this);
- layer->setAnchorPoint(FloatPoint3D());
- layer->setBackgroundColor(overlay->backgroundColor());
- updateOverlayGeometry(*overlay, *layer);
-#ifndef NDEBUG
- layer->setName("Page Overlay content");
-#endif
-
- updateSettingsForLayer(*layer);
-
- switch (overlay->overlayType()) {
- case PageOverlay::OverlayType::View:
- m_viewOverlayRootLayer->addChild(layer.get());
- break;
- case PageOverlay::OverlayType::Document:
- m_documentOverlayRootLayer->addChild(layer.get());
- break;
- }
-
- m_overlayGraphicsLayers.set(overlay.get(), WTF::move(layer));
-
- updateForceSynchronousScrollLayerPositionUpdates();
-}
-
-void PageOverlayController::uninstallPageOverlay(PageOverlay* overlay, PageOverlay::FadeMode fadeMode)
-{
- if (fadeMode == PageOverlay::FadeMode::Fade) {
- overlay->startFadeOutAnimation();
- return;
- }
-
- overlay->setPage(nullptr);
-
- m_overlayGraphicsLayers.take(overlay)->removeFromParent();
-
- size_t overlayIndex = m_pageOverlays.find(overlay);
- ASSERT(overlayIndex != notFound);
- m_pageOverlays.remove(overlayIndex);
-
- updateForceSynchronousScrollLayerPositionUpdates();
-}
-
-void PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates()
-{
-#if ENABLE(ASYNC_SCROLLING)
- bool forceSynchronousScrollLayerPositionUpdates = false;
-
- for (auto& overlay : m_pageOverlays) {
- if (overlay->overlayType() == PageOverlay::OverlayType::View)
- forceSynchronousScrollLayerPositionUpdates = true;
- }
-
- if (Page* page = m_webPage.corePage()) {
- if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
- scrollingCoordinator->setForceSynchronousScrollLayerPositionUpdates(forceSynchronousScrollLayerPositionUpdates);
- }
-#endif
-}
-
-void PageOverlayController::setPageOverlayNeedsDisplay(PageOverlay& overlay, const WebCore::IntRect& dirtyRect)
-{
- ASSERT(m_pageOverlays.contains(&overlay));
- GraphicsLayer& graphicsLayer = *m_overlayGraphicsLayers.get(&overlay);
-
- if (!graphicsLayer.drawsContent()) {
- graphicsLayer.setDrawsContent(true);
- updateOverlayGeometry(overlay, graphicsLayer);
- }
-
- graphicsLayer.setNeedsDisplayInRect(dirtyRect);
-}
-
-void PageOverlayController::setPageOverlayOpacity(PageOverlay& overlay, float opacity)
-{
- ASSERT(m_pageOverlays.contains(&overlay));
- m_overlayGraphicsLayers.get(&overlay)->setOpacity(opacity);
-}
-
-void PageOverlayController::clearPageOverlay(PageOverlay& overlay)
-{
- ASSERT(m_pageOverlays.contains(&overlay));
- m_overlayGraphicsLayers.get(&overlay)->setDrawsContent(false);
-}
-
-GraphicsLayer* PageOverlayController::layerForOverlay(PageOverlay& overlay) const
-{
- ASSERT(m_pageOverlays.contains(&overlay));
- return m_overlayGraphicsLayers.get(&overlay);
-}
-
-void PageOverlayController::didChangeViewSize()
-{
- for (auto& overlayAndLayer : m_overlayGraphicsLayers) {
- if (overlayAndLayer.key->overlayType() == PageOverlay::OverlayType::View)
- updateOverlayGeometry(*overlayAndLayer.key, *overlayAndLayer.value);
- }
-}
-
-void PageOverlayController::didChangeDocumentSize()
-{
- for (auto& overlayAndLayer : m_overlayGraphicsLayers) {
- if (overlayAndLayer.key->overlayType() == PageOverlay::OverlayType::Document)
- updateOverlayGeometry(*overlayAndLayer.key, *overlayAndLayer.value);
- }
-}
-
-void PageOverlayController::didChangePreferences()
-{
- for (auto& graphicsLayer : m_overlayGraphicsLayers.values())
- updateSettingsForLayer(*graphicsLayer);
-}
-
-void PageOverlayController::didChangeDeviceScaleFactor()
-{
- m_documentOverlayRootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
- m_viewOverlayRootLayer->noteDeviceOrPageScaleFactorChangedIncludingDescendants();
-
- for (auto& graphicsLayer : m_overlayGraphicsLayers.values())
- graphicsLayer->setNeedsDisplay();
-}
-
-void PageOverlayController::didChangeExposedRect()
-{
- m_webPage.drawingArea()->scheduleCompositingLayerFlush();
-}
-
-void PageOverlayController::didScrollFrame(Frame* frame)
-{
- for (auto& overlayAndLayer : m_overlayGraphicsLayers) {
- if (overlayAndLayer.key->overlayType() == PageOverlay::OverlayType::View || !frame->isMainFrame())
- overlayAndLayer.value->setNeedsDisplay();
- overlayAndLayer.key->didScrollFrame(frame);
- }
-}
-
-void PageOverlayController::flushPageOverlayLayers(FloatRect visibleRect)
-{
- m_viewOverlayRootLayer->flushCompositingState(visibleRect);
-}
-
-void PageOverlayController::updateSettingsForLayer(GraphicsLayer& layer)
-{
- Settings& settings = m_webPage.corePage()->settings();
- layer.setAcceleratesDrawing(settings.acceleratedDrawingEnabled());
- layer.setShowDebugBorder(settings.showDebugBorders());
- layer.setShowRepaintCounter(settings.showRepaintCounter());
-}
-
-bool PageOverlayController::handleMouseEvent(const WebMouseEvent& mouseEvent)
-{
- if (!m_pageOverlays.size())
- return false;
-
- for (auto it = m_pageOverlays.rbegin(), end = m_pageOverlays.rend(); it != end; ++it) {
- if ((*it)->mouseEvent(mouseEvent))
- return true;
- }
-
- return false;
-}
-
-WKTypeRef PageOverlayController::copyAccessibilityAttributeValue(WKStringRef attribute, WKTypeRef parameter)
-{
- if (!m_pageOverlays.size())
- return nullptr;
-
- for (auto it = m_pageOverlays.rbegin(), end = m_pageOverlays.rend(); it != end; ++it) {
- if (WKTypeRef value = (*it)->copyAccessibilityAttributeValue(attribute, parameter))
- return value;
- }
-
- return nullptr;
-}
-
-WKArrayRef PageOverlayController::copyAccessibilityAttributesNames(bool parameterizedNames)
-{
- if (!m_pageOverlays.size())
- return nullptr;
-
- for (auto it = m_pageOverlays.rbegin(), end = m_pageOverlays.rend(); it != end; ++it) {
- if (WKArrayRef value = (*it)->copyAccessibilityAttributeNames(parameterizedNames))
- return value;
- }
-
- return nullptr;
-}
-
-void PageOverlayController::paintContents(const WebCore::GraphicsLayer* graphicsLayer, WebCore::GraphicsContext& graphicsContext, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& clipRect)
-{
- for (auto it = m_overlayGraphicsLayers.begin(), end = m_overlayGraphicsLayers.end(); it != end; ++it) {
- if (it->value.get() != graphicsLayer)
- continue;
-
- GraphicsContextStateSaver stateSaver(graphicsContext);
- graphicsContext.clip(clipRect);
- it->key->drawRect(graphicsContext, enclosingIntRect(clipRect));
-
- return;
- }
-}
-
-float PageOverlayController::deviceScaleFactor() const
-{
- return m_webPage.corePage()->deviceScaleFactor();
-}
-
-void PageOverlayController::notifyFlushRequired(const WebCore::GraphicsLayer*)
-{
- if (m_webPage.drawingArea())
- m_webPage.drawingArea()->scheduleCompositingLayerFlush();
-}
-
-void PageOverlayController::didChangeOverlayFrame(PageOverlay& overlay)
-{
- ASSERT(m_pageOverlays.contains(&overlay));
- updateOverlayGeometry(overlay, *m_overlayGraphicsLayers.get(&overlay));
-}
-
-void PageOverlayController::didChangeOverlayBackgroundColor(PageOverlay& overlay)
-{
- ASSERT(m_pageOverlays.contains(&overlay));
- m_overlayGraphicsLayers.get(&overlay)->setBackgroundColor(overlay.backgroundColor());
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPagePageOverlayControllerh"></a>
<div class="delfile"><h4>Deleted: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlayController.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlayController.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/PageOverlayController.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -1,101 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef PageOverlayController_h
-#define PageOverlayController_h
-
-#include "PageOverlay.h"
-#include "WKBase.h"
-#include <WebCore/GraphicsLayerClient.h>
-#include <wtf/HashMap.h>
-#include <wtf/RefPtr.h>
-#include <wtf/Vector.h>
-
-namespace WebCore {
-class Frame;
-}
-
-namespace WebKit {
-
-class WebMouseEvent;
-class WebPage;
-
-class PageOverlayController : public WebCore::GraphicsLayerClient {
-public:
- PageOverlayController(WebPage&);
-
- void initialize();
-
- WebCore::GraphicsLayer* documentOverlayRootLayer() const { return m_documentOverlayRootLayer.get(); }
- WebCore::GraphicsLayer* viewOverlayRootLayer() const { return m_viewOverlayRootLayer.get(); }
-
- void installPageOverlay(PassRefPtr<PageOverlay>, PageOverlay::FadeMode);
- void uninstallPageOverlay(PageOverlay*, PageOverlay::FadeMode);
-
- void setPageOverlayNeedsDisplay(PageOverlay&, const WebCore::IntRect&);
- void setPageOverlayOpacity(PageOverlay&, float);
- void clearPageOverlay(PageOverlay&);
- WebCore::GraphicsLayer* layerForOverlay(PageOverlay&) const;
-
- void didChangeViewSize();
- void didChangeDocumentSize();
- void didChangePreferences();
- void didChangeDeviceScaleFactor();
- void didChangeExposedRect();
- void didScrollFrame(WebCore::Frame*);
-
- void didChangeOverlayFrame(PageOverlay&);
- void didChangeOverlayBackgroundColor(PageOverlay&);
-
- void flushPageOverlayLayers(WebCore::FloatRect);
-
- bool handleMouseEvent(const WebMouseEvent&);
-
- // FIXME: We shouldn't use API types here.
- WKTypeRef copyAccessibilityAttributeValue(WKStringRef attribute, WKTypeRef parameter);
- WKArrayRef copyAccessibilityAttributesNames(bool parameterizedNames);
-
-private:
- void updateSettingsForLayer(WebCore::GraphicsLayer&);
- void updateForceSynchronousScrollLayerPositionUpdates();
-
- // WebCore::GraphicsLayerClient
- virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double) override { }
- virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) override;
- virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& clipRect) override;
- virtual float deviceScaleFactor() const override;
- virtual void didCommitChangesForLayer(const WebCore::GraphicsLayer*) const override { }
- virtual bool shouldSkipLayerInDump(const WebCore::GraphicsLayer*) const override { return true; }
-
- std::unique_ptr<WebCore::GraphicsLayer> m_documentOverlayRootLayer;
- std::unique_ptr<WebCore::GraphicsLayer> m_viewOverlayRootLayer;
- HashMap<PageOverlay*, std::unique_ptr<WebCore::GraphicsLayer>> m_overlayGraphicsLayers;
- Vector<RefPtr<PageOverlay>> m_pageOverlays;
- WebPage& m_webPage;
-};
-
-} // namespace WebKit
-
-#endif // PageOverlayController_h
</del></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageServicesOverlayControllerh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -28,9 +28,9 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
</span><span class="cx">
</span><del>-#include "PageOverlay.h"
</del><span class="cx"> #include "WebFrame.h"
</span><span class="cx"> #include <WebCore/GraphicsLayerClient.h>
</span><ins>+#include <WebCore/PageOverlay.h>
</ins><span class="cx"> #include <WebCore/Range.h>
</span><span class="cx"> #include <WebCore/Timer.h>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="lines">@@ -39,7 +39,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> class LayoutRect;
</span><del>-
</del><span class="cx"> struct GapRects;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -47,7 +46,7 @@
</span><span class="cx">
</span><span class="cx"> class WebPage;
</span><span class="cx">
</span><del>-class ServicesOverlayController : private PageOverlay::Client {
</del><ins>+class ServicesOverlayController : private WebCore::PageOverlay::Client {
</ins><span class="cx"> public:
</span><span class="cx"> ServicesOverlayController(WebPage&);
</span><span class="cx"> ~ServicesOverlayController();
</span><span class="lines">@@ -99,12 +98,12 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> // PageOverlay::Client
</span><del>- virtual void pageOverlayDestroyed(PageOverlay*) override;
- virtual void willMoveToWebPage(PageOverlay*, WebPage*) override;
- virtual void didMoveToWebPage(PageOverlay*, WebPage*) override;
- virtual void drawRect(PageOverlay*, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect) override;
- virtual bool mouseEvent(PageOverlay*, const WebMouseEvent&) override;
- virtual void didScrollFrame(PageOverlay*, WebCore::Frame*) override;
</del><ins>+ virtual void pageOverlayDestroyed(WebCore::PageOverlay&) override;
+ virtual void willMoveToPage(WebCore::PageOverlay&, WebCore::Page*) override;
+ virtual void didMoveToPage(WebCore::PageOverlay&, WebCore::Page*) override;
+ virtual void drawRect(WebCore::PageOverlay&, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect) override;
+ virtual bool mouseEvent(WebCore::PageOverlay&, const WebCore::PlatformMouseEvent&) override;
+ virtual void didScrollFrame(WebCore::PageOverlay&, WebCore::Frame&) override;
</ins><span class="cx">
</span><span class="cx"> void createOverlayIfNeeded();
</span><span class="cx"> void handleClick(const WebCore::IntPoint&, Highlight&);
</span><span class="lines">@@ -140,7 +139,7 @@
</span><span class="cx"> WebPage& webPage() const { return m_webPage; }
</span><span class="cx">
</span><span class="cx"> WebPage& m_webPage;
</span><del>- PageOverlay* m_servicesOverlay;
</del><ins>+ WebCore::PageOverlay* m_servicesOverlay;
</ins><span class="cx">
</span><span class="cx"> RefPtr<Highlight> m_activeHighlight;
</span><span class="cx"> RefPtr<Highlight> m_nextActiveHighlight;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -324,7 +324,6 @@
</span><span class="cx"> #if ENABLE(WEBGL)
</span><span class="cx"> , m_systemWebGLPolicy(WebGLAllowCreation)
</span><span class="cx"> #endif
</span><del>- , m_pageOverlayController(*this)
</del><span class="cx"> {
</span><span class="cx"> ASSERT(m_pageID);
</span><span class="cx"> // FIXME: This is a non-ideal location for this Setting and
</span><span class="lines">@@ -363,7 +362,6 @@
</span><span class="cx">
</span><span class="cx"> m_drawingArea = DrawingArea::create(*this, parameters);
</span><span class="cx"> m_drawingArea->setPaintingEnabled(false);
</span><del>- m_pageOverlayController.initialize();
</del><span class="cx">
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="cx"> m_useAsyncScrolling = parameters.store.getBoolValueForKey(WebPreferencesKey::threadedScrollingEnabledKey());
</span><span class="lines">@@ -1202,8 +1200,6 @@
</span><span class="cx"> if (view->useFixedLayout())
</span><span class="cx"> sendViewportAttributesChanged();
</span><span class="cx"> #endif
</span><del>-
- m_pageOverlayController.didChangeViewSize();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if USE(TILED_BACKING_STORE)
</span><span class="lines">@@ -1429,8 +1425,6 @@
</span><span class="cx">
</span><span class="cx"> if (m_drawingArea->layerTreeHost())
</span><span class="cx"> m_drawingArea->layerTreeHost()->deviceOrPageScaleFactorChanged();
</span><del>-
- m_pageOverlayController.didChangeDeviceScaleFactor();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> float WebPage::deviceScaleFactor() const
</span><span class="lines">@@ -1553,16 +1547,6 @@
</span><span class="cx"> injectedBundle->didReceiveMessageToPage(this, messageName, messageBody.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPage::installPageOverlay(PassRefPtr<PageOverlay> pageOverlay, PageOverlay::FadeMode fadeMode)
-{
- m_pageOverlayController.installPageOverlay(pageOverlay, fadeMode);
-}
-
-void WebPage::uninstallPageOverlay(PageOverlay* pageOverlay, PageOverlay::FadeMode fadeMode)
-{
- m_pageOverlayController.uninstallPageOverlay(pageOverlay, fadeMode);
-}
-
</del><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> void WebPage::setHeaderPageBanner(PassRefPtr<PageBanner> pageBanner)
</span><span class="cx"> {
</span><span class="lines">@@ -1889,7 +1873,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><del>- bool handled = m_pageOverlayController.handleMouseEvent(mouseEvent);
</del><ins>+ bool handled = false;
</ins><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> if (!handled && m_headerBanner)
</span><span class="lines">@@ -1915,7 +1899,7 @@
</span><span class="cx">
</span><span class="cx"> void WebPage::mouseEventSyncForTesting(const WebMouseEvent& mouseEvent, bool& handled)
</span><span class="cx"> {
</span><del>- handled = m_pageOverlayController.handleMouseEvent(mouseEvent);
</del><ins>+ handled = false;
</ins><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> if (!handled && m_headerBanner)
</span><span class="cx"> handled = m_headerBanner->mouseEvent(mouseEvent);
</span><span class="lines">@@ -2845,8 +2829,6 @@
</span><span class="cx">
</span><span class="cx"> if (m_drawingArea)
</span><span class="cx"> m_drawingArea->updatePreferences(store);
</span><del>-
- m_pageOverlayController.didChangePreferences();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -4076,7 +4058,7 @@
</span><span class="cx"> send(Messages::WebPageProxy::SetCanShortCircuitHorizontalWheelEvents(m_canShortCircuitHorizontalWheelEvents));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Frame* WebPage::mainFrame() const
</del><ins>+MainFrame* WebPage::mainFrame() const
</ins><span class="cx"> {
</span><span class="cx"> return m_page ? &m_page->mainFrame() : nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -4793,8 +4775,6 @@
</span><span class="cx">
</span><span class="cx"> void WebPage::didChangeScrollOffsetForFrame(Frame* frame)
</span><span class="cx"> {
</span><del>- m_pageOverlayController.didScrollFrame(frame);
-
</del><span class="cx"> if (!frame->isMainFrame())
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -41,7 +41,6 @@
</span><span class="cx"> #include "LayerTreeHost.h"
</span><span class="cx"> #include "MessageReceiver.h"
</span><span class="cx"> #include "MessageSender.h"
</span><del>-#include "PageOverlayController.h"
</del><span class="cx"> #include "Plugin.h"
</span><span class="cx"> #include "SandboxExtension.h"
</span><span class="cx"> #include "ShareableBitmap.h"
</span><span class="lines">@@ -143,7 +142,6 @@
</span><span class="cx"> class InjectedBundleBackForwardList;
</span><span class="cx"> class NotificationPermissionRequestManager;
</span><span class="cx"> class PageBanner;
</span><del>-class PageOverlay;
</del><span class="cx"> class PluginView;
</span><span class="cx"> class ServicesOverlayController;
</span><span class="cx"> class VisibleContentRectUpdateInfo;
</span><span class="lines">@@ -208,8 +206,6 @@
</span><span class="cx">
</span><span class="cx"> InjectedBundleBackForwardList* backForwardList();
</span><span class="cx"> DrawingArea* drawingArea() const { return m_drawingArea.get(); }
</span><del>- const PageOverlayController& pageOverlayController() const { return m_pageOverlayController; }
- PageOverlayController& pageOverlayController() { return m_pageOverlayController; }
</del><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="cx"> WebCore::ScrollingCoordinator* scrollingCoordinator() const;
</span><span class="cx"> #endif
</span><span class="lines">@@ -312,7 +308,7 @@
</span><span class="cx">
</span><span class="cx"> WebFrame* mainWebFrame() const { return m_mainFrame.get(); }
</span><span class="cx">
</span><del>- WebCore::Frame* mainFrame() const; // May return 0.
</del><ins>+ WebCore::MainFrame* mainFrame() const; // May return 0.
</ins><span class="cx"> WebCore::FrameView* mainFrameView() const; // May return 0.
</span><span class="cx">
</span><span class="cx"> PassRefPtr<WebCore::Range> currentSelectionAsRange();
</span><span class="lines">@@ -416,8 +412,6 @@
</span><span class="cx">
</span><span class="cx"> bool windowIsFocused() const;
</span><span class="cx"> bool windowAndWebPageAreFocused() const;
</span><del>- void installPageOverlay(PassRefPtr<PageOverlay>, PageOverlay::FadeMode = PageOverlay::FadeMode::DoNotFade);
- void uninstallPageOverlay(PageOverlay*, PageOverlay::FadeMode = PageOverlay::FadeMode::DoNotFade);
</del><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="cx"> void setHeaderPageBanner(PassRefPtr<PageBanner>);
</span><span class="lines">@@ -822,9 +816,6 @@
</span><span class="cx"> WebCore::ScrollPinningBehavior scrollPinningBehavior() { return m_scrollPinningBehavior; }
</span><span class="cx"> void setScrollPinningBehavior(uint32_t /* WebCore::ScrollPinningBehavior */ pinning);
</span><span class="cx">
</span><del>- WKTypeRef pageOverlayCopyAccessibilityAttributeValue(WKStringRef attribute, WKTypeRef parameter);
- WKArrayRef pageOverlayCopyAccessibilityAttributesNames(bool parameterizedNames);
-
</del><span class="cx"> PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(WebCore::Frame&, const WebCore::ResourceRequest&, const WebCore::SubstituteData&);
</span><span class="cx">
</span><span class="cx"> void getBytecodeProfile(uint64_t callbackID);
</span><span class="lines">@@ -1280,8 +1271,6 @@
</span><span class="cx"> #if ENABLE(SERVICE_CONTROLS) || ENABLE(TELEPHONE_NUMBER_DETECTION)
</span><span class="cx"> std::unique_ptr<ServicesOverlayController> m_servicesOverlayController;
</span><span class="cx"> #endif
</span><del>-
- PageOverlayController m_pageOverlayController;
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageWebPageOverlaycppfromrev174231trunkSourceWebKit2WebProcessWebPageWebPageOverlaycpp"></a>
<div class="copfile"><h4>Copied: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.cpp (from rev 174231, trunk/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.cpp) (0 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.cpp         (rev 0)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -0,0 +1,113 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebPageOverlay.h"
+
+#include "WebFrame.h"
+#include "WebPage.h"
+#include <WebCore/GraphicsLayer.h>
+#include <WebCore/PageOverlay.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+PassRefPtr<WebPageOverlay> WebPageOverlay::create(WebPageOverlay::Client& client, PageOverlay::OverlayType overlayType)
+{
+ return adoptRef(new WebPageOverlay(client, overlayType));
+}
+
+WebPageOverlay::WebPageOverlay(WebPageOverlay::Client& client, PageOverlay::OverlayType overlayType)
+ : m_overlay(PageOverlay::create(*this, overlayType))
+ , m_client(client)
+{
+}
+
+WebPageOverlay::~WebPageOverlay()
+{
+}
+
+void WebPageOverlay::setNeedsDisplay(const IntRect& dirtyRect)
+{
+ m_overlay->setNeedsDisplay(dirtyRect);
+}
+
+void WebPageOverlay::setNeedsDisplay()
+{
+ m_overlay->setNeedsDisplay();
+}
+
+void WebPageOverlay::clear()
+{
+ m_overlay->clear();
+}
+
+void WebPageOverlay::pageOverlayDestroyed(PageOverlay&)
+{
+ m_client.pageOverlayDestroyed(*this);
+}
+
+void WebPageOverlay::willMoveToPage(PageOverlay&, Page* page)
+{
+ m_client.willMoveToPage(*this, page ? WebPage::fromCorePage(page) : nullptr);
+}
+
+void WebPageOverlay::didMoveToPage(PageOverlay&, Page* page)
+{
+ m_client.didMoveToPage(*this, page ? WebPage::fromCorePage(page) : nullptr);
+}
+
+void WebPageOverlay::drawRect(PageOverlay&, GraphicsContext& context, const IntRect& dirtyRect)
+{
+ m_client.drawRect(*this, context, dirtyRect);
+}
+
+bool WebPageOverlay::mouseEvent(PageOverlay&, const PlatformMouseEvent& event)
+{
+ return m_client.mouseEvent(*this, event);
+}
+
+void WebPageOverlay::didScrollFrame(PageOverlay&, Frame& frame)
+{
+ m_client.didScrollFrame(*this, WebFrame::fromCoreFrame(frame));
+}
+
+bool WebPageOverlay::copyAccessibilityAttributeStringValueForPoint(PageOverlay&, String attribute, FloatPoint parameter, String& value)
+{
+ return m_client.copyAccessibilityAttributeStringValueForPoint(*this, attribute, parameter, value);
+}
+
+bool WebPageOverlay::copyAccessibilityAttributeBoolValueForPoint(PageOverlay&, String attribute, FloatPoint parameter, bool& value)
+{
+ return m_client.copyAccessibilityAttributeBoolValueForPoint(*this, attribute, parameter, value);
+}
+
+Vector<String> WebPageOverlay::copyAccessibilityAttributeNames(PageOverlay&, bool parameterizedNames)
+{
+ return m_client.copyAccessibilityAttributeNames(*this, parameterizedNames);
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageWebPageOverlayhfromrev174231trunkSourceWebKit2WebProcessWebPageWebPageOverlayh"></a>
<div class="copfile"><h4>Copied: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.h (from rev 174231, trunk/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.h) (0 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.h         (rev 0)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/WebPageOverlay.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -0,0 +1,92 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebPageOverlay_h
+#define WebPageOverlay_h
+
+#include "APIObject.h"
+#include <WebCore/FloatPoint.h>
+#include <WebCore/IntRect.h>
+#include <WebCore/PageOverlay.h>
+#include <wtf/PassRefPtr.h>
+
+namespace WebKit {
+
+class WebFrame;
+class WebPage;
+
+class WebPageOverlay : public API::ObjectImpl<API::Object::Type::BundlePageOverlay>, private WebCore::PageOverlay::Client {
+public:
+ class Client {
+ protected:
+ virtual ~Client() { }
+
+ public:
+ virtual void pageOverlayDestroyed(WebPageOverlay&) = 0;
+ virtual void willMoveToPage(WebPageOverlay&, WebPage*) = 0;
+ virtual void didMoveToPage(WebPageOverlay&, WebPage*) = 0;
+ virtual void drawRect(WebPageOverlay&, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect) = 0;
+ virtual bool mouseEvent(WebPageOverlay&, const WebCore::PlatformMouseEvent&) = 0;
+ virtual void didScrollFrame(WebPageOverlay&, WebFrame*) { }
+
+ virtual bool copyAccessibilityAttributeStringValueForPoint(WebPageOverlay&, String /* attribute */, WebCore::FloatPoint /* parameter */, String& value) { return false; }
+ virtual bool copyAccessibilityAttributeBoolValueForPoint(WebPageOverlay&, String /* attribute */, WebCore::FloatPoint /* parameter */, bool& value) { return false; }
+ virtual Vector<String> copyAccessibilityAttributeNames(WebPageOverlay&, bool /* parameterizedNames */) { return Vector<String>(); }
+ };
+
+ static PassRefPtr<WebPageOverlay> create(Client&, WebCore::PageOverlay::OverlayType = WebCore::PageOverlay::OverlayType::View);
+ virtual ~WebPageOverlay();
+
+ void setNeedsDisplay(const WebCore::IntRect& dirtyRect);
+ void setNeedsDisplay();
+
+ void clear();
+
+ WebCore::PageOverlay* coreOverlay() const { return m_overlay.get(); }
+ Client& client() const { return m_client; }
+
+private:
+ WebPageOverlay(Client&, WebCore::PageOverlay::OverlayType);
+
+ // WebCore::PageOverlay::Client
+ virtual void pageOverlayDestroyed(WebCore::PageOverlay&) override;
+ virtual void willMoveToPage(WebCore::PageOverlay&, WebCore::Page*) override;
+ virtual void didMoveToPage(WebCore::PageOverlay&, WebCore::Page*) override;
+ virtual void drawRect(WebCore::PageOverlay&, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect) override;
+ virtual bool mouseEvent(WebCore::PageOverlay&, const WebCore::PlatformMouseEvent&) override;
+ virtual void didScrollFrame(WebCore::PageOverlay&, WebCore::Frame&) override;
+
+ virtual bool copyAccessibilityAttributeStringValueForPoint(WebCore::PageOverlay&, String /* attribute */, WebCore::FloatPoint /* parameter */, String& value) override;
+ virtual bool copyAccessibilityAttributeBoolValueForPoint(WebCore::PageOverlay&, String /* attribute */, WebCore::FloatPoint /* parameter */, bool& value) override;
+ virtual Vector<String> copyAccessibilityAttributeNames(WebCore::PageOverlay&, bool /* parameterizedNames */) override;
+
+
+ RefPtr<WebCore::PageOverlay> m_overlay;
+ Client& m_client;
+};
+
+} // namespace WebKit
+
+#endif // WebPageOverlay_h
</ins></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageiosFindControllerIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/ios/FindControllerIOS.mm (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/ios/FindControllerIOS.mm        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/ios/FindControllerIOS.mm        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #import <WebCore/GraphicsContext.h>
</span><span class="cx"> #import <WebCore/MainFrame.h>
</span><span class="cx"> #import <WebCore/Page.h>
</span><ins>+#import <WebCore/PageOverlayController.h>
</ins><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="lines">@@ -52,12 +53,12 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-void FindIndicatorOverlayClientIOS::drawRect(PageOverlay* overlay, WebCore::GraphicsContext& context, const WebCore::IntRect& dirtyRect)
</del><ins>+void FindIndicatorOverlayClientIOS::drawRect(PageOverlay& overlay, GraphicsContext& context, const IntRect& dirtyRect)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Support multiple text rects.
</span><span class="cx">
</span><del>- IntRect overlayFrame = overlay->frame();
- IntRect overlayBounds = overlay->bounds();
</del><ins>+ IntRect overlayFrame = overlay.frame();
+ IntRect overlayBounds = overlay.bounds();
</ins><span class="cx">
</span><span class="cx"> {
</span><span class="cx"> GraphicsContextStateSaver stateSaver(context);
</span><span class="lines">@@ -85,11 +86,11 @@
</span><span class="cx"> matchRect.inflateY(totalVerticalMargin);
</span><span class="cx">
</span><span class="cx"> if (m_findIndicatorOverlay)
</span><del>- m_webPage->uninstallPageOverlay(m_findIndicatorOverlay.get());
</del><ins>+ m_webPage->mainFrame()->pageOverlayController().uninstallPageOverlay(m_findIndicatorOverlay.get(), PageOverlay::FadeMode::DoNotFade);
</ins><span class="cx">
</span><span class="cx"> m_findIndicatorOverlayClient = std::make_unique<FindIndicatorOverlayClientIOS>(selectedFrame);
</span><del>- m_findIndicatorOverlay = PageOverlay::create(m_findIndicatorOverlayClient.get(), PageOverlay::OverlayType::Document);
- m_webPage->installPageOverlay(m_findIndicatorOverlay);
</del><ins>+ m_findIndicatorOverlay = PageOverlay::create(*m_findIndicatorOverlayClient, PageOverlay::OverlayType::Document);
+ m_webPage->mainFrame()->pageOverlayController().installPageOverlay(m_findIndicatorOverlay, PageOverlay::FadeMode::DoNotFade);
</ins><span class="cx">
</span><span class="cx"> m_findIndicatorOverlay->setFrame(matchRect);
</span><span class="cx"> m_findIndicatorOverlay->setNeedsDisplay();
</span><span class="lines">@@ -106,7 +107,7 @@
</span><span class="cx"> if (!m_isShowingFindIndicator)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_webPage->uninstallPageOverlay(m_findIndicatorOverlay.get());
</del><ins>+ m_webPage->mainFrame()->pageOverlayController().uninstallPageOverlay(m_findIndicatorOverlay.get(), PageOverlay::FadeMode::DoNotFade);
</ins><span class="cx"> m_findIndicatorOverlay = nullptr;
</span><span class="cx"> m_isShowingFindIndicator = false;
</span><span class="cx"> m_foundStringMatchIndex = -1;
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPageiosFindIndicatorOverlayClientIOSh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -26,13 +26,13 @@
</span><span class="cx"> #ifndef FindIndicatorOverlayClientIOS_h
</span><span class="cx"> #define FindIndicatorOverlayClientIOS_h
</span><span class="cx">
</span><del>-#import "PageOverlay.h"
</del><span class="cx"> #import <WebCore/Frame.h>
</span><span class="cx"> #import <WebCore/GraphicsContext.h>
</span><ins>+#import <WebCore/PageOverlay.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class FindIndicatorOverlayClientIOS : public PageOverlay::Client {
</del><ins>+class FindIndicatorOverlayClientIOS : public WebCore::PageOverlay::Client {
</ins><span class="cx"> public:
</span><span class="cx"> FindIndicatorOverlayClientIOS(WebCore::Frame& frame)
</span><span class="cx"> : m_frame(frame)
</span><span class="lines">@@ -40,11 +40,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- virtual void pageOverlayDestroyed(PageOverlay*) override { }
- virtual void willMoveToWebPage(PageOverlay*, WebPage*) override { }
- virtual void didMoveToWebPage(PageOverlay*, WebPage*) override { }
- virtual void drawRect(PageOverlay*, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect) override;
- virtual bool mouseEvent(PageOverlay*, const WebMouseEvent&) override { return false; }
</del><ins>+ virtual void pageOverlayDestroyed(WebCore::PageOverlay&) override { }
+ virtual void willMoveToPage(WebCore::PageOverlay&, WebCore::Page*) override { }
+ virtual void didMoveToPage(WebCore::PageOverlay&, WebCore::Page*) override { }
+ virtual void drawRect(WebCore::PageOverlay&, WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect) override;
+ virtual bool mouseEvent(WebCore::PageOverlay&, const WebCore::PlatformMouseEvent&) override { return false; }
</ins><span class="cx">
</span><span class="cx"> WebCore::Frame& m_frame;
</span><span class="cx"> };
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx"> virtual void setRootCompositingLayer(WebCore::GraphicsLayer*) override;
</span><span class="cx"> virtual void scheduleCompositingLayerFlush() override;
</span><span class="cx"> virtual void scheduleCompositingLayerFlushImmediately() override;
</span><ins>+ virtual void attachViewOverlayGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override;
</ins><span class="cx">
</span><span class="cx"> virtual void addTransactionCallbackID(uint64_t callbackID) override;
</span><span class="cx">
</span><span class="lines">@@ -111,6 +112,7 @@
</span><span class="cx"> virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::FloatRect& inClip) override { }
</span><span class="cx">
</span><span class="cx"> void updateScrolledExposedRect();
</span><ins>+ void updateRootLayers();
</ins><span class="cx">
</span><span class="cx"> void layerFlushTimerFired(WebCore::Timer<RemoteLayerTreeDrawingArea>*);
</span><span class="cx"> void flushLayers();
</span><span class="lines">@@ -164,6 +166,9 @@
</span><span class="cx">
</span><span class="cx"> uint64_t m_currentTransactionID;
</span><span class="cx"> Vector<RemoteLayerTreeTransaction::TransactionCallbackID> m_pendingCallbackIDs;
</span><ins>+
+ WebCore::GraphicsLayer* m_contentLayer;
+ WebCore::GraphicsLayer* m_viewOverlayRootLayer;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> DRAWING_AREA_TYPE_CASTS(RemoteLayerTreeDrawingArea, type() == DrawingAreaTypeRemoteLayerTree);
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #import <WebCore/Frame.h>
</span><span class="cx"> #import <WebCore/FrameView.h>
</span><span class="cx"> #import <WebCore/MainFrame.h>
</span><ins>+#import <WebCore/PageOverlayController.h>
</ins><span class="cx"> #import <WebCore/RenderLayerCompositor.h>
</span><span class="cx"> #import <WebCore/RenderView.h>
</span><span class="cx"> #import <WebCore/Settings.h>
</span><span class="lines">@@ -66,6 +67,8 @@
</span><span class="cx"> , m_hadFlushDeferredWhileWaitingForBackingStoreSwap(false)
</span><span class="cx"> , m_displayRefreshMonitorsToNotify(nullptr)
</span><span class="cx"> , m_currentTransactionID(0)
</span><ins>+ , m_contentLayer(nullptr)
+ , m_viewOverlayRootLayer(nullptr)
</ins><span class="cx"> {
</span><span class="cx"> webPage.corePage()->settings().setForceCompositingMode(true);
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -113,15 +116,31 @@
</span><span class="cx"> m_displayRefreshMonitorsToNotify->remove(remoteMonitor);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RemoteLayerTreeDrawingArea::setRootCompositingLayer(GraphicsLayer* rootLayer)
</del><ins>+void RemoteLayerTreeDrawingArea::updateRootLayers()
</ins><span class="cx"> {
</span><span class="cx"> Vector<GraphicsLayer*> children;
</span><del>- if (rootLayer) {
- children.append(rootLayer);
- children.append(m_webPage.pageOverlayController().viewOverlayRootLayer());
</del><ins>+ if (m_contentLayer) {
+ children.append(m_contentLayer);
+ if (m_viewOverlayRootLayer)
+ children.append(m_viewOverlayRootLayer);
</ins><span class="cx"> }
</span><ins>+
</ins><span class="cx"> m_rootLayer->setChildren(children);
</span><ins>+}
</ins><span class="cx">
</span><ins>+void RemoteLayerTreeDrawingArea::attachViewOverlayGraphicsLayer(Frame* frame, GraphicsLayer* viewOverlayRootLayer)
+{
+ if (!frame->isMainFrame())
+ return;
+
+ m_viewOverlayRootLayer = viewOverlayRootLayer;
+ updateRootLayers();
+}
+
+void RemoteLayerTreeDrawingArea::setRootCompositingLayer(GraphicsLayer* rootLayer)
+{
+ m_contentLayer = rootLayer;
+ updateRootLayers();
</ins><span class="cx"> scheduleCompositingLayerFlush();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -229,8 +248,6 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> frameView->setExposedRect(m_scrolledExposedRect);
</span><del>-
- m_webPage.pageOverlayController().didChangeExposedRect();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> TiledBacking* RemoteLayerTreeDrawingArea::mainFrameTiledBacking() const
</span><span class="lines">@@ -316,8 +333,13 @@
</span><span class="cx">
</span><span class="cx"> FloatRect visibleRect(FloatPoint(), m_viewSize);
</span><span class="cx"> visibleRect.intersect(m_scrolledExposedRect);
</span><del>- m_webPage.pageOverlayController().flushPageOverlayLayers(visibleRect);
</del><ins>+
</ins><span class="cx"> m_webPage.mainFrameView()->flushCompositingStateIncludingSubframes();
</span><ins>+
+ // Because our view-relative overlay root layer is not attached to the FrameView's GraphicsLayer tree, we need to flush it manually.
+ if (m_viewOverlayRootLayer)
+ m_viewOverlayRootLayer->flushCompositingState(visibleRect);
+
</ins><span class="cx"> m_rootLayer->flushCompositingStateForThisLayerOnly();
</span><span class="cx">
</span><span class="cx"> // FIXME: Minimize these transactions if nothing changed.
</span><span class="lines">@@ -405,7 +427,6 @@
</span><span class="cx"> void RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged(const IntSize& contentsSize)
</span><span class="cx"> {
</span><span class="cx"> m_rootLayer->setSize(contentsSize);
</span><del>- m_webPage.pageOverlayController().didChangeDocumentSize();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool RemoteLayerTreeDrawingArea::markLayersVolatileImmediatelyIfPossible()
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPagemacServicesOverlayControllermm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> #import <WebCore/GraphicsLayer.h>
</span><span class="cx"> #import <WebCore/GraphicsLayerCA.h>
</span><span class="cx"> #import <WebCore/MainFrame.h>
</span><ins>+#import <WebCore/PageOverlayController.h>
</ins><span class="cx"> #import <WebCore/PlatformCAAnimationMac.h>
</span><span class="cx"> #import <WebCore/SoftLinking.h>
</span><span class="cx">
</span><span class="lines">@@ -225,23 +226,23 @@
</span><span class="cx"> highlight->invalidate();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ServicesOverlayController::pageOverlayDestroyed(PageOverlay*)
</del><ins>+void ServicesOverlayController::pageOverlayDestroyed(PageOverlay&)
</ins><span class="cx"> {
</span><span class="cx"> // Before the overlay is destroyed, it should have moved out of the WebPage,
</span><span class="cx"> // at which point we already cleared our back pointer.
</span><span class="cx"> ASSERT(!m_servicesOverlay);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ServicesOverlayController::willMoveToWebPage(PageOverlay*, WebPage* webPage)
</del><ins>+void ServicesOverlayController::willMoveToPage(PageOverlay&, Page* page)
</ins><span class="cx"> {
</span><del>- if (webPage)
</del><ins>+ if (page)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> ASSERT(m_servicesOverlay);
</span><span class="cx"> m_servicesOverlay = nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ServicesOverlayController::didMoveToWebPage(PageOverlay*, WebPage*)
</del><ins>+void ServicesOverlayController::didMoveToPage(PageOverlay&, Page*)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -447,7 +448,7 @@
</span><span class="cx"> determineActiveHighlight(mouseIsOverButton);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ServicesOverlayController::drawRect(PageOverlay* overlay, GraphicsContext& graphicsContext, const IntRect& dirtyRect)
</del><ins>+void ServicesOverlayController::drawRect(PageOverlay& overlay, GraphicsContext& graphicsContext, const IntRect& dirtyRect)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -583,7 +584,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (m_potentialHighlights.isEmpty()) {
</span><span class="cx"> if (m_servicesOverlay)
</span><del>- m_webPage.uninstallPageOverlay(m_servicesOverlay);
</del><ins>+ m_webPage.mainFrame()->pageOverlayController().uninstallPageOverlay(m_servicesOverlay, PageOverlay::FadeMode::DoNotFade);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -601,9 +602,9 @@
</span><span class="cx"> if (m_servicesOverlay)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- RefPtr<PageOverlay> overlay = PageOverlay::create(this, PageOverlay::OverlayType::Document);
</del><ins>+ RefPtr<PageOverlay> overlay = PageOverlay::create(*this, PageOverlay::OverlayType::Document);
</ins><span class="cx"> m_servicesOverlay = overlay.get();
</span><del>- m_webPage.installPageOverlay(overlay.release(), PageOverlay::FadeMode::DoNotFade);
</del><ins>+ m_webPage.mainFrame()->pageOverlayController().installPageOverlay(overlay.release(), PageOverlay::FadeMode::DoNotFade);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Vector<RefPtr<Range>> ServicesOverlayController::telephoneNumberRangesForFocusedFrame()
</span><span class="lines">@@ -717,13 +718,13 @@
</span><span class="cx"> m_activeHighlight = m_nextActiveHighlight.release();
</span><span class="cx">
</span><span class="cx"> if (m_activeHighlight) {
</span><del>- m_servicesOverlay->layer()->addChild(m_activeHighlight->layer());
</del><ins>+ m_servicesOverlay->layer().addChild(m_activeHighlight->layer());
</ins><span class="cx"> m_activeHighlight->fadeIn();
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool ServicesOverlayController::mouseEvent(PageOverlay*, const WebMouseEvent& event)
</del><ins>+bool ServicesOverlayController::mouseEvent(PageOverlay&, const PlatformMouseEvent& event)
</ins><span class="cx"> {
</span><span class="cx"> m_mousePosition = m_webPage.corePage()->mainFrame().view()->rootViewToContents(event.position());
</span><span class="cx">
</span><span class="lines">@@ -731,13 +732,13 @@
</span><span class="cx"> determineActiveHighlight(mouseIsOverActiveHighlightButton);
</span><span class="cx">
</span><span class="cx"> // Cancel the potential click if any button other than the left button changes state, and ignore the event.
</span><del>- if (event.button() != WebMouseEvent::LeftButton) {
</del><ins>+ if (event.button() != MouseButton::LeftButton) {
</ins><span class="cx"> m_currentMouseDownOnButtonHighlight = nullptr;
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // If the mouse lifted while still over the highlight button that it went down on, then that is a click.
</span><del>- if (event.type() == WebEvent::MouseUp) {
</del><ins>+ if (event.type() == PlatformEvent::MouseReleased) {
</ins><span class="cx"> RefPtr<Highlight> mouseDownHighlight = m_currentMouseDownOnButtonHighlight;
</span><span class="cx"> m_currentMouseDownOnButtonHighlight = nullptr;
</span><span class="cx">
</span><span class="lines">@@ -752,7 +753,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // If the mouse moved outside of the button tracking a potential click, stop tracking the click.
</span><del>- if (event.type() == WebEvent::MouseMove) {
</del><ins>+ if (event.type() == PlatformEvent::MouseMoved) {
</ins><span class="cx"> if (m_currentMouseDownOnButtonHighlight && mouseIsOverActiveHighlightButton)
</span><span class="cx"> return true;
</span><span class="cx">
</span><span class="lines">@@ -761,7 +762,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // If the mouse went down over the active highlight's button, track this as a potential click.
</span><del>- if (event.type() == WebEvent::MouseDown) {
</del><ins>+ if (event.type() == PlatformEvent::MousePressed) {
</ins><span class="cx"> if (m_activeHighlight && mouseIsOverActiveHighlightButton) {
</span><span class="cx"> m_currentMouseDownOnButtonHighlight = m_activeHighlight;
</span><span class="cx"> return true;
</span><span class="lines">@@ -773,9 +774,9 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ServicesOverlayController::didScrollFrame(PageOverlay*, Frame* frame)
</del><ins>+void ServicesOverlayController::didScrollFrame(PageOverlay&, Frame& frame)
</ins><span class="cx"> {
</span><del>- if (frame->isMainFrame())
</del><ins>+ if (frame.isMainFrame())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> buildPhoneNumberHighlights();
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -84,6 +84,8 @@
</span><span class="cx"> virtual void viewStateDidChange(WebCore::ViewState::Flags changed, bool wantsDidUpdateViewState) override;
</span><span class="cx"> void didUpdateViewStateTimerFired();
</span><span class="cx">
</span><ins>+ virtual void attachViewOverlayGraphicsLayer(WebCore::Frame*, WebCore::GraphicsLayer*) override;
+
</ins><span class="cx"> // WebCore::LayerFlushSchedulerClient
</span><span class="cx"> virtual bool flushLayers() override;
</span><span class="cx">
</span><span class="lines">@@ -106,6 +108,7 @@
</span><span class="cx"> void updateLayerHostingContext();
</span><span class="cx">
</span><span class="cx"> void setRootCompositingLayer(CALayer *);
</span><ins>+ void updateRootLayers();
</ins><span class="cx">
</span><span class="cx"> WebCore::TiledBacking* mainFrameTiledBacking() const;
</span><span class="cx"> void updateDebugInfoLayer(bool showLayer);
</span><span class="lines">@@ -138,6 +141,8 @@
</span><span class="cx"> WebCore::TransformationMatrix m_transform;
</span><span class="cx">
</span><span class="cx"> RunLoop::Timer<TiledCoreAnimationDrawingArea> m_sendDidUpdateViewStateTimer;
</span><ins>+
+ WebCore::GraphicsLayer* m_viewOverlayRootLayer;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> DRAWING_AREA_TYPE_CASTS(TiledCoreAnimationDrawingArea, type() == DrawingAreaTypeTiledCoreAnimation);
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx"> #import <WebCore/ScrollbarTheme.h>
</span><span class="cx"> #import <WebCore/Settings.h>
</span><span class="cx"> #import <WebCore/TiledBacking.h>
</span><ins>+#import <WebCore/WebActionDisablingCALayerDelegate.h>
</ins><span class="cx"> #import <wtf/MainThread.h>
</span><span class="cx">
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="lines">@@ -76,10 +77,12 @@
</span><span class="cx"> , m_scrolledExposedRect(FloatRect::infiniteRect())
</span><span class="cx"> , m_transientZoomScale(1)
</span><span class="cx"> , m_sendDidUpdateViewStateTimer(RunLoop::main(), this, &TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired)
</span><ins>+ , m_viewOverlayRootLayer(nullptr)
</ins><span class="cx"> {
</span><span class="cx"> m_webPage.corePage()->settings().setForceCompositingMode(true);
</span><span class="cx">
</span><span class="cx"> m_hostingLayer = [CALayer layer];
</span><ins>+ [m_hostingLayer setDelegate:[WebActionDisablingCALayerDelegate shared]];
</ins><span class="cx"> [m_hostingLayer setFrame:m_webPage.bounds()];
</span><span class="cx"> [m_hostingLayer setOpaque:YES];
</span><span class="cx"> [m_hostingLayer setGeometryFlipped:YES];
</span><span class="lines">@@ -204,9 +207,28 @@
</span><span class="cx"> updateDebugInfoLayer(showTiledScrollingIndicator);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void TiledCoreAnimationDrawingArea::updateRootLayers()
+{
+ if (!m_rootLayer) {
+ [m_hostingLayer setSublayers:@[ ]];
+ return;
+ }
+
+ [m_hostingLayer setSublayers:m_viewOverlayRootLayer ? @[ m_rootLayer.get(), m_viewOverlayRootLayer->platformLayer() ] : @[ m_rootLayer.get() ]];
+}
+
+void TiledCoreAnimationDrawingArea::attachViewOverlayGraphicsLayer(Frame* frame, GraphicsLayer* viewOverlayRootLayer)
+{
+ if (!frame->isMainFrame())
+ return;
+
+ m_viewOverlayRootLayer = viewOverlayRootLayer;
+ updateRootLayers();
+}
+
</ins><span class="cx"> void TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged(const IntSize& size)
</span><span class="cx"> {
</span><del>- m_webPage.pageOverlayController().didChangeDocumentSize();
</del><ins>+
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeIfNeeded()
</span><span class="lines">@@ -283,8 +305,11 @@
</span><span class="cx">
</span><span class="cx"> FloatRect visibleRect = [m_hostingLayer frame];
</span><span class="cx"> visibleRect.intersect(m_scrolledExposedRect);
</span><del>- m_webPage.pageOverlayController().flushPageOverlayLayers(visibleRect);
</del><span class="cx">
</span><ins>+ // Because our view-relative overlay root layer is not attached to the main GraphicsLayer tree, we need to flush it manually.
+ if (m_viewOverlayRootLayer)
+ m_viewOverlayRootLayer->flushCompositingState(visibleRect);
+
</ins><span class="cx"> bool returnValue = m_webPage.mainFrameView()->flushCompositingStateIncludingSubframes();
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="cx"> if (ScrollingCoordinator* scrollingCoordinator = m_webPage.corePage()->scrollingCoordinator())
</span><span class="lines">@@ -363,8 +388,6 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> frameView->setExposedRect(m_scrolledExposedRect);
</span><del>-
- m_webPage.pageOverlayController().didChangeExposedRect();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TiledCoreAnimationDrawingArea::updateGeometry(const IntSize& viewSize, const IntSize& layerPosition)
</span><span class="lines">@@ -464,12 +487,12 @@
</span><span class="cx"> [CATransaction begin];
</span><span class="cx"> [CATransaction setDisableActions:YES];
</span><span class="cx">
</span><del>- [m_hostingLayer setSublayers:layer ? @[ layer, m_webPage.pageOverlayController().viewOverlayRootLayer()->platformLayer() ] : @[ ]];
-
</del><span class="cx"> bool hadRootLayer = !!m_rootLayer;
</span><span class="cx"> m_rootLayer = layer;
</span><span class="cx"> [m_rootLayer setSublayerTransform:m_transform];
</span><span class="cx">
</span><ins>+ updateRootLayers();
+
</ins><span class="cx"> if (hadRootLayer != !!layer)
</span><span class="cx"> m_layerHostingContext->setRootLayer(layer ? m_hostingLayer.get() : 0);
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebPagemacWKAccessibilityWebPageObjectMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #import <WebCore/FrameView.h>
</span><span class="cx"> #import <WebCore/MainFrame.h>
</span><span class="cx"> #import <WebCore/Page.h>
</span><ins>+#import <WebCore/PageOverlayController.h>
</ins><span class="cx"> #import <WebCore/ScrollView.h>
</span><span class="cx"> #import <WebCore/Scrollbar.h>
</span><span class="cx"> #import <WebKitSystemInterface.h>
</span><span class="lines">@@ -75,19 +76,13 @@
</span><span class="cx">
</span><span class="cx"> - (NSArray *)accessibilityParameterizedAttributeNames
</span><span class="cx"> {
</span><del>- WKRetainPtr<WKArrayRef> result = adoptWK(m_page->pageOverlayController().copyAccessibilityAttributesNames(true));
- if (!result)
</del><ins>+ Vector<String> result = m_page->mainFrame()->pageOverlayController().copyAccessibilityAttributesNames(true);
+ if (result.isEmpty())
</ins><span class="cx"> return nil;
</span><span class="cx">
</span><span class="cx"> NSMutableArray *names = [NSMutableArray array];
</span><del>- size_t count = WKArrayGetSize(result.get());
- for (size_t k = 0; k < count; k++) {
- WKTypeRef item = WKArrayGetItemAtIndex(result.get(), k);
- if (toImpl(item)->type() == API::String::APIType) {
- RetainPtr<CFStringRef> name = adoptCF(WKStringCopyCFString(kCFAllocatorDefault, (WKStringRef)item));
- [names addObject:(NSString *)name.get()];
- }
- }
</del><ins>+ for (auto& name : result)
+ [names addObject:(NSString *)name];
</ins><span class="cx">
</span><span class="cx"> return names;
</span><span class="cx"> }
</span><span class="lines">@@ -164,23 +159,26 @@
</span><span class="cx">
</span><span class="cx"> - (id)accessibilityAttributeValue:(NSString *)attribute forParameter:(id)parameter
</span><span class="cx"> {
</span><del>- WKRetainPtr<WKTypeRef> pageOverlayParameter = 0;
-
- if ([parameter isKindOfClass:[NSValue class]] && strcmp([(NSValue*)parameter objCType], @encode(NSPoint)) == 0) {
- NSPoint point = [self convertScreenPointToRootView:[(NSValue *)parameter pointValue]];
- pageOverlayParameter = WKPointCreate(WKPointMake(point.x, point.y));
- }
-
- WKRetainPtr<WKStringRef> attributeRef = adoptWK(WKStringCreateWithCFString((CFStringRef)attribute));
- WKRetainPtr<WKTypeRef> result = adoptWK(m_page->pageOverlayController().copyAccessibilityAttributeValue(attributeRef.get(), pageOverlayParameter.get()));
- if (!result)
</del><ins>+ WebCore::FloatPoint pageOverlayPoint;
+ if ([parameter isKindOfClass:[NSValue class]] && !strcmp([(NSValue *)parameter objCType], @encode(NSPoint)))
+ pageOverlayPoint = [self convertScreenPointToRootView:[(NSValue *)parameter pointValue]];
+ else
</ins><span class="cx"> return nil;
</span><del>-
- if (toImpl(result.get())->type() == API::String::APIType)
- return CFBridgingRelease(WKStringCopyCFString(kCFAllocatorDefault, (WKStringRef)result.get()));
- if (toImpl(result.get())->type() == API::Boolean::APIType)
- return [NSNumber numberWithBool:WKBooleanGetValue(static_cast<WKBooleanRef>(result.get()))];
-
</del><ins>+
+ if ([attribute isEqualToString:@"AXDataDetectorExistsAtPoint"] || [attribute isEqualToString:@"AXDidShowDataDetectorMenuAtPoint"]) {
+ bool value;
+ if (!m_page->mainFrame()->pageOverlayController().copyAccessibilityAttributeBoolValueForPoint(attribute, pageOverlayPoint, value))
+ return nil;
+ return [NSNumber numberWithBool:value];
+ }
+
+ if ([attribute isEqualToString:@"AXDataDetectorTypeAtPoint"]) {
+ String value;
+ if (!m_page->mainFrame()->pageOverlayController().copyAccessibilityAttributeStringValueForPoint(attribute, pageOverlayPoint, value))
+ return nil;
+ return [NSString stringWithString:value];
+ }
+
</ins><span class="cx"> return nil;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari6003branchSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebProcess.cpp (175295 => 175296)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebProcess.cpp        2014-10-29 01:28:33 UTC (rev 175295)
+++ branches/safari-600.3-branch/Source/WebKit2/WebProcess/WebProcess.cpp        2014-10-29 02:26:28 UTC (rev 175296)
</span><span class="lines">@@ -71,6 +71,7 @@
</span><span class="cx"> #include <WebCore/IconDatabase.h>
</span><span class="cx"> #include <WebCore/JSDOMWindow.h>
</span><span class="cx"> #include <WebCore/Language.h>
</span><ins>+#include <WebCore/MainFrame.h>
</ins><span class="cx"> #include <WebCore/MemoryCache.h>
</span><span class="cx"> #include <WebCore/MemoryPressureHandler.h>
</span><span class="cx"> #include <WebCore/Page.h>
</span></span></pre>
</div>
</div>
</body>
</html>