<!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>[161357] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/161357">161357</a></dd>
<dt>Author</dt> <dd>barraclough@apple.com</dd>
<dt>Date</dt> <dd>2014-01-06 11:29:11 -0800 (Mon, 06 Jan 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Move ViewState to WebCore
https://bugs.webkit.org/show_bug.cgi?id=126488
Reviewed by Anders Carlson.
This change also partial reverts handling of LayerHostingMode, making this
a separate message again. With hindsight the new way of doing this wasn't
in all ways simpler, and it won't make sense to move this to WebCore.
Source/WebCore:
* WebCore.xcodeproj/project.pbxproj:
* page/ViewState.h: Added.
- Moved from WebKit2, will be used by Page & FocusController.
Source/WebKit2:
* Shared/ViewState.h: Removed.
- Moved to WebCore.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
- Added layerHostingMode.
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::viewLayerHostingMode):
* UIProcess/PageClient.h:
(WebKit::PageClient::viewLayerHostingMode):
- Revert isLayerWindowServerHosted -> viewLayerHostingMode.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
- Added back m_layerHostingMode.
(WebKit::WebPageProxy::updateViewState):
- Removed IsLayerWindowServerHosted from ViewState.
(WebKit::WebPageProxy::viewStateDidChange):
- Added SetLayerHostingMode message.
(WebKit::WebPageProxy::initializeCreationParameters):
- Pass layerHostingMode.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isInWindow):
(WebKit::WebPageProxy::isViewVisible):
- ViewState moved to WebCore.
* WebKit2.xcodeproj/project.pbxproj:
- Removed ViewState.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::setLayerHostingMode):
(WebKit::PluginView::platformViewStateDidChange):
- Separated setLayerHostingMode from platformViewStateDidChange.
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::viewStateDidChange):
(WebKit::DrawingArea::setLayerHostingMode):
- Added virtual function, overridden in TiledCoreAnimationDrawingArea.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setLayerHostingMode):
- Separated setLayerHostingMode from platformViewStateDidChange.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::isVisible):
(WebKit::WebPage::layerHostingMode):
- ViewState moved to WebCore.
* WebProcess/WebPage/WebPage.messages.in:
- Added SetLayerHostingMode message.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
- viewStateDidChange no longer calls setLayerHostingMode (this is called by WebPage).</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPageCreationParameterscpp">trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebPageCreationParametersh">trunk/Source/WebKit2/Shared/WebPageCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacPageClientImplh">trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacPageClientImplmm">trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPluginViewcpp">trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPluginViewh">trunk/Source/WebKit2/WebProcess/Plugins/PluginView.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorepageViewStateh">trunk/Source/WebCore/page/ViewState.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2SharedViewStateh">trunk/Source/WebKit2/Shared/ViewState.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebCore/ChangeLog        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-01-06 Gavin Barraclough <barraclough@apple.com>
+
+ Move ViewState to WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=126488
+
+ Reviewed by Anders Carlson.
+
+ This change also partial reverts handling of LayerHostingMode, making this
+ a separate message again. With hindsight the new way of doing this wasn't
+ in all ways simpler, and it won't make sense to move this to WebCore.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * page/ViewState.h: Added.
+ - Moved from WebKit2, will be used by Page & FocusController.
+
</ins><span class="cx"> 2014-01-06 Martin Robinson <mrobinson@igalia.com>
</span><span class="cx">
</span><span class="cx"> [CMake] [GTK] Fix the build for the WebKitGTK+ developer configuration
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -2861,6 +2861,7 @@
</span><span class="cx">                 861C2EA613FB4FFF00062ABB /* ResourceLoadTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 861C2EA513FB4FFF00062ABB /* ResourceLoadTiming.cpp */; };
</span><span class="cx">                 86512EDE154A2AEF00A90426 /* PerformanceResourceTiming.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86512EDB154A2AEE00A90426 /* PerformanceResourceTiming.cpp */; };
</span><span class="cx">                 86512EDF154A2AEF00A90426 /* PerformanceResourceTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 86512EDC154A2AEF00A90426 /* PerformanceResourceTiming.h */; };
</span><ins>+                8678D0BB1878E891003ABDE6 /* ViewState.h in Headers */ = {isa = PBXBuildFile; fileRef = 8678D0BA1878E810003ABDE6 /* ViewState.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 868160D418766A0A0021E79D /* UserActivity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 868160D1187669C40021E79D /* UserActivity.cpp */; };
</span><span class="cx">                 868160D518766A0E0021E79D /* UserActivityMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 868160D3187669E70021E79D /* UserActivityMac.mm */; };
</span><span class="cx">                 868160D618766A130021E79D /* UserActivity.h in Headers */ = {isa = PBXBuildFile; fileRef = 868160D2187669C40021E79D /* UserActivity.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -9653,6 +9654,7 @@
</span><span class="cx">                 86512EDB154A2AEE00A90426 /* PerformanceResourceTiming.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PerformanceResourceTiming.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 86512EDC154A2AEF00A90426 /* PerformanceResourceTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PerformanceResourceTiming.h; sourceTree = "<group>"; };
</span><span class="cx">                 86512EDD154A2AEF00A90426 /* PerformanceResourceTiming.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PerformanceResourceTiming.idl; sourceTree = "<group>"; };
</span><ins>+                8678D0BA1878E810003ABDE6 /* ViewState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewState.h; sourceTree = "<group>"; };
</ins><span class="cx">                 868160D1187669C40021E79D /* UserActivity.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UserActivity.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 868160D2187669C40021E79D /* UserActivity.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserActivity.h; sourceTree = "<group>"; };
</span><span class="cx">                 868160D3187669E70021E79D /* UserActivityMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = UserActivityMac.mm; sourceTree = "<group>"; };
</span><span class="lines">@@ -15939,6 +15941,7 @@
</span><span class="cx">                                 BC8BF150105813BF00A40A07 /* UserStyleSheet.h */,
</span><span class="cx">                                 BC8BF1591058141800A40A07 /* UserStyleSheetTypes.h */,
</span><span class="cx">                                 F513A3E915FF4841001526DB /* ValidationMessageClient.h */,
</span><ins>+                                8678D0BA1878E810003ABDE6 /* ViewState.h */,
</ins><span class="cx">                                 BE983D95052A2E0A00892D85 /* WebCoreKeyboardUIMode.h */,
</span><span class="cx">                                 494BD7930F55C8EE00747828 /* WebKitPoint.h */,
</span><span class="cx">                                 494BD7940F55C8EE00747828 /* WebKitPoint.idl */,
</span><span class="lines">@@ -22835,6 +22838,7 @@
</span><span class="cx">                                 854075690AD6CBF900620C57 /* DOMHTMLAppletElement.h in Headers */,
</span><span class="cx">                                 855247CF0AD850B80012093B /* DOMHTMLAppletElementInternal.h in Headers */,
</span><span class="cx">                                 85ECBEEB0AA7626900544F0B /* DOMHTMLAreaElement.h in Headers */,
</span><ins>+                                8678D0BB1878E891003ABDE6 /* ViewState.h in Headers */,
</ins><span class="cx">                                 85E7119C0AC5D5350053270F /* DOMHTMLAreaElementInternal.h in Headers */,
</span><span class="cx">                                 859A9C470AA5E3BD00B694B2 /* DOMHTMLBaseElement.h in Headers */,
</span><span class="cx">                                 85E7119D0AC5D5350053270F /* DOMHTMLBaseElementInternal.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCorepageViewStateh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/ViewState.h (0 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ViewState.h         (rev 0)
+++ trunk/Source/WebCore/page/ViewState.h        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+/*
+ * Copyright (C) 2013 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 ViewState_h
+#define ViewState_h
+
+namespace WebCore {
+
+struct ViewState {
+ enum {
+ WindowIsActive = 1 << 0,
+ IsFocused = 1 << 1,
+ IsVisible = 1 << 2,
+ IsInWindow = 1 << 3,
+ IsVisuallyIdle = 1 << 4,
+ };
+
+ typedef unsigned Flags;
+
+ static const Flags NoFlags = 0;
+ static const Flags AllFlags = WindowIsActive | IsFocused | IsVisible | IsInWindow | IsVisuallyIdle;
+};
+
+} // namespace WebCore
+
+#endif // ViewState_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -1,3 +1,67 @@
</span><ins>+2014-01-06 Gavin Barraclough <barraclough@apple.com>
+
+ Move ViewState to WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=126488
+
+ Reviewed by Anders Carlson.
+
+ This change also partial reverts handling of LayerHostingMode, making this
+ a separate message again. With hindsight the new way of doing this wasn't
+ in all ways simpler, and it won't make sense to move this to WebCore.
+
+ * Shared/ViewState.h: Removed.
+ - Moved to WebCore.
+ * Shared/WebPageCreationParameters.cpp:
+ (WebKit::WebPageCreationParameters::encode):
+ (WebKit::WebPageCreationParameters::decode):
+ * Shared/WebPageCreationParameters.h:
+ - Added layerHostingMode.
+ * UIProcess/API/mac/PageClientImpl.h:
+ * UIProcess/API/mac/PageClientImpl.mm:
+ (WebKit::PageClientImpl::PageClientImpl):
+ (WebKit::PageClientImpl::viewLayerHostingMode):
+ * UIProcess/PageClient.h:
+ (WebKit::PageClient::viewLayerHostingMode):
+ - Revert isLayerWindowServerHosted -> viewLayerHostingMode.
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::WebPageProxy):
+ - Added back m_layerHostingMode.
+ (WebKit::WebPageProxy::updateViewState):
+ - Removed IsLayerWindowServerHosted from ViewState.
+ (WebKit::WebPageProxy::viewStateDidChange):
+ - Added SetLayerHostingMode message.
+ (WebKit::WebPageProxy::initializeCreationParameters):
+ - Pass layerHostingMode.
+ * UIProcess/WebPageProxy.h:
+ (WebKit::WebPageProxy::isInWindow):
+ (WebKit::WebPageProxy::isViewVisible):
+ - ViewState moved to WebCore.
+ * WebKit2.xcodeproj/project.pbxproj:
+ - Removed ViewState.
+ * WebProcess/Plugins/PluginView.cpp:
+ (WebKit::PluginView::setLayerHostingMode):
+ (WebKit::PluginView::platformViewStateDidChange):
+ - Separated setLayerHostingMode from platformViewStateDidChange.
+ * WebProcess/Plugins/PluginView.h:
+ * WebProcess/WebPage/DrawingArea.h:
+ (WebKit::DrawingArea::viewStateDidChange):
+ (WebKit::DrawingArea::setLayerHostingMode):
+ - Added virtual function, overridden in TiledCoreAnimationDrawingArea.
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage):
+ (WebKit::WebPage::setLayerHostingMode):
+ - Separated setLayerHostingMode from platformViewStateDidChange.
+ * WebProcess/WebPage/WebPage.h:
+ (WebKit::WebPage::isVisible):
+ (WebKit::WebPage::layerHostingMode):
+ - ViewState moved to WebCore.
+ * WebProcess/WebPage/WebPage.messages.in:
+ - Added SetLayerHostingMode message.
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
+ - viewStateDidChange no longer calls setLayerHostingMode (this is called by WebPage).
+
</ins><span class="cx"> 2014-01-06 Martin Robinson <mrobinson@igalia.com>
</span><span class="cx">
</span><span class="cx"> [GTK] [CMake] Parallel builds still fail when building WebKit2 GObject API unit tests
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedViewStateh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/Shared/ViewState.h (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ViewState.h        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/Shared/ViewState.h        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -1,49 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 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 ViewState_h
-#define ViewState_h
-
-namespace WebKit {
-
-struct ViewState {
- enum {
- WindowIsActive = 1 << 0,
- IsFocused = 1 << 1,
- IsVisible = 1 << 2,
- IsInWindow = 1 << 3,
- IsVisuallyIdle = 1 << 4,
- IsLayerWindowServerHosted = 1 << 5,
- };
-
- typedef unsigned Flags;
-
- static const Flags NoFlags = 0;
- static const Flags AllFlags = WindowIsActive | IsFocused | IsVisible | IsInWindow | IsLayerWindowServerHosted | IsVisuallyIdle;
-};
-
-} // namespace WebKit
-
-#endif // ViewState_h
</del></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPageCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx"> encoder << autoSizingShouldExpandToViewHeight;
</span><span class="cx"> encoder.encodeEnum(scrollPinningBehavior);
</span><span class="cx"> encoder << backgroundExtendsBeyondPage;
</span><ins>+ encoder.encodeEnum(layerHostingMode);
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> encoder << colorSpace;
</span><span class="lines">@@ -122,6 +123,8 @@
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(parameters.backgroundExtendsBeyondPage))
</span><span class="cx"> return false;
</span><ins>+ if (!decoder.decodeEnum(parameters.layerHostingMode))
+ return false;
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> if (!decoder.decode(parameters.colorSpace))
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebPageCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebPageCreationParameters.h (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebPageCreationParameters.h        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/Shared/WebPageCreationParameters.h        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -27,8 +27,8 @@
</span><span class="cx"> #define WebPageCreationParameters_h
</span><span class="cx">
</span><span class="cx"> #include "DrawingAreaInfo.h"
</span><ins>+#include "LayerTreeContext.h"
</ins><span class="cx"> #include "SessionState.h"
</span><del>-#include "ViewState.h"
</del><span class="cx"> #include "WebCoreArgumentCoders.h"
</span><span class="cx"> #include "WebPageGroupData.h"
</span><span class="cx"> #include "WebPreferencesStore.h"
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include <WebCore/IntSize.h>
</span><span class="cx"> #include <WebCore/Pagination.h>
</span><span class="cx"> #include <WebCore/ScrollTypes.h>
</span><ins>+#include <WebCore/ViewState.h>
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="lines">@@ -55,7 +56,7 @@
</span><span class="cx">
</span><span class="cx"> WebCore::IntSize viewSize;
</span><span class="cx">
</span><del>- ViewState::Flags viewState;
</del><ins>+ WebCore::ViewState::Flags viewState;
</ins><span class="cx">
</span><span class="cx"> WebPreferencesStore store;
</span><span class="cx"> DrawingAreaType drawingAreaType;
</span><span class="lines">@@ -98,6 +99,8 @@
</span><span class="cx">
</span><span class="cx"> bool backgroundExtendsBeyondPage;
</span><span class="cx">
</span><ins>+ LayerHostingMode layerHostingMode;
+
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> ColorSpaceData colorSpace;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -66,9 +66,7 @@
</span><span class="cx"> virtual bool isViewVisible();
</span><span class="cx"> virtual bool isViewInWindow();
</span><span class="cx"> virtual bool isVisuallyIdle();
</span><del>-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
- virtual bool isLayerWindowServerHosted();
-#endif
</del><ins>+ virtual LayerHostingMode viewLayerHostingMode() OVERRIDE;
</ins><span class="cx"> virtual ColorSpaceData colorSpace() OVERRIDE;
</span><span class="cx"> virtual void setAcceleratedCompositingRootLayer(CALayer *) OVERRIDE;
</span><span class="cx">
</span><span class="lines">@@ -165,9 +163,6 @@
</span><span class="cx"> #if USE(DICTATION_ALTERNATIVES)
</span><span class="cx"> OwnPtr<WebCore::AlternativeTextUIController> m_alternativeTextUIController;
</span><span class="cx"> #endif
</span><del>-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
- bool m_isLayerWindowServerHosted;
-#endif
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #import "DataReference.h"
</span><span class="cx"> #import "DictionaryPopupInfo.h"
</span><span class="cx"> #import "FindIndicator.h"
</span><del>-#import "LayerTreeContext.h"
</del><span class="cx"> #import "NativeWebKeyboardEvent.h"
</span><span class="cx"> #import "StringUtilities.h"
</span><span class="cx"> #import "WKAPICast.h"
</span><span class="lines">@@ -129,9 +128,6 @@
</span><span class="cx"> #if USE(DICTATION_ALTERNATIVES)
</span><span class="cx"> , m_alternativeTextUIController(adoptPtr(new AlternativeTextUIController))
</span><span class="cx"> #endif
</span><del>-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
- , m_isLayerWindowServerHosted(true)
-#endif
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -220,16 +216,14 @@
</span><span class="cx"> return WindowServerConnection::shared().applicationWindowModificationsHaveStopped() || !isViewVisible();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
-bool PageClientImpl::isLayerWindowServerHosted()
</del><ins>+LayerHostingMode PageClientImpl::viewLayerHostingMode()
</ins><span class="cx"> {
</span><del>- // Only update m_isLayerWindowServerHosted when the view is in a window - otherwise just report the last value.
- if ([m_wkView window])
- m_isLayerWindowServerHosted = [[m_wkView window] _hostsLayersInWindowServer];
-
- return m_isLayerWindowServerHosted;
-}
</del><ins>+#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
+ if ([m_wkView window] && [[m_wkView window] _hostsLayersInWindowServer])
+ return LayerHostingModeInWindowServer;
</ins><span class="cx"> #endif
</span><ins>+ return LayerHostingModeDefault;
+}
</ins><span class="cx">
</span><span class="cx"> void PageClientImpl::viewWillMoveToAnotherWindow()
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -111,10 +111,8 @@
</span><span class="cx"> // Return whether the view is visually idle.
</span><span class="cx"> virtual bool isVisuallyIdle() { return !isViewVisible(); }
</span><span class="cx">
</span><del>-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
- // Return whether the layer is window server hosted.
- virtual bool isLayerWindowServerHosted() = 0;
-#endif
</del><ins>+ // Return the layer hosting mode for the view.
+ virtual LayerHostingMode viewLayerHostingMode() { return LayerHostingModeDefault; }
</ins><span class="cx">
</span><span class="cx"> virtual void processDidCrash() = 0;
</span><span class="cx"> virtual void didRelaunchProcess() = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -245,6 +245,7 @@
</span><span class="cx"> , m_pageScaleFactor(1)
</span><span class="cx"> , m_intrinsicDeviceScaleFactor(1)
</span><span class="cx"> , m_customDeviceScaleFactor(0)
</span><ins>+ , m_layerHostingMode(LayerHostingModeDefault)
</ins><span class="cx"> , m_drawsBackground(true)
</span><span class="cx"> , m_drawsTransparentBackground(false)
</span><span class="cx"> , m_areMemoryCacheClientCallsEnabled(true)
</span><span class="lines">@@ -311,6 +312,10 @@
</span><span class="cx"> {
</span><span class="cx"> updateViewState();
</span><span class="cx">
</span><ins>+#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
+ m_layerHostingMode = m_viewState & ViewState::IsInWindow ? m_pageClient.viewLayerHostingMode() : LayerHostingModeInWindowServer;
+#endif
+
</ins><span class="cx"> platformInitialize();
</span><span class="cx">
</span><span class="cx"> #ifndef NDEBUG
</span><span class="lines">@@ -936,10 +941,6 @@
</span><span class="cx"> m_viewState |= ViewState::IsInWindow;
</span><span class="cx"> if (flagsToUpdate & ViewState::IsVisuallyIdle && m_pageClient.isVisuallyIdle())
</span><span class="cx"> m_viewState |= ViewState::IsVisuallyIdle;
</span><del>-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
- if (flagsToUpdate & ViewState::IsLayerWindowServerHosted && m_pageClient.isLayerWindowServerHosted())
- m_viewState |= ViewState::IsLayerWindowServerHosted;
-#endif
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::viewStateDidChange(ViewState::Flags mayHaveChanged, WantsReplyOrNot wantsReply)
</span><span class="lines">@@ -947,9 +948,6 @@
</span><span class="cx"> if (!isValid())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- // If the in-window state may have changed, then so may the layer hosting.
- if (mayHaveChanged & ViewState::IsInWindow)
- mayHaveChanged |= ViewState::IsLayerWindowServerHosted;
</del><span class="cx"> // If the visibility state may have changed, then so may the visually idle.
</span><span class="cx"> if (mayHaveChanged & ViewState::IsVisible)
</span><span class="cx"> mayHaveChanged |= ViewState::IsVisuallyIdle;
</span><span class="lines">@@ -966,17 +964,22 @@
</span><span class="cx"> if (changed & ViewState::IsVisuallyIdle)
</span><span class="cx"> m_process->pageSuppressibilityChanged(this);
</span><span class="cx">
</span><del>- if (changed & ViewState::IsVisible) {
- if (!isViewVisible()) {
- // If we've started the responsiveness timer as part of telling the web process to update the backing store
- // state, it might not send back a reply (since it won't paint anything if the web page is hidden) so we
- // stop the unresponsiveness timer here.
- m_process->responsivenessTimer()->stop();
</del><ins>+ // If we've started the responsiveness timer as part of telling the web process to update the backing store
+ // state, it might not send back a reply (since it won't paint anything if the web page is hidden) so we
+ // stop the unresponsiveness timer here.
+ if ((changed & ViewState::IsVisible) && !isViewVisible())
+ m_process->responsivenessTimer()->stop();
+
+ if ((mayHaveChanged & ViewState::IsInWindow) && (m_viewState & ViewState::IsInWindow)) {
+ LayerHostingMode layerHostingMode = m_pageClient.viewLayerHostingMode();
+ if (m_layerHostingMode != layerHostingMode) {
+ m_layerHostingMode = layerHostingMode;
+ m_process->send(Messages::WebPage::SetLayerHostingMode(layerHostingMode), m_pageID);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INPUT_TYPE_COLOR_POPOVER)
</span><del>- if (mayHaveChanged & ViewState::IsInWindow && !(m_viewState & ViewState::IsInWindow)) {
</del><ins>+ if ((mayHaveChanged & ViewState::IsInWindow) && !(m_viewState & ViewState::IsInWindow)) {
</ins><span class="cx"> // When leaving the current page, close the popover color well.
</span><span class="cx"> if (m_colorPicker)
</span><span class="cx"> endColorPicker();
</span><span class="lines">@@ -3888,6 +3891,7 @@
</span><span class="cx"> m_creationParameters.autoSizingShouldExpandToViewHeight = m_autoSizingShouldExpandToViewHeight;
</span><span class="cx"> m_creationParameters.scrollPinningBehavior = m_scrollPinningBehavior;
</span><span class="cx"> m_creationParameters.backgroundExtendsBeyondPage = m_backgroundExtendsBeyondPage;
</span><ins>+ m_creationParameters.layerHostingMode = m_layerHostingMode;
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC) && !PLATFORM(IOS)
</span><span class="cx"> m_creationParameters.colorSpace = m_pageClient.colorSpace();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -33,13 +33,13 @@
</span><span class="cx"> #include "DrawingAreaProxy.h"
</span><span class="cx"> #include "EditorState.h"
</span><span class="cx"> #include "GeolocationPermissionRequestManagerProxy.h"
</span><ins>+#include "LayerTreeContext.h"
</ins><span class="cx"> #include "MessageSender.h"
</span><span class="cx"> #include "NotificationPermissionRequestManagerProxy.h"
</span><span class="cx"> #include "PageLoadState.h"
</span><span class="cx"> #include "PlatformProcessIdentifier.h"
</span><span class="cx"> #include "SandboxExtension.h"
</span><span class="cx"> #include "ShareableBitmap.h"
</span><del>-#include "ViewState.h"
</del><span class="cx"> #include "WKBase.h"
</span><span class="cx"> #include "WKPagePrivate.h"
</span><span class="cx"> #include "WebColorPicker.h"
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx"> #include <WebCore/ScrollTypes.h>
</span><span class="cx"> #include <WebCore/TextChecking.h>
</span><span class="cx"> #include <WebCore/TextGranularity.h>
</span><ins>+#include <WebCore/ViewState.h>
</ins><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/HashSet.h>
</span><span class="cx"> #include <wtf/OwnPtr.h>
</span><span class="lines">@@ -418,12 +419,12 @@
</span><span class="cx"> void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
</span><span class="cx">
</span><span class="cx"> enum class WantsReplyOrNot { DoesNotWantReply, DoesWantReply };
</span><del>- void viewStateDidChange(ViewState::Flags mayHaveChanged, WantsReplyOrNot = WantsReplyOrNot::DoesNotWantReply);
- bool isInWindow() const { return m_viewState & ViewState::IsInWindow; }
</del><ins>+ void viewStateDidChange(WebCore::ViewState::Flags mayHaveChanged, WantsReplyOrNot = WantsReplyOrNot::DoesNotWantReply);
+ bool isInWindow() const { return m_viewState & WebCore::ViewState::IsInWindow; }
</ins><span class="cx"> void waitForDidUpdateViewState();
</span><span class="cx">
</span><span class="cx"> WebCore::IntSize viewSize() const;
</span><del>- bool isViewVisible() const { return m_viewState & ViewState::IsVisible; }
</del><ins>+ bool isViewVisible() const { return m_viewState & WebCore::ViewState::IsVisible; }
</ins><span class="cx"> bool isViewWindowActive() const;
</span><span class="cx"> bool isProcessSuppressible() const;
</span><span class="cx">
</span><span class="lines">@@ -857,7 +858,7 @@
</span><span class="cx"> void platformInitialize();
</span><span class="cx"> void initializeCreationParameters();
</span><span class="cx">
</span><del>- void updateViewState(ViewState::Flags flagsToUpdate = ViewState::AllFlags);
</del><ins>+ void updateViewState(WebCore::ViewState::Flags flagsToUpdate = WebCore::ViewState::AllFlags);
</ins><span class="cx">
</span><span class="cx"> void resetState();
</span><span class="cx"> void resetStateAfterProcessExited();
</span><span class="lines">@@ -1218,7 +1219,7 @@
</span><span class="cx"> GeolocationPermissionRequestManagerProxy m_geolocationPermissionRequestManager;
</span><span class="cx"> NotificationPermissionRequestManagerProxy m_notificationPermissionRequestManager;
</span><span class="cx">
</span><del>- ViewState::Flags m_viewState;
</del><ins>+ WebCore::ViewState::Flags m_viewState;
</ins><span class="cx">
</span><span class="cx"> bool m_canGoBack;
</span><span class="cx"> bool m_canGoForward;
</span><span class="lines">@@ -1240,6 +1241,8 @@
</span><span class="cx"> float m_intrinsicDeviceScaleFactor;
</span><span class="cx"> float m_customDeviceScaleFactor;
</span><span class="cx">
</span><ins>+ LayerHostingMode m_layerHostingMode;
+
</ins><span class="cx"> bool m_drawsBackground;
</span><span class="cx"> bool m_drawsTransparentBackground;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -782,7 +782,6 @@
</span><span class="cx">                 7CF47FFE17276AE3008ACB91 /* WKBundlePageBannerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7CF47FFC17276AE3008ACB91 /* WKBundlePageBannerMac.mm */; };
</span><span class="cx">                 7CF47FFF17276AE3008ACB91 /* WKBundlePageBannerMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CF47FFD17276AE3008ACB91 /* WKBundlePageBannerMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 84477853176FCC0800CDC7BB /* InjectedBundleHitTestResultMediaType.h in Headers */ = {isa = PBXBuildFile; fileRef = 84477851176FCAC100CDC7BB /* InjectedBundleHitTestResultMediaType.h */; };
</span><del>-                865E0485181A094A001F72F2 /* ViewState.h in Headers */ = {isa = PBXBuildFile; fileRef = 865E0484181A090D001F72F2 /* ViewState.h */; };
</del><span class="cx">                 868160D0187645570021E79D /* WindowServerConnection.mm in Sources */ = {isa = PBXBuildFile; fileRef = 868160CF187645370021E79D /* WindowServerConnection.mm */; };
</span><span class="cx">                 8CFECE941490F140002AAA32 /* EditorState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CFECE931490F140002AAA32 /* EditorState.cpp */; };
</span><span class="cx">                 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
</span><span class="lines">@@ -2402,7 +2401,6 @@
</span><span class="cx">                 7CF47FFC17276AE3008ACB91 /* WKBundlePageBannerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKBundlePageBannerMac.mm; sourceTree = "<group>"; };
</span><span class="cx">                 7CF47FFD17276AE3008ACB91 /* WKBundlePageBannerMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundlePageBannerMac.h; sourceTree = "<group>"; };
</span><span class="cx">                 84477851176FCAC100CDC7BB /* InjectedBundleHitTestResultMediaType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundleHitTestResultMediaType.h; sourceTree = "<group>"; };
</span><del>-                865E0484181A090D001F72F2 /* ViewState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewState.h; sourceTree = "<group>"; };
</del><span class="cx">                 868160CD18763D4B0021E79D /* WindowServerConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WindowServerConnection.h; sourceTree = "<group>"; };
</span><span class="cx">                 868160CF187645370021E79D /* WindowServerConnection.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WindowServerConnection.mm; sourceTree = "<group>"; };
</span><span class="cx">                 8CFECE931490F140002AAA32 /* EditorState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EditorState.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -3581,7 +3579,6 @@
</span><span class="cx">                                 1AC1336518565B5700F3EC05 /* UserData.cpp */,
</span><span class="cx">                                 1AC1336618565B5700F3EC05 /* UserData.h */,
</span><span class="cx">                                 BCB0B0DF12305AB100B1341E /* UserMessageCoders.h */,
</span><del>-                                865E0484181A090D001F72F2 /* ViewState.h */,
</del><span class="cx">                                 1A0F29C9120B37160053D1B9 /* VisitedLinkTable.cpp */,
</span><span class="cx">                                 1A0F29CA120B37160053D1B9 /* VisitedLinkTable.h */,
</span><span class="cx">                                 BC329D9916ACCE9900316DE2 /* WebArchive.cpp */,
</span><span class="lines">@@ -5771,7 +5768,6 @@
</span><span class="cx">                                 515E7730184015800007203F /* UniqueIDBDatabase.h in Headers */,
</span><span class="cx">                                 B878B615133428DC006888E9 /* CorrectionPanel.h in Headers */,
</span><span class="cx">                                 2989A414167D184B004F96D2 /* CustomProtocolManager.h in Headers */,
</span><del>-                                865E0485181A094A001F72F2 /* ViewState.h in Headers */,
</del><span class="cx">                                 371B32DE184D67490013E2B2 /* WKNSURLProtectionSpace.h in Headers */,
</span><span class="cx">                                 2984F589164BA095004BC0C6 /* CustomProtocolManagerMessages.h in Headers */,
</span><span class="cx">                                 29AD3093164B4C5D0072DEA9 /* CustomProtocolManagerProxy.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPluginViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -364,6 +364,21 @@
</span><span class="cx"> initializePlugin();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void PluginView::setLayerHostingMode(LayerHostingMode layerHostingMode)
+{
+#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
+ if (!m_plugin)
+ return;
+
+ if (m_isInitialized)
+ m_plugin->setLayerHostingMode(layerHostingMode);
+ else
+ m_parameters.layerHostingMode = layerHostingMode;
+#else
+ UNUSED_PARAM(layerHostingMode);
+#endif
+}
+
</ins><span class="cx"> Frame* PluginView::frame() const
</span><span class="cx"> {
</span><span class="cx"> return m_pluginElement->document().frame();
</span><span class="lines">@@ -491,24 +506,13 @@
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> void PluginView::platformViewStateDidChange(ViewState::Flags changed)
</span><span class="cx"> {
</span><del>- if (!m_plugin)
</del><ins>+ if (!m_plugin || !m_isInitialized)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- if (!m_isInitialized) {
-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
- m_parameters.layerHostingMode = m_webPage->layerHostingMode();
-#endif
- return;
- }
-
</del><span class="cx"> if (changed & ViewState::IsVisible)
</span><span class="cx"> m_plugin->windowVisibilityChanged(m_webPage->isVisible());
</span><span class="cx"> if (changed & ViewState::WindowIsActive)
</span><span class="cx"> m_plugin->windowFocusChanged(m_webPage->windowIsFocused());
</span><del>-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
- if (changed & ViewState::IsLayerWindowServerHosted)
- m_plugin->setLayerHostingMode(m_webPage->layerHostingMode());
-#endif
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PluginView::setDeviceScaleFactor(float scaleFactor)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPluginViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.h (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.h        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.h        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -26,10 +26,10 @@
</span><span class="cx"> #ifndef PluginView_h
</span><span class="cx"> #define PluginView_h
</span><span class="cx">
</span><ins>+#include "LayerTreeContext.h"
</ins><span class="cx"> #include "NPRuntimeObjectMap.h"
</span><span class="cx"> #include "Plugin.h"
</span><span class="cx"> #include "PluginController.h"
</span><del>-#include "ViewState.h"
</del><span class="cx"> #include "WebFrame.h"
</span><span class="cx"> #include <WebCore/FindOptions.h>
</span><span class="cx"> #include <WebCore/Image.h>
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> #include <WebCore/ResourceError.h>
</span><span class="cx"> #include <WebCore/ResourceResponse.h>
</span><span class="cx"> #include <WebCore/Timer.h>
</span><ins>+#include <WebCore/ViewState.h>
</ins><span class="cx"> #include <wtf/Deque.h>
</span><span class="cx"> #include <wtf/RunLoop.h>
</span><span class="cx">
</span><span class="lines">@@ -69,10 +70,11 @@
</span><span class="cx"> void manualLoadDidFinishLoading();
</span><span class="cx"> void manualLoadDidFail(const WebCore::ResourceError&);
</span><span class="cx">
</span><del>- void viewStateDidChange(ViewState::Flags changed);
</del><ins>+ void viewStateDidChange(WebCore::ViewState::Flags changed);
+ void setLayerHostingMode(LayerHostingMode);
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>- void platformViewStateDidChange(ViewState::Flags changed);
</del><ins>+ void platformViewStateDidChange(WebCore::ViewState::Flags changed);
</ins><span class="cx"> void setDeviceScaleFactor(float);
</span><span class="cx"> void windowAndViewFramesChanged(const WebCore::FloatRect& windowFrameInScreenCoordinates, const WebCore::FloatRect& viewFrameInWindowCoordinates);
</span><span class="cx"> bool sendComplexTextInput(uint64_t pluginComplexTextInputIdentifier, const String& textInput);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -28,9 +28,9 @@
</span><span class="cx">
</span><span class="cx"> #include "DrawingAreaInfo.h"
</span><span class="cx"> #include "LayerTreeContext.h"
</span><del>-#include "ViewState.h"
</del><span class="cx"> #include <WebCore/FloatPoint.h>
</span><span class="cx"> #include <WebCore/IntRect.h>
</span><ins>+#include <WebCore/ViewState.h>
</ins><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><span class="cx">
</span><span class="lines">@@ -108,7 +108,8 @@
</span><span class="cx">
</span><span class="cx"> virtual void dispatchAfterEnsuringUpdatedScrollPosition(const Function<void ()>&);
</span><span class="cx">
</span><del>- virtual void viewStateDidChange(ViewState::Flags) { }
</del><ins>+ virtual void viewStateDidChange(WebCore::ViewState::Flags) { }
+ virtual void setLayerHostingMode(LayerHostingMode) { }
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> DrawingArea(DrawingAreaType, WebPage*);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -241,6 +241,7 @@
</span><span class="cx"> , m_numberOfPrimarySnapshotDetectionAttempts(0)
</span><span class="cx"> , m_determinePrimarySnapshottedPlugInTimer(RunLoop::main(), this, &WebPage::determinePrimarySnapshottedPlugInTimerFired)
</span><span class="cx"> #endif
</span><ins>+ , m_layerHostingMode(parameters.layerHostingMode)
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> , m_pdfPluginEnabled(false)
</span><span class="cx"> , m_hasCachedWindowFrame(false)
</span><span class="lines">@@ -2092,6 +2093,16 @@
</span><span class="cx"> m_sendDidUpdateViewStateTimer.startOneShot(0);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebPage::setLayerHostingMode(unsigned layerHostingMode)
+{
+ m_layerHostingMode = static_cast<LayerHostingMode>(layerHostingMode);
+
+ m_drawingArea->setLayerHostingMode(m_layerHostingMode);
+
+ for (auto* pluginView : m_pluginViews)
+ pluginView->setLayerHostingMode(m_layerHostingMode);
+}
+
</ins><span class="cx"> void WebPage::didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
</span><span class="cx"> {
</span><span class="cx"> WebFrame* frame = WebProcess::shared().webFrame(frameID);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -45,7 +45,6 @@
</span><span class="cx"> #include "Plugin.h"
</span><span class="cx"> #include "SandboxExtension.h"
</span><span class="cx"> #include "ShareableBitmap.h"
</span><del>-#include "ViewState.h"
</del><span class="cx"> #include "WebUndoStep.h"
</span><span class="cx"> #include <WebCore/DictationAlternative.h>
</span><span class="cx"> #include <WebCore/DragData.h>
</span><span class="lines">@@ -58,6 +57,7 @@
</span><span class="cx"> #include <WebCore/ScrollTypes.h>
</span><span class="cx"> #include <WebCore/TextChecking.h>
</span><span class="cx"> #include <WebCore/UserActivity.h>
</span><ins>+#include <WebCore/ViewState.h>
</ins><span class="cx"> #include <WebCore/WebCoreKeyboardUIMode.h>
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/OwnPtr.h>
</span><span class="lines">@@ -347,18 +347,12 @@
</span><span class="cx"> void addPluginView(PluginView*);
</span><span class="cx"> void removePluginView(PluginView*);
</span><span class="cx">
</span><del>- bool isVisible() const { return m_viewState & ViewState::IsVisible; }
</del><ins>+ bool isVisible() const { return m_viewState & WebCore::ViewState::IsVisible; }
</ins><span class="cx">
</span><del>-#if PLATFORM(MAC)
- LayerHostingMode layerHostingMode() const
- {
-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
- return m_viewState & ViewState::IsLayerWindowServerHosted ? LayerHostingModeInWindowServer : LayerHostingModeDefault;
-#else
- return LayerHostingModeDefault;
-#endif
- }
</del><ins>+ LayerHostingMode layerHostingMode() const { return m_layerHostingMode; }
+ void setLayerHostingMode(unsigned);
</ins><span class="cx">
</span><ins>+#if PLATFORM(MAC)
</ins><span class="cx"> void updatePluginsActiveAndFocusedState();
</span><span class="cx"> const WebCore::FloatRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; }
</span><span class="cx"> const WebCore::FloatRect& windowFrameInUnflippedScreenCoordinates() const { return m_windowFrameInUnflippedScreenCoordinates; }
</span><span class="lines">@@ -732,7 +726,7 @@
</span><span class="cx"> void setWindowResizerSize(const WebCore::IntSize&);
</span><span class="cx"> void setIsInWindow(bool);
</span><span class="cx"> void setIsVisuallyIdle(bool);
</span><del>- void setViewState(ViewState::Flags, bool wantsDidUpdateViewState);
</del><ins>+ void setViewState(WebCore::ViewState::Flags, bool wantsDidUpdateViewState);
</ins><span class="cx"> void validateCommand(const String&, uint64_t);
</span><span class="cx"> void executeEditCommand(const String&);
</span><span class="cx">
</span><span class="lines">@@ -913,6 +907,9 @@
</span><span class="cx"> RunLoop::Timer<WebPage> m_determinePrimarySnapshottedPlugInTimer;
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ // The layer hosting mode.
+ LayerHostingMode m_layerHostingMode;
+
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> bool m_pdfPluginEnabled;
</span><span class="cx">
</span><span class="lines">@@ -1045,7 +1042,7 @@
</span><span class="cx">
</span><span class="cx"> bool m_useAsyncScrolling;
</span><span class="cx">
</span><del>- ViewState::Flags m_viewState;
</del><ins>+ WebCore::ViewState::Flags m_viewState;
</ins><span class="cx">
</span><span class="cx"> UserActivity m_processSuppressionDisabledByWebPreference;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -23,6 +23,7 @@
</span><span class="cx"> messages -> WebPage LegacyReceiver {
</span><span class="cx"> SetInitialFocus(bool forward, bool isKeyboardEventValid, WebKit::WebKeyboardEvent event)
</span><span class="cx"> SetViewState(unsigned viewState, bool wantsDidUpdateViewState)
</span><ins>+ SetLayerHostingMode(unsigned layerHostingMode)
</ins><span class="cx">
</span><span class="cx"> SetDrawsBackground(bool drawsBackground)
</span><span class="cx"> SetDrawsTransparentBackground(bool drawsTransparentBackground)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> TiledCoreAnimationDrawingArea(WebPage*, const WebPageCreationParameters&);
</span><span class="cx"> virtual ~TiledCoreAnimationDrawingArea();
</span><span class="cx">
</span><del>- virtual void viewStateDidChange(ViewState::Flags changed) OVERRIDE;
</del><ins>+ virtual void viewStateDidChange(WebCore::ViewState::Flags changed) OVERRIDE;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> // DrawingArea
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx"> virtual void setDeviceScaleFactor(float) OVERRIDE;
</span><span class="cx"> void suspendPainting();
</span><span class="cx"> void resumePainting();
</span><del>- void setLayerHostingMode(LayerHostingMode);
</del><ins>+ void setLayerHostingMode(LayerHostingMode) OVERRIDE;
</ins><span class="cx"> virtual void setColorSpace(const ColorSpaceData&) OVERRIDE;
</span><span class="cx">
</span><span class="cx"> virtual void adjustTransientZoom(double scale, WebCore::FloatPoint origin) OVERRIDE;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (161356 => 161357)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-01-06 19:20:41 UTC (rev 161356)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-01-06 19:29:11 UTC (rev 161357)
</span><span class="lines">@@ -397,11 +397,6 @@
</span><span class="cx"> else
</span><span class="cx"> suspendPainting();
</span><span class="cx"> }
</span><del>-
-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
- if (changed & ViewState::IsLayerWindowServerHosted)
- setLayerHostingMode(m_webPage->layerHostingMode());
-#endif
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TiledCoreAnimationDrawingArea::suspendPainting()
</span></span></pre>
</div>
</div>
</body>
</html>