<!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>[236917] 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/236917">236917</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2018-10-08 10:12:38 -0700 (Mon, 08 Oct 2018)</dd>
</dl>

<h3>Log Message</h3>
<pre>Have DOMWindowProperty get is frame from its associated DOMWindow
https://bugs.webkit.org/show_bug.cgi?id=190341

Reviewed by Alex Christensen.

Source/WebCore:

Have DOMWindowProperty get is frame from its associated DOMWindow, instead of having its own
m_frame that can potentially get out-of-sync.

* Modules/cache/DOMWindowCaches.cpp:
(WebCore::DOMWindowCaches::DOMWindowCaches):
* Modules/geolocation/NavigatorGeolocation.cpp:
(WebCore::NavigatorGeolocation::NavigatorGeolocation):
(WebCore::NavigatorGeolocation::from):
* Modules/geolocation/NavigatorGeolocation.h:
* Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
(WebCore::DOMWindowIndexedDatabase::DOMWindowIndexedDatabase):
* Modules/mediastream/NavigatorMediaDevices.cpp:
(WebCore::NavigatorMediaDevices::NavigatorMediaDevices):
(WebCore::NavigatorMediaDevices::from):
* Modules/mediastream/NavigatorMediaDevices.h:
* Modules/quota/DOMWindowQuota.cpp:
(WebCore::DOMWindowQuota::DOMWindowQuota):
* Modules/quota/NavigatorStorageQuota.cpp:
(WebCore::NavigatorStorageQuota::NavigatorStorageQuota):
* Modules/quota/NavigatorStorageQuota.h:
* Modules/speech/DOMWindowSpeechSynthesis.cpp:
(WebCore::DOMWindowSpeechSynthesis::DOMWindowSpeechSynthesis):
* css/StyleMedia.cpp:
(WebCore::StyleMedia::StyleMedia):
(WebCore::StyleMedia::type const):
(WebCore::StyleMedia::matchMedium const):
* css/StyleMedia.h:
* loader/appcache/DOMApplicationCache.cpp:
(WebCore::DOMApplicationCache::DOMApplicationCache):
(WebCore::DOMApplicationCache::applicationCacheHost const):
(WebCore::DOMApplicationCache::scriptExecutionContext const):
* loader/appcache/DOMApplicationCache.h:
* page/BarProp.cpp:
(WebCore::BarProp::BarProp):
(WebCore::BarProp::visible const):
* page/BarProp.h:
(WebCore::BarProp::create):
* page/DOMSelection.cpp:
(WebCore::DOMSelection::DOMSelection):
(WebCore::DOMSelection::visibleSelection const):
(WebCore::DOMSelection::anchorNode const):
(WebCore::DOMSelection::anchorOffset const):
(WebCore::DOMSelection::focusNode const):
(WebCore::DOMSelection::focusOffset const):
(WebCore::DOMSelection::baseNode const):
(WebCore::DOMSelection::baseOffset const):
(WebCore::DOMSelection::extentNode const):
(WebCore::DOMSelection::extentOffset const):
(WebCore::DOMSelection::isCollapsed const):
(WebCore::DOMSelection::type const):
(WebCore::DOMSelection::rangeCount const):
(WebCore::DOMSelection::collapse):
(WebCore::DOMSelection::collapseToEnd):
(WebCore::DOMSelection::collapseToStart):
(WebCore::DOMSelection::empty):
(WebCore::DOMSelection::setBaseAndExtent):
(WebCore::DOMSelection::setPosition):
(WebCore::DOMSelection::modify):
(WebCore::DOMSelection::extend):
(WebCore::DOMSelection::getRangeAt):
(WebCore::DOMSelection::removeAllRanges):
(WebCore::DOMSelection::addRange):
(WebCore::DOMSelection::deleteFromDocument):
(WebCore::DOMSelection::containsNode const):
(WebCore::DOMSelection::toString):
(WebCore::DOMSelection::shadowAdjustedNode const):
(WebCore::DOMSelection::shadowAdjustedOffset const):
(WebCore::DOMSelection::isValidForPosition const):
* page/DOMSelection.h:
(WebCore::DOMSelection::create):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::screen):
(WebCore::DOMWindow::history):
(WebCore::DOMWindow::locationbar):
(WebCore::DOMWindow::menubar):
(WebCore::DOMWindow::personalbar):
(WebCore::DOMWindow::scrollbars):
(WebCore::DOMWindow::statusbar):
(WebCore::DOMWindow::toolbar):
(WebCore::DOMWindow::applicationCache):
(WebCore::DOMWindow::navigator):
(WebCore::DOMWindow::location):
(WebCore::DOMWindow::visualViewport):
(WebCore::DOMWindow::webkitNamespace):
(WebCore::DOMWindow::getSelection):
(WebCore::DOMWindow::styleMedia):
* page/DOMWindow.h:
* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::DOMWindowExtension):
* page/DOMWindowExtension.h:
(WebCore::DOMWindowExtension::create):
* page/DOMWindowProperty.cpp:
(WebCore::DOMWindowProperty::DOMWindowProperty):
(WebCore::DOMWindowProperty::~DOMWindowProperty):
(WebCore::DOMWindowProperty::disconnectFrameForDocumentSuspension):
(WebCore::DOMWindowProperty::reconnectFrameFromDocumentSuspension):
(WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
(WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
(WebCore::DOMWindowProperty::willDetachGlobalObjectFromFrame):
(WebCore::DOMWindowProperty::frame const):
* page/DOMWindowProperty.h:
(WebCore::DOMWindowProperty::window const):
* page/History.cpp:
(WebCore::History::History):
(WebCore::History::length const):
(WebCore::History::scrollRestoration const):
(WebCore::History::setScrollRestoration):
(WebCore::History::stateInternal const):
(WebCore::History::go):
(WebCore::History::urlForState):
(WebCore::History::stateObjectAdded):
* page/History.h:
* page/Location.cpp:
(WebCore::Location::Location):
(WebCore::Location::url const):
(WebCore::Location::href const):
(WebCore::Location::protocol const):
(WebCore::Location::host const):
(WebCore::Location::hostname const):
(WebCore::Location::port const):
(WebCore::Location::pathname const):
(WebCore::Location::search const):
(WebCore::Location::origin const):
(WebCore::Location::ancestorOrigins const):
(WebCore::Location::hash const):
(WebCore::Location::setHref):
(WebCore::Location::setProtocol):
(WebCore::Location::setHost):
(WebCore::Location::setHostname):
(WebCore::Location::setPort):
(WebCore::Location::setPathname):
(WebCore::Location::setSearch):
(WebCore::Location::setHash):
(WebCore::Location::assign):
(WebCore::Location::replace):
(WebCore::Location::reload):
(WebCore::Location::setLocation):
* page/Location.h:
(WebCore::Location::create):
* page/Navigator.cpp:
(WebCore::Navigator::Navigator):
(WebCore::Navigator::appVersion const):
(WebCore::Navigator::userAgent const):
(WebCore::Navigator::share):
(WebCore::Navigator::plugins):
(WebCore::Navigator::mimeTypes):
(WebCore::Navigator::cookieEnabled const):
(WebCore::Navigator::javaEnabled const):
(WebCore::Navigator::standalone const):
* page/Navigator.h:
* page/Performance.cpp:
(WebCore::Performance::navigation):
(WebCore::Performance::timing):
* page/PerformanceNavigation.cpp:
(WebCore::PerformanceNavigation::PerformanceNavigation):
(WebCore::PerformanceNavigation::type const):
(WebCore::PerformanceNavigation::redirectCount const):
* page/PerformanceNavigation.h:
(WebCore::PerformanceNavigation::create):
* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::PerformanceTiming):
(WebCore::PerformanceTiming::documentLoader const):
(WebCore::PerformanceTiming::documentTiming const):
* page/PerformanceTiming.h:
(WebCore::PerformanceTiming::create):
* page/Screen.cpp:
(WebCore::Screen::Screen):
(WebCore::Screen::height const):
(WebCore::Screen::width const):
(WebCore::Screen::colorDepth const):
(WebCore::Screen::pixelDepth const):
(WebCore::Screen::availLeft const):
(WebCore::Screen::availTop const):
(WebCore::Screen::availHeight const):
(WebCore::Screen::availWidth const):
* page/Screen.h:
* page/VisualViewport.cpp:
(WebCore::VisualViewport::VisualViewport):
(WebCore::VisualViewport::scriptExecutionContext const):
(WebCore::VisualViewport::addEventListener):
(WebCore::VisualViewport::updateFrameLayout const):
(WebCore::VisualViewport::offsetLeft const):
(WebCore::VisualViewport::offsetTop const):
(WebCore::VisualViewport::pageLeft const):
(WebCore::VisualViewport::pageTop const):
(WebCore::VisualViewport::width const):
(WebCore::VisualViewport::height const):
(WebCore::VisualViewport::scale const):
(WebCore::VisualViewport::update):
(WebCore::VisualViewport::enqueueResizeEvent):
(WebCore::VisualViewport::enqueueScrollEvent):
* page/VisualViewport.h:
* page/WebKitNamespace.cpp:
(WebCore::WebKitNamespace::WebKitNamespace):
* page/WebKitNamespace.h:
(WebCore::WebKitNamespace::create):
* plugins/DOMMimeTypeArray.cpp:
(WebCore::DOMMimeTypeArray::DOMMimeTypeArray):
(WebCore::DOMMimeTypeArray::item):
(WebCore::DOMMimeTypeArray::namedItem):
(WebCore::DOMMimeTypeArray::getPluginData const):
* plugins/DOMMimeTypeArray.h:
(WebCore::DOMMimeTypeArray::create):
* plugins/DOMPluginArray.cpp:
(WebCore::DOMPluginArray::DOMPluginArray):
(WebCore::DOMPluginArray::item):
(WebCore::DOMPluginArray::namedItem):
(WebCore::DOMPluginArray::refresh):
(WebCore::DOMPluginArray::pluginData const):
* plugins/DOMPluginArray.h:
(WebCore::DOMPluginArray::create):
* storage/Storage.cpp:
(WebCore::Storage::create):
(WebCore::Storage::Storage):
(WebCore::Storage::setItem):
(WebCore::Storage::removeItem):
(WebCore::Storage::clear):
* storage/Storage.h:

Source/WebKit:

* WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
(WebKit::InjectedBundleDOMWindowExtension::InjectedBundleDOMWindowExtension):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulescacheDOMWindowCachescpp">trunk/Source/WebCore/Modules/cache/DOMWindowCaches.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationNavigatorGeolocationcpp">trunk/Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationNavigatorGeolocationh">trunk/Source/WebCore/Modules/geolocation/NavigatorGeolocation.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbDOMWindowIndexedDatabasecpp">trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamNavigatorMediaDevicescpp">trunk/Source/WebCore/Modules/mediastream/NavigatorMediaDevices.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamNavigatorMediaDevicesh">trunk/Source/WebCore/Modules/mediastream/NavigatorMediaDevices.h</a></li>
<li><a href="#trunkSourceWebCoreModulesquotaDOMWindowQuotacpp">trunk/Source/WebCore/Modules/quota/DOMWindowQuota.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesquotaNavigatorStorageQuotacpp">trunk/Source/WebCore/Modules/quota/NavigatorStorageQuota.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesquotaNavigatorStorageQuotah">trunk/Source/WebCore/Modules/quota/NavigatorStorageQuota.h</a></li>
<li><a href="#trunkSourceWebCoreModulesspeechDOMWindowSpeechSynthesiscpp">trunk/Source/WebCore/Modules/speech/DOMWindowSpeechSynthesis.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleMediacpp">trunk/Source/WebCore/css/StyleMedia.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleMediah">trunk/Source/WebCore/css/StyleMedia.h</a></li>
<li><a href="#trunkSourceWebCoreloaderappcacheDOMApplicationCachecpp">trunk/Source/WebCore/loader/appcache/DOMApplicationCache.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderappcacheDOMApplicationCacheh">trunk/Source/WebCore/loader/appcache/DOMApplicationCache.h</a></li>
<li><a href="#trunkSourceWebCorepageBarPropcpp">trunk/Source/WebCore/page/BarProp.cpp</a></li>
<li><a href="#trunkSourceWebCorepageBarProph">trunk/Source/WebCore/page/BarProp.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMSelectioncpp">trunk/Source/WebCore/page/DOMSelection.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMSelectionh">trunk/Source/WebCore/page/DOMSelection.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowcpp">trunk/Source/WebCore/page/DOMWindow.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowh">trunk/Source/WebCore/page/DOMWindow.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowExtensioncpp">trunk/Source/WebCore/page/DOMWindowExtension.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowExtensionh">trunk/Source/WebCore/page/DOMWindowExtension.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowPropertycpp">trunk/Source/WebCore/page/DOMWindowProperty.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowPropertyh">trunk/Source/WebCore/page/DOMWindowProperty.h</a></li>
<li><a href="#trunkSourceWebCorepageHistorycpp">trunk/Source/WebCore/page/History.cpp</a></li>
<li><a href="#trunkSourceWebCorepageHistoryh">trunk/Source/WebCore/page/History.h</a></li>
<li><a href="#trunkSourceWebCorepageLocationcpp">trunk/Source/WebCore/page/Location.cpp</a></li>
<li><a href="#trunkSourceWebCorepageLocationh">trunk/Source/WebCore/page/Location.h</a></li>
<li><a href="#trunkSourceWebCorepageNavigatorcpp">trunk/Source/WebCore/page/Navigator.cpp</a></li>
<li><a href="#trunkSourceWebCorepageNavigatorh">trunk/Source/WebCore/page/Navigator.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformancecpp">trunk/Source/WebCore/page/Performance.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceNavigationcpp">trunk/Source/WebCore/page/PerformanceNavigation.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceNavigationh">trunk/Source/WebCore/page/PerformanceNavigation.h</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceTimingcpp">trunk/Source/WebCore/page/PerformanceTiming.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceTimingh">trunk/Source/WebCore/page/PerformanceTiming.h</a></li>
<li><a href="#trunkSourceWebCorepageScreencpp">trunk/Source/WebCore/page/Screen.cpp</a></li>
<li><a href="#trunkSourceWebCorepageScreenh">trunk/Source/WebCore/page/Screen.h</a></li>
<li><a href="#trunkSourceWebCorepageVisualViewportcpp">trunk/Source/WebCore/page/VisualViewport.cpp</a></li>
<li><a href="#trunkSourceWebCorepageVisualViewporth">trunk/Source/WebCore/page/VisualViewport.h</a></li>
<li><a href="#trunkSourceWebCorepageWebKitNamespacecpp">trunk/Source/WebCore/page/WebKitNamespace.cpp</a></li>
<li><a href="#trunkSourceWebCorepageWebKitNamespaceh">trunk/Source/WebCore/page/WebKitNamespace.h</a></li>
<li><a href="#trunkSourceWebCorepluginsDOMMimeTypeArraycpp">trunk/Source/WebCore/plugins/DOMMimeTypeArray.cpp</a></li>
<li><a href="#trunkSourceWebCorepluginsDOMMimeTypeArrayh">trunk/Source/WebCore/plugins/DOMMimeTypeArray.h</a></li>
<li><a href="#trunkSourceWebCorepluginsDOMPluginArraycpp">trunk/Source/WebCore/plugins/DOMPluginArray.cpp</a></li>
<li><a href="#trunkSourceWebCorepluginsDOMPluginArrayh">trunk/Source/WebCore/plugins/DOMPluginArray.h</a></li>
<li><a href="#trunkSourceWebCorestorageStoragecpp">trunk/Source/WebCore/storage/Storage.cpp</a></li>
<li><a href="#trunkSourceWebCorestorageStorageh">trunk/Source/WebCore/storage/Storage.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebProcessInjectedBundleAPIglibDOMDOMObjectCachecpp">trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessInjectedBundleInjectedBundleDOMWindowExtensioncpp">trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/ChangeLog      2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -1,3 +1,229 @@
</span><ins>+2018-10-08  Chris Dumez  <cdumez@apple.com>
+
+        Have DOMWindowProperty get is frame from its associated DOMWindow
+        https://bugs.webkit.org/show_bug.cgi?id=190341
+
+        Reviewed by Alex Christensen.
+
+        Have DOMWindowProperty get is frame from its associated DOMWindow, instead of having its own
+        m_frame that can potentially get out-of-sync.
+
+        * Modules/cache/DOMWindowCaches.cpp:
+        (WebCore::DOMWindowCaches::DOMWindowCaches):
+        * Modules/geolocation/NavigatorGeolocation.cpp:
+        (WebCore::NavigatorGeolocation::NavigatorGeolocation):
+        (WebCore::NavigatorGeolocation::from):
+        * Modules/geolocation/NavigatorGeolocation.h:
+        * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
+        (WebCore::DOMWindowIndexedDatabase::DOMWindowIndexedDatabase):
+        * Modules/mediastream/NavigatorMediaDevices.cpp:
+        (WebCore::NavigatorMediaDevices::NavigatorMediaDevices):
+        (WebCore::NavigatorMediaDevices::from):
+        * Modules/mediastream/NavigatorMediaDevices.h:
+        * Modules/quota/DOMWindowQuota.cpp:
+        (WebCore::DOMWindowQuota::DOMWindowQuota):
+        * Modules/quota/NavigatorStorageQuota.cpp:
+        (WebCore::NavigatorStorageQuota::NavigatorStorageQuota):
+        * Modules/quota/NavigatorStorageQuota.h:
+        * Modules/speech/DOMWindowSpeechSynthesis.cpp:
+        (WebCore::DOMWindowSpeechSynthesis::DOMWindowSpeechSynthesis):
+        * css/StyleMedia.cpp:
+        (WebCore::StyleMedia::StyleMedia):
+        (WebCore::StyleMedia::type const):
+        (WebCore::StyleMedia::matchMedium const):
+        * css/StyleMedia.h:
+        * loader/appcache/DOMApplicationCache.cpp:
+        (WebCore::DOMApplicationCache::DOMApplicationCache):
+        (WebCore::DOMApplicationCache::applicationCacheHost const):
+        (WebCore::DOMApplicationCache::scriptExecutionContext const):
+        * loader/appcache/DOMApplicationCache.h:
+        * page/BarProp.cpp:
+        (WebCore::BarProp::BarProp):
+        (WebCore::BarProp::visible const):
+        * page/BarProp.h:
+        (WebCore::BarProp::create):
+        * page/DOMSelection.cpp:
+        (WebCore::DOMSelection::DOMSelection):
+        (WebCore::DOMSelection::visibleSelection const):
+        (WebCore::DOMSelection::anchorNode const):
+        (WebCore::DOMSelection::anchorOffset const):
+        (WebCore::DOMSelection::focusNode const):
+        (WebCore::DOMSelection::focusOffset const):
+        (WebCore::DOMSelection::baseNode const):
+        (WebCore::DOMSelection::baseOffset const):
+        (WebCore::DOMSelection::extentNode const):
+        (WebCore::DOMSelection::extentOffset const):
+        (WebCore::DOMSelection::isCollapsed const):
+        (WebCore::DOMSelection::type const):
+        (WebCore::DOMSelection::rangeCount const):
+        (WebCore::DOMSelection::collapse):
+        (WebCore::DOMSelection::collapseToEnd):
+        (WebCore::DOMSelection::collapseToStart):
+        (WebCore::DOMSelection::empty):
+        (WebCore::DOMSelection::setBaseAndExtent):
+        (WebCore::DOMSelection::setPosition):
+        (WebCore::DOMSelection::modify):
+        (WebCore::DOMSelection::extend):
+        (WebCore::DOMSelection::getRangeAt):
+        (WebCore::DOMSelection::removeAllRanges):
+        (WebCore::DOMSelection::addRange):
+        (WebCore::DOMSelection::deleteFromDocument):
+        (WebCore::DOMSelection::containsNode const):
+        (WebCore::DOMSelection::toString):
+        (WebCore::DOMSelection::shadowAdjustedNode const):
+        (WebCore::DOMSelection::shadowAdjustedOffset const):
+        (WebCore::DOMSelection::isValidForPosition const):
+        * page/DOMSelection.h:
+        (WebCore::DOMSelection::create):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::screen):
+        (WebCore::DOMWindow::history):
+        (WebCore::DOMWindow::locationbar):
+        (WebCore::DOMWindow::menubar):
+        (WebCore::DOMWindow::personalbar):
+        (WebCore::DOMWindow::scrollbars):
+        (WebCore::DOMWindow::statusbar):
+        (WebCore::DOMWindow::toolbar):
+        (WebCore::DOMWindow::applicationCache):
+        (WebCore::DOMWindow::navigator):
+        (WebCore::DOMWindow::location):
+        (WebCore::DOMWindow::visualViewport):
+        (WebCore::DOMWindow::webkitNamespace):
+        (WebCore::DOMWindow::getSelection):
+        (WebCore::DOMWindow::styleMedia):
+        * page/DOMWindow.h:
+        * page/DOMWindowExtension.cpp:
+        (WebCore::DOMWindowExtension::DOMWindowExtension):
+        * page/DOMWindowExtension.h:
+        (WebCore::DOMWindowExtension::create):
+        * page/DOMWindowProperty.cpp:
+        (WebCore::DOMWindowProperty::DOMWindowProperty):
+        (WebCore::DOMWindowProperty::~DOMWindowProperty):
+        (WebCore::DOMWindowProperty::disconnectFrameForDocumentSuspension):
+        (WebCore::DOMWindowProperty::reconnectFrameFromDocumentSuspension):
+        (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
+        (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
+        (WebCore::DOMWindowProperty::willDetachGlobalObjectFromFrame):
+        (WebCore::DOMWindowProperty::frame const):
+        * page/DOMWindowProperty.h:
+        (WebCore::DOMWindowProperty::window const):
+        * page/History.cpp:
+        (WebCore::History::History):
+        (WebCore::History::length const):
+        (WebCore::History::scrollRestoration const):
+        (WebCore::History::setScrollRestoration):
+        (WebCore::History::stateInternal const):
+        (WebCore::History::go):
+        (WebCore::History::urlForState):
+        (WebCore::History::stateObjectAdded):
+        * page/History.h:
+        * page/Location.cpp:
+        (WebCore::Location::Location):
+        (WebCore::Location::url const):
+        (WebCore::Location::href const):
+        (WebCore::Location::protocol const):
+        (WebCore::Location::host const):
+        (WebCore::Location::hostname const):
+        (WebCore::Location::port const):
+        (WebCore::Location::pathname const):
+        (WebCore::Location::search const):
+        (WebCore::Location::origin const):
+        (WebCore::Location::ancestorOrigins const):
+        (WebCore::Location::hash const):
+        (WebCore::Location::setHref):
+        (WebCore::Location::setProtocol):
+        (WebCore::Location::setHost):
+        (WebCore::Location::setHostname):
+        (WebCore::Location::setPort):
+        (WebCore::Location::setPathname):
+        (WebCore::Location::setSearch):
+        (WebCore::Location::setHash):
+        (WebCore::Location::assign):
+        (WebCore::Location::replace):
+        (WebCore::Location::reload):
+        (WebCore::Location::setLocation):
+        * page/Location.h:
+        (WebCore::Location::create):
+        * page/Navigator.cpp:
+        (WebCore::Navigator::Navigator):
+        (WebCore::Navigator::appVersion const):
+        (WebCore::Navigator::userAgent const):
+        (WebCore::Navigator::share):
+        (WebCore::Navigator::plugins):
+        (WebCore::Navigator::mimeTypes):
+        (WebCore::Navigator::cookieEnabled const):
+        (WebCore::Navigator::javaEnabled const):
+        (WebCore::Navigator::standalone const):
+        * page/Navigator.h:
+        * page/Performance.cpp:
+        (WebCore::Performance::navigation):
+        (WebCore::Performance::timing):
+        * page/PerformanceNavigation.cpp:
+        (WebCore::PerformanceNavigation::PerformanceNavigation):
+        (WebCore::PerformanceNavigation::type const):
+        (WebCore::PerformanceNavigation::redirectCount const):
+        * page/PerformanceNavigation.h:
+        (WebCore::PerformanceNavigation::create):
+        * page/PerformanceTiming.cpp:
+        (WebCore::PerformanceTiming::PerformanceTiming):
+        (WebCore::PerformanceTiming::documentLoader const):
+        (WebCore::PerformanceTiming::documentTiming const):
+        * page/PerformanceTiming.h:
+        (WebCore::PerformanceTiming::create):
+        * page/Screen.cpp:
+        (WebCore::Screen::Screen):
+        (WebCore::Screen::height const):
+        (WebCore::Screen::width const):
+        (WebCore::Screen::colorDepth const):
+        (WebCore::Screen::pixelDepth const):
+        (WebCore::Screen::availLeft const):
+        (WebCore::Screen::availTop const):
+        (WebCore::Screen::availHeight const):
+        (WebCore::Screen::availWidth const):
+        * page/Screen.h:
+        * page/VisualViewport.cpp:
+        (WebCore::VisualViewport::VisualViewport):
+        (WebCore::VisualViewport::scriptExecutionContext const):
+        (WebCore::VisualViewport::addEventListener):
+        (WebCore::VisualViewport::updateFrameLayout const):
+        (WebCore::VisualViewport::offsetLeft const):
+        (WebCore::VisualViewport::offsetTop const):
+        (WebCore::VisualViewport::pageLeft const):
+        (WebCore::VisualViewport::pageTop const):
+        (WebCore::VisualViewport::width const):
+        (WebCore::VisualViewport::height const):
+        (WebCore::VisualViewport::scale const):
+        (WebCore::VisualViewport::update):
+        (WebCore::VisualViewport::enqueueResizeEvent):
+        (WebCore::VisualViewport::enqueueScrollEvent):
+        * page/VisualViewport.h:
+        * page/WebKitNamespace.cpp:
+        (WebCore::WebKitNamespace::WebKitNamespace):
+        * page/WebKitNamespace.h:
+        (WebCore::WebKitNamespace::create):
+        * plugins/DOMMimeTypeArray.cpp:
+        (WebCore::DOMMimeTypeArray::DOMMimeTypeArray):
+        (WebCore::DOMMimeTypeArray::item):
+        (WebCore::DOMMimeTypeArray::namedItem):
+        (WebCore::DOMMimeTypeArray::getPluginData const):
+        * plugins/DOMMimeTypeArray.h:
+        (WebCore::DOMMimeTypeArray::create):
+        * plugins/DOMPluginArray.cpp:
+        (WebCore::DOMPluginArray::DOMPluginArray):
+        (WebCore::DOMPluginArray::item):
+        (WebCore::DOMPluginArray::namedItem):
+        (WebCore::DOMPluginArray::refresh):
+        (WebCore::DOMPluginArray::pluginData const):
+        * plugins/DOMPluginArray.h:
+        (WebCore::DOMPluginArray::create):
+        * storage/Storage.cpp:
+        (WebCore::Storage::create):
+        (WebCore::Storage::Storage):
+        (WebCore::Storage::setItem):
+        (WebCore::Storage::removeItem):
+        (WebCore::Storage::clear):
+        * storage/Storage.h:
+
</ins><span class="cx"> 2018-10-08  Antti Koivisto  <antti@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Move FontCascadeDescription to a file of its own
</span></span></pre></div>
<a id="trunkSourceWebCoreModulescacheDOMWindowCachescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/cache/DOMWindowCaches.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/cache/DOMWindowCaches.cpp   2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/Modules/cache/DOMWindowCaches.cpp      2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> DOMWindowCaches::DOMWindowCaches(DOMWindow* window)
</span><del>-    : DOMWindowProperty(window->frame())
</del><ins>+    : DOMWindowProperty(window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationNavigatorGeolocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp        2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/Modules/geolocation/NavigatorGeolocation.cpp   2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -33,8 +33,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-NavigatorGeolocation::NavigatorGeolocation(Frame* frame)
-    : DOMWindowProperty(frame)
</del><ins>+NavigatorGeolocation::NavigatorGeolocation(DOMWindow* window)
+    : DOMWindowProperty(window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> {
</span><span class="cx">     NavigatorGeolocation* supplement = static_cast<NavigatorGeolocation*>(Supplement<Navigator>::from(navigator, supplementName()));
</span><span class="cx">     if (!supplement) {
</span><del>-        auto newSupplement = std::make_unique<NavigatorGeolocation>(navigator->frame());
</del><ins>+        auto newSupplement = std::make_unique<NavigatorGeolocation>(navigator->window());
</ins><span class="cx">         supplement = newSupplement.get();
</span><span class="cx">         provideTo(navigator, supplementName(), WTFMove(newSupplement));
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationNavigatorGeolocationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/NavigatorGeolocation.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/NavigatorGeolocation.h  2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/Modules/geolocation/NavigatorGeolocation.h     2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class Frame;
</del><span class="cx"> class Geolocation;
</span><span class="cx"> class Navigator;
</span><span class="cx"> 
</span><span class="lines">@@ -33,7 +32,7 @@
</span><span class="cx"> class NavigatorGeolocation : public Supplement<Navigator>, public DOMWindowProperty {
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    explicit NavigatorGeolocation(Frame*);
</del><ins>+    explicit NavigatorGeolocation(DOMWindow*);
</ins><span class="cx">     virtual ~NavigatorGeolocation();
</span><span class="cx">     static NavigatorGeolocation* from(Navigator*);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbDOMWindowIndexedDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp      2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/Modules/indexeddb/DOMWindowIndexedDatabase.cpp 2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> DOMWindowIndexedDatabase::DOMWindowIndexedDatabase(DOMWindow* window)
</span><del>-    : DOMWindowProperty(window->frame())
</del><ins>+    : DOMWindowProperty(window)
</ins><span class="cx">     , m_window(window)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamNavigatorMediaDevicescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/NavigatorMediaDevices.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/NavigatorMediaDevices.cpp       2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorMediaDevices.cpp  2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -40,8 +40,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-NavigatorMediaDevices::NavigatorMediaDevices(Frame* frame)
-    : DOMWindowProperty(frame)
</del><ins>+NavigatorMediaDevices::NavigatorMediaDevices(DOMWindow* window)
+    : DOMWindowProperty(window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> {
</span><span class="cx">     NavigatorMediaDevices* supplement = static_cast<NavigatorMediaDevices*>(Supplement<Navigator>::from(navigator, supplementName()));
</span><span class="cx">     if (!supplement) {
</span><del>-        auto newSupplement = std::make_unique<NavigatorMediaDevices>(navigator->frame());
</del><ins>+        auto newSupplement = std::make_unique<NavigatorMediaDevices>(navigator->window());
</ins><span class="cx">         supplement = newSupplement.get();
</span><span class="cx">         provideTo(navigator, supplementName(), WTFMove(newSupplement));
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamNavigatorMediaDevicesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/NavigatorMediaDevices.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/NavigatorMediaDevices.h 2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorMediaDevices.h    2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -37,13 +37,12 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class Frame;
</del><span class="cx"> class MediaDevices;
</span><span class="cx"> class Navigator;
</span><span class="cx"> 
</span><span class="cx"> class NavigatorMediaDevices : public Supplement<Navigator>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    explicit NavigatorMediaDevices(Frame*);
</del><ins>+    explicit NavigatorMediaDevices(DOMWindow*);
</ins><span class="cx">     virtual ~NavigatorMediaDevices();
</span><span class="cx">     static NavigatorMediaDevices* from(Navigator*);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesquotaDOMWindowQuotacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/quota/DOMWindowQuota.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/quota/DOMWindowQuota.cpp    2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/Modules/quota/DOMWindowQuota.cpp       2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> DOMWindowQuota::DOMWindowQuota(DOMWindow* window)
</span><del>-    : DOMWindowProperty(window->frame())
</del><ins>+    : DOMWindowProperty(window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesquotaNavigatorStorageQuotacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/quota/NavigatorStorageQuota.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/quota/NavigatorStorageQuota.cpp     2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/Modules/quota/NavigatorStorageQuota.cpp        2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -39,8 +39,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-NavigatorStorageQuota::NavigatorStorageQuota(Frame* frame)
-    : DOMWindowProperty(frame)
</del><ins>+NavigatorStorageQuota::NavigatorStorageQuota(DOMWindow* window)
+    : DOMWindowProperty(window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesquotaNavigatorStorageQuotah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/quota/NavigatorStorageQuota.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/quota/NavigatorStorageQuota.h       2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/Modules/quota/NavigatorStorageQuota.h  2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -37,13 +37,12 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class Frame;
</del><span class="cx"> class StorageQuota;
</span><span class="cx"> class Navigator;
</span><span class="cx"> 
</span><span class="cx"> class NavigatorStorageQuota : public Supplement<Navigator>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    explicit NavigatorStorageQuota(Frame*);
</del><ins>+    explicit NavigatorStorageQuota(DOMWindow*);
</ins><span class="cx">     virtual ~NavigatorStorageQuota();
</span><span class="cx">     static NavigatorStorageQuota* from(Navigator*);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesspeechDOMWindowSpeechSynthesiscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/speech/DOMWindowSpeechSynthesis.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/speech/DOMWindowSpeechSynthesis.cpp 2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/Modules/speech/DOMWindowSpeechSynthesis.cpp    2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> DOMWindowSpeechSynthesis::DOMWindowSpeechSynthesis(DOMWindow* window)
</span><del>-    : DOMWindowProperty(window->frame())
</del><ins>+    : DOMWindowProperty(window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleMediacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleMedia.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleMedia.cpp  2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/css/StyleMedia.cpp     2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -39,14 +39,15 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-StyleMedia::StyleMedia(Frame* frame)
-    : DOMWindowProperty(frame)
</del><ins>+StyleMedia::StyleMedia(DOMWindow& window)
+    : DOMWindowProperty(&window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String StyleMedia::type() const
</span><span class="cx"> {
</span><del>-    FrameView* view = m_frame ? m_frame->view() : 0;
</del><ins>+    auto* frame = this->frame();
+    FrameView* view = frame ? frame->view() : nullptr;
</ins><span class="cx">     if (view)
</span><span class="cx">         return view->mediaType();
</span><span class="cx"> 
</span><span class="lines">@@ -55,10 +56,11 @@
</span><span class="cx"> 
</span><span class="cx"> bool StyleMedia::matchMedium(const String& query) const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    Document* document = m_frame->document();
</del><ins>+    Document* document = frame->document();
</ins><span class="cx">     ASSERT(document);
</span><span class="cx">     Element* documentElement = document->documentElement();
</span><span class="cx">     if (!documentElement)
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleMediah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleMedia.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleMedia.h    2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/css/StyleMedia.h       2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -32,17 +32,15 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class Frame;
-
</del><span class="cx"> class StyleMedia final : public RefCounted<StyleMedia>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    static Ref<StyleMedia> create(Frame* frame) { return adoptRef(*new StyleMedia(frame)); }
</del><ins>+    static Ref<StyleMedia> create(DOMWindow& window) { return adoptRef(*new StyleMedia(window)); }
</ins><span class="cx"> 
</span><span class="cx">     String type() const;
</span><span class="cx">     bool matchMedium(const String&) const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit StyleMedia(Frame*);
</del><ins>+    explicit StyleMedia(DOMWindow&);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderappcacheDOMApplicationCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/appcache/DOMApplicationCache.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/appcache/DOMApplicationCache.cpp     2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/loader/appcache/DOMApplicationCache.cpp        2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -34,8 +34,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-DOMApplicationCache::DOMApplicationCache(Frame& frame)
-    : DOMWindowProperty(&frame)
</del><ins>+DOMApplicationCache::DOMApplicationCache(DOMWindow& window)
+    : DOMWindowProperty(&window)
</ins><span class="cx"> {
</span><span class="cx">     if (auto* host = applicationCacheHost())
</span><span class="cx">         host->setDOMApplicationCache(this);
</span><span class="lines">@@ -64,9 +64,10 @@
</span><span class="cx"> 
</span><span class="cx"> ApplicationCacheHost* DOMApplicationCache::applicationCacheHost() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return nullptr;
</span><del>-    auto* documentLoader = m_frame->loader().documentLoader();
</del><ins>+    auto* documentLoader = frame->loader().documentLoader();
</ins><span class="cx">     if (!documentLoader)
</span><span class="cx">         return nullptr;
</span><span class="cx">     return &documentLoader->applicationCacheHost();
</span><span class="lines">@@ -104,9 +105,10 @@
</span><span class="cx"> 
</span><span class="cx"> ScriptExecutionContext* DOMApplicationCache::scriptExecutionContext() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return nullptr;
</span><del>-    return m_frame->document();
</del><ins>+    return frame->document();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderappcacheDOMApplicationCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/appcache/DOMApplicationCache.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/appcache/DOMApplicationCache.h       2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/loader/appcache/DOMApplicationCache.h  2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -35,8 +35,8 @@
</span><span class="cx"> 
</span><span class="cx"> class DOMApplicationCache final : public RefCounted<DOMApplicationCache>, public EventTargetWithInlineData, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    static Ref<DOMApplicationCache> create(Frame& frame) { return adoptRef(*new DOMApplicationCache(frame)); }
-    virtual ~DOMApplicationCache() { ASSERT(!m_frame); }
</del><ins>+    static Ref<DOMApplicationCache> create(DOMWindow& window) { return adoptRef(*new DOMApplicationCache(window)); }
+    virtual ~DOMApplicationCache() { ASSERT(!frame()); }
</ins><span class="cx"> 
</span><span class="cx">     unsigned short status() const;
</span><span class="cx">     ExceptionOr<void> update();
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     using RefCounted::deref;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit DOMApplicationCache(Frame&);
</del><ins>+    explicit DOMApplicationCache(DOMWindow&);
</ins><span class="cx"> 
</span><span class="cx">     void refEventTarget() final { ref(); }
</span><span class="cx">     void derefEventTarget() final { deref(); }
</span></span></pre></div>
<a id="trunkSourceWebCorepageBarPropcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/BarProp.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/BarProp.cpp    2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/BarProp.cpp       2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -35,8 +35,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-BarProp::BarProp(Frame* frame, Type type)
-    : DOMWindowProperty(frame)
</del><ins>+BarProp::BarProp(DOMWindow& window, Type type)
+    : DOMWindowProperty(&window)
</ins><span class="cx">     , m_type(type)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -48,9 +48,10 @@
</span><span class="cx"> 
</span><span class="cx"> bool BarProp::visible() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return false;
</span><del>-    Page* page = m_frame->page();
</del><ins>+    auto* page = frame->page();
</ins><span class="cx">     if (!page)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageBarProph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/BarProp.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/BarProp.h      2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/BarProp.h 2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -35,19 +35,17 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class Frame;
-
</del><span class="cx"> class BarProp : public ScriptWrappable, public RefCounted<BarProp>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><span class="cx">     enum Type { Locationbar, Menubar, Personalbar, Scrollbars, Statusbar, Toolbar };
</span><span class="cx"> 
</span><del>-    static Ref<BarProp> create(Frame* frame, Type type) { return adoptRef(*new BarProp(frame, type)); }
</del><ins>+    static Ref<BarProp> create(DOMWindow& window, Type type) { return adoptRef(*new BarProp(window, type)); }
</ins><span class="cx"> 
</span><span class="cx">     Type type() const;
</span><span class="cx">     bool visible() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    BarProp(Frame*, Type);
</del><ins>+    BarProp(DOMWindow&, Type);
</ins><span class="cx">     Type m_type;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMSelectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMSelection.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMSelection.cpp       2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/DOMSelection.cpp  2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -51,15 +51,15 @@
</span><span class="cx">     return frame.document()->ancestorNodeInThisScope(node);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DOMSelection::DOMSelection(Frame& frame)
-    : DOMWindowProperty(&frame)
</del><ins>+DOMSelection::DOMSelection(DOMWindow& window)
+    : DOMWindowProperty(&window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const VisibleSelection& DOMSelection::visibleSelection() const
</span><span class="cx"> {
</span><del>-    ASSERT(m_frame);
-    return m_frame->selection().selection();
</del><ins>+    ASSERT(frame());
+    return frame()->selection().selection();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static Position anchorPosition(const VisibleSelection& selection)
</span><span class="lines">@@ -86,14 +86,14 @@
</span><span class="cx"> 
</span><span class="cx"> Node* DOMSelection::anchorNode() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
-        return 0;
</del><ins>+    if (!frame())
+        return nullptr;
</ins><span class="cx">     return shadowAdjustedNode(anchorPosition(visibleSelection()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned DOMSelection::anchorOffset() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return 0;
</span><span class="cx">     return shadowAdjustedOffset(anchorPosition(visibleSelection()));
</span><span class="cx"> }
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> 
</span><span class="cx"> Node* DOMSelection::focusNode() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return nullptr;
</span><span class="cx">     return shadowAdjustedNode(focusPosition(visibleSelection()));
</span><span class="cx"> }
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx"> 
</span><span class="cx"> unsigned DOMSelection::focusOffset() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return 0;
</span><span class="cx">     return shadowAdjustedOffset(focusPosition(visibleSelection()));
</span><span class="cx"> }
</span><span class="lines">@@ -114,14 +114,14 @@
</span><span class="cx"> 
</span><span class="cx"> Node* DOMSelection::baseNode() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
-        return 0;
</del><ins>+    if (!frame())
+        return nullptr;
</ins><span class="cx">     return shadowAdjustedNode(basePosition(visibleSelection()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned DOMSelection::baseOffset() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return 0;
</span><span class="cx">     return shadowAdjustedOffset(basePosition(visibleSelection()));
</span><span class="cx"> }
</span><span class="lines">@@ -128,14 +128,14 @@
</span><span class="cx"> 
</span><span class="cx"> Node* DOMSelection::extentNode() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
-        return 0;
</del><ins>+    if (!frame())
+        return nullptr;
</ins><span class="cx">     return shadowAdjustedNode(extentPosition(visibleSelection()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned DOMSelection::extentOffset() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return 0;
</span><span class="cx">     return shadowAdjustedOffset(extentPosition(visibleSelection()));
</span><span class="cx"> }
</span><span class="lines">@@ -142,16 +142,18 @@
</span><span class="cx"> 
</span><span class="cx"> bool DOMSelection::isCollapsed() const
</span><span class="cx"> {
</span><del>-    if (!m_frame || selectionShadowAncestor(*m_frame))
</del><ins>+    auto* frame = this->frame();
+    if (!frame || selectionShadowAncestor(*frame))
</ins><span class="cx">         return true;
</span><del>-    return !m_frame->selection().isRange();
</del><ins>+    return !frame->selection().isRange();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String DOMSelection::type() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return "None"_s;
</span><del>-    auto& selection = m_frame->selection();
</del><ins>+    auto& selection = frame->selection();
</ins><span class="cx">     if (selection.isNone())
</span><span class="cx">         return "None"_s;
</span><span class="cx">     if (selection.isCaret())
</span><span class="lines">@@ -161,7 +163,8 @@
</span><span class="cx"> 
</span><span class="cx"> unsigned DOMSelection::rangeCount() const
</span><span class="cx"> {
</span><del>-    return !m_frame || m_frame->selection().isNone() ? 0 : 1;
</del><ins>+    auto* frame = this->frame();
+    return !frame || frame->selection().isNone() ? 0 : 1;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DOMSelection::collapse(Node* node, unsigned offset)
</span><span class="lines">@@ -169,19 +172,20 @@
</span><span class="cx">     if (!isValidForPosition(node))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    Ref<Frame> protector(*m_frame);
-    m_frame->selection().moveTo(createLegacyEditingPosition(node, offset), DOWNSTREAM);
</del><ins>+    Ref<Frame> protectedFrame(*frame());
+    protectedFrame->selection().moveTo(createLegacyEditingPosition(node, offset), DOWNSTREAM);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> DOMSelection::collapseToEnd()
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return { };
</span><del>-    auto& selection = m_frame->selection();
</del><ins>+    auto& selection = frame->selection();
</ins><span class="cx">     if (selection.isNone())
</span><span class="cx">         return Exception { InvalidStateError };
</span><span class="cx"> 
</span><del>-    Ref<Frame> protector(*m_frame);
</del><ins>+    Ref<Frame> protector(*frame);
</ins><span class="cx">     selection.moveTo(selection.selection().end(), DOWNSTREAM);
</span><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="lines">@@ -188,13 +192,14 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> DOMSelection::collapseToStart()
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return { };
</span><del>-    auto& selection = m_frame->selection();
</del><ins>+    auto& selection = frame->selection();
</ins><span class="cx">     if (selection.isNone())
</span><span class="cx">         return Exception { InvalidStateError };
</span><span class="cx"> 
</span><del>-    Ref<Frame> protector(*m_frame);
</del><ins>+    Ref<Frame> protector(*frame);
</ins><span class="cx">     selection.moveTo(selection.selection().start(), DOWNSTREAM);
</span><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="lines">@@ -201,9 +206,10 @@
</span><span class="cx"> 
</span><span class="cx"> void DOMSelection::empty()
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return;
</span><del>-    m_frame->selection().clear();
</del><ins>+    frame->selection().clear();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DOMSelection::setBaseAndExtent(Node* baseNode, unsigned baseOffset, Node* extentNode, unsigned extentOffset)
</span><span class="lines">@@ -211,8 +217,8 @@
</span><span class="cx">     if (!isValidForPosition(baseNode) || !isValidForPosition(extentNode))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    Ref<Frame> protector(*m_frame);
-    m_frame->selection().moveTo(createLegacyEditingPosition(baseNode, baseOffset), createLegacyEditingPosition(extentNode, extentOffset), DOWNSTREAM);
</del><ins>+    Ref<Frame> protectedFrame(*frame());
+    protectedFrame->selection().moveTo(createLegacyEditingPosition(baseNode, baseOffset), createLegacyEditingPosition(extentNode, extentOffset), DOWNSTREAM);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DOMSelection::setPosition(Node* node, unsigned offset)
</span><span class="lines">@@ -220,13 +226,14 @@
</span><span class="cx">     if (!isValidForPosition(node))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    Ref<Frame> protector(*m_frame);
-    m_frame->selection().moveTo(createLegacyEditingPosition(node, offset), DOWNSTREAM);
</del><ins>+    Ref<Frame> protectedFrame(*frame());
+    protectedFrame->selection().moveTo(createLegacyEditingPosition(node, offset), DOWNSTREAM);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DOMSelection::modify(const String& alterString, const String& directionString, const String& granularityString)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     FrameSelection::EAlteration alter;
</span><span class="lines">@@ -271,13 +278,14 @@
</span><span class="cx">     else
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    Ref<Frame> protector(*m_frame);
-    m_frame->selection().modify(alter, direction, granularity);
</del><ins>+    Ref<Frame> protector(*frame);
+    frame->selection().modify(alter, direction, granularity);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> DOMSelection::extend(Node& node, unsigned offset)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return { };
</span><span class="cx">     if (offset > (node.isCharacterDataNode() ? caretMaxOffset(node) : node.countChildNodes()))
</span><span class="cx">         return Exception { IndexSizeError };
</span><span class="lines">@@ -284,8 +292,8 @@
</span><span class="cx">     if (!isValidForPosition(&node))
</span><span class="cx">         return { };
</span><span class="cx"> 
</span><del>-    Ref<Frame> protector(*m_frame);
-    m_frame->selection().setExtent(createLegacyEditingPosition(&node, offset), DOWNSTREAM);
</del><ins>+    Ref<Frame> protector(*frame);
+    frame->selection().setExtent(createLegacyEditingPosition(&node, offset), DOWNSTREAM);
</ins><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -297,13 +305,14 @@
</span><span class="cx">     // If you're hitting this, you've added broken multi-range selection support.
</span><span class="cx">     ASSERT(rangeCount() == 1);
</span><span class="cx"> 
</span><del>-    if (auto* shadowAncestor = selectionShadowAncestor(*m_frame)) {
</del><ins>+    auto* frame = this->frame();
+    if (auto* shadowAncestor = selectionShadowAncestor(*frame)) {
</ins><span class="cx">         auto* container = shadowAncestor->parentNodeGuaranteedHostFree();
</span><span class="cx">         unsigned offset = shadowAncestor->computeNodeIndex();
</span><span class="cx">         return Range::create(shadowAncestor->document(), container, offset, container, offset);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto firstRange = m_frame->selection().selection().firstRange();
</del><ins>+    auto firstRange = frame->selection().selection().firstRange();
</ins><span class="cx">     ASSERT(firstRange);
</span><span class="cx">     if (!firstRange)
</span><span class="cx">         return Exception { IndexSizeError };
</span><span class="lines">@@ -312,19 +321,21 @@
</span><span class="cx"> 
</span><span class="cx"> void DOMSelection::removeAllRanges()
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return;
</span><del>-    m_frame->selection().clear();
</del><ins>+    frame->selection().clear();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DOMSelection::addRange(Range& range)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    Ref<Frame> protector(*m_frame);
</del><ins>+    Ref<Frame> protector(*frame);
</ins><span class="cx"> 
</span><del>-    auto& selection = m_frame->selection();
</del><ins>+    auto& selection = frame->selection();
</ins><span class="cx">     if (selection.isNone()) {
</span><span class="cx">         selection.moveTo(&range);
</span><span class="cx">         return;
</span><span class="lines">@@ -366,10 +377,11 @@
</span><span class="cx"> 
</span><span class="cx"> void DOMSelection::deleteFromDocument()
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    auto& selection = m_frame->selection();
</del><ins>+    auto& selection = frame->selection();
</ins><span class="cx">     if (selection.isNone())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -377,7 +389,7 @@
</span><span class="cx">     if (!selectedRange || selectedRange->shadowRoot())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    Ref<Frame> protector(*m_frame);
</del><ins>+    Ref<Frame> protector(*frame);
</ins><span class="cx">     selectedRange->deleteContents();
</span><span class="cx">     setBaseAndExtent(&selectedRange->startContainer(), selectedRange->startOffset(), &selectedRange->startContainer(), selectedRange->startOffset());
</span><span class="cx"> }
</span><span class="lines">@@ -384,11 +396,12 @@
</span><span class="cx"> 
</span><span class="cx"> bool DOMSelection::containsNode(Node& node, bool allowPartial) const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto& selection = m_frame->selection();
-    if (m_frame->document() != &node.document() || selection.isNone())
</del><ins>+    auto& selection = frame->selection();
+    if (frame->document() != &node.document() || selection.isNone())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     Ref<Node> protectedNode(node);
</span><span class="lines">@@ -430,9 +443,10 @@
</span><span class="cx"> 
</span><span class="cx"> String DOMSelection::toString()
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return String();
</span><del>-    return plainText(m_frame->selection().selection().toNormalizedRange().get());
</del><ins>+    return plainText(frame->selection().selection().toNormalizedRange().get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Node* DOMSelection::shadowAdjustedNode(const Position& position) const
</span><span class="lines">@@ -441,7 +455,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     auto* containerNode = position.containerNode();
</span><del>-    auto* adjustedNode = m_frame->document()->ancestorNodeInThisScope(containerNode);
</del><ins>+    auto* adjustedNode = frame()->document()->ancestorNodeInThisScope(containerNode);
</ins><span class="cx">     if (!adjustedNode)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -457,7 +471,7 @@
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     auto* containerNode = position.containerNode();
</span><del>-    auto* adjustedNode = m_frame->document()->ancestorNodeInThisScope(containerNode);
</del><ins>+    auto* adjustedNode = frame()->document()->ancestorNodeInThisScope(containerNode);
</ins><span class="cx">     if (!adjustedNode)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="lines">@@ -469,11 +483,12 @@
</span><span class="cx"> 
</span><span class="cx"> bool DOMSelection::isValidForPosition(Node* node) const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return false;
</span><span class="cx">     if (!node)
</span><span class="cx">         return true;
</span><del>-    return &node->document() == m_frame->document();
</del><ins>+    return &node->document() == frame->document();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMSelectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMSelection.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMSelection.h 2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/DOMSelection.h    2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> 
</span><span class="cx"> class DOMSelection : public RefCounted<DOMSelection>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    static Ref<DOMSelection> create(Frame& frame) { return adoptRef(*new DOMSelection(frame)); }
</del><ins>+    static Ref<DOMSelection> create(DOMWindow& window) { return adoptRef(*new DOMSelection(window)); }
</ins><span class="cx"> 
</span><span class="cx">     Node* baseNode() const;
</span><span class="cx">     Node* extentNode() const;
</span><span class="lines">@@ -80,9 +80,9 @@
</span><span class="cx">     void empty();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit DOMSelection(Frame&);
</del><ins>+    explicit DOMSelection(DOMWindow&);
</ins><span class="cx"> 
</span><del>-    // Convenience method for accessors, caller must null-check m_frame.
</del><ins>+    // Convenience method for accessors, caller must null-check frame().
</ins><span class="cx">     const VisibleSelection& visibleSelection() const;
</span><span class="cx"> 
</span><span class="cx">     Node* shadowAdjustedNode(const Position&) const;
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.cpp  2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/DOMWindow.cpp     2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -683,21 +683,21 @@
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-Screen* DOMWindow::screen() const
</del><ins>+Screen* DOMWindow::screen()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_screen)
</span><del>-        m_screen = Screen::create(m_frame);
</del><ins>+        m_screen = Screen::create(*this);
</ins><span class="cx">     return m_screen.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-History* DOMWindow::history() const
</del><ins>+History* DOMWindow::history()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_history)
</span><del>-        m_history = History::create(*m_frame);
</del><ins>+        m_history = History::create(*this);
</ins><span class="cx">     return m_history.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -711,57 +711,57 @@
</span><span class="cx">     return m_crypto.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-BarProp* DOMWindow::locationbar() const
</del><ins>+BarProp* DOMWindow::locationbar()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_locationbar)
</span><del>-        m_locationbar = BarProp::create(m_frame, BarProp::Locationbar);
</del><ins>+        m_locationbar = BarProp::create(*this, BarProp::Locationbar);
</ins><span class="cx">     return m_locationbar.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-BarProp* DOMWindow::menubar() const
</del><ins>+BarProp* DOMWindow::menubar()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_menubar)
</span><del>-        m_menubar = BarProp::create(m_frame, BarProp::Menubar);
</del><ins>+        m_menubar = BarProp::create(*this, BarProp::Menubar);
</ins><span class="cx">     return m_menubar.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-BarProp* DOMWindow::personalbar() const
</del><ins>+BarProp* DOMWindow::personalbar()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_personalbar)
</span><del>-        m_personalbar = BarProp::create(m_frame, BarProp::Personalbar);
</del><ins>+        m_personalbar = BarProp::create(*this, BarProp::Personalbar);
</ins><span class="cx">     return m_personalbar.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-BarProp* DOMWindow::scrollbars() const
</del><ins>+BarProp* DOMWindow::scrollbars()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_scrollbars)
</span><del>-        m_scrollbars = BarProp::create(m_frame, BarProp::Scrollbars);
</del><ins>+        m_scrollbars = BarProp::create(*this, BarProp::Scrollbars);
</ins><span class="cx">     return m_scrollbars.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-BarProp* DOMWindow::statusbar() const
</del><ins>+BarProp* DOMWindow::statusbar()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_statusbar)
</span><del>-        m_statusbar = BarProp::create(m_frame, BarProp::Statusbar);
</del><ins>+        m_statusbar = BarProp::create(*this, BarProp::Statusbar);
</ins><span class="cx">     return m_statusbar.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-BarProp* DOMWindow::toolbar() const
</del><ins>+BarProp* DOMWindow::toolbar()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_toolbar)
</span><del>-        m_toolbar = BarProp::create(m_frame, BarProp::Toolbar);
</del><ins>+        m_toolbar = BarProp::create(*this, BarProp::Toolbar);
</ins><span class="cx">     return m_toolbar.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -772,16 +772,16 @@
</span><span class="cx">     return m_frame->page() ? &m_frame->page()->console() : nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DOMApplicationCache* DOMWindow::applicationCache() const
</del><ins>+DOMApplicationCache* DOMWindow::applicationCache()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_applicationCache)
</span><del>-        m_applicationCache = DOMApplicationCache::create(*m_frame);
</del><ins>+        m_applicationCache = DOMApplicationCache::create(*this);
</ins><span class="cx">     return m_applicationCache.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Navigator* DOMWindow::navigator() const
</del><ins>+Navigator* DOMWindow::navigator()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -788,7 +788,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (!m_navigator) {
</span><span class="cx">         ASSERT(scriptExecutionContext());
</span><del>-        m_navigator = Navigator::create(*scriptExecutionContext(), *m_frame);
</del><ins>+        m_navigator = Navigator::create(*scriptExecutionContext(), *this);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return m_navigator.get();
</span><span class="lines">@@ -810,21 +810,21 @@
</span><span class="cx">     return performance() ? performance()->now() / 1000 : 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Location* DOMWindow::location() const
</del><ins>+Location* DOMWindow::location()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_location)
</span><del>-        m_location = Location::create(m_frame);
</del><ins>+        m_location = Location::create(*this);
</ins><span class="cx">     return m_location.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-VisualViewport* DOMWindow::visualViewport() const
</del><ins>+VisualViewport* DOMWindow::visualViewport()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_visualViewport && !m_suspendedForDocumentSuspension)
</span><del>-        m_visualViewport = VisualViewport::create(m_frame);
</del><ins>+        m_visualViewport = VisualViewport::create(*this);
</ins><span class="cx">     return m_visualViewport.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -850,7 +850,7 @@
</span><span class="cx">     return hasUserMessageHandler;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebKitNamespace* DOMWindow::webkitNamespace() const
</del><ins>+WebKitNamespace* DOMWindow::webkitNamespace()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -858,13 +858,13 @@
</span><span class="cx">     if (!page)
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_webkitNamespace)
</span><del>-        m_webkitNamespace = WebKitNamespace::create(*m_frame, page->userContentProvider());
</del><ins>+        m_webkitNamespace = WebKitNamespace::create(*this, page->userContentProvider());
</ins><span class="cx">     return m_webkitNamespace.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-ExceptionOr<Storage*> DOMWindow::sessionStorage() const
</del><ins>+ExceptionOr<Storage*> DOMWindow::sessionStorage()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -884,11 +884,11 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     auto storageArea = page->sessionStorage()->storageArea(document->securityOrigin().data());
</span><del>-    m_sessionStorage = Storage::create(m_frame, WTFMove(storageArea));
</del><ins>+    m_sessionStorage = Storage::create(*this, WTFMove(storageArea));
</ins><span class="cx">     return m_sessionStorage.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ExceptionOr<Storage*> DOMWindow::localStorage() const
</del><ins>+ExceptionOr<Storage*> DOMWindow::localStorage()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -918,7 +918,7 @@
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><span class="cx">     auto storageArea = page->storageNamespaceProvider().localStorageArea(*document);
</span><del>-    m_localStorage = Storage::create(m_frame, WTFMove(storageArea));
</del><ins>+    m_localStorage = Storage::create(*this, WTFMove(storageArea));
</ins><span class="cx">     return m_localStorage.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1009,7 +1009,7 @@
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_selection)
</span><del>-        m_selection = DOMSelection::create(*m_frame);
</del><ins>+        m_selection = DOMSelection::create(*this);
</ins><span class="cx">     return m_selection.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1495,12 +1495,12 @@
</span><span class="cx">     return downcast<Document>(ContextDestructionObserver::scriptExecutionContext());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr<StyleMedia> DOMWindow::styleMedia() const
</del><ins>+RefPtr<StyleMedia> DOMWindow::styleMedia()
</ins><span class="cx"> {
</span><span class="cx">     if (!isCurrentlyDisplayedInFrame())
</span><span class="cx">         return nullptr;
</span><span class="cx">     if (!m_media)
</span><del>-        m_media = StyleMedia::create(m_frame);
</del><ins>+        m_media = StyleMedia::create(*this);
</ins><span class="cx">     return m_media;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.h    2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/DOMWindow.h       2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -131,20 +131,20 @@
</span><span class="cx">     static bool canShowModalDialog(const Frame&);
</span><span class="cx">     WEBCORE_EXPORT void setCanShowModalDialogOverride(bool);
</span><span class="cx"> 
</span><del>-    Screen* screen() const;
-    History* history() const;
</del><ins>+    Screen* screen();
+    History* history();
</ins><span class="cx">     Crypto* crypto() const;
</span><del>-    BarProp* locationbar() const;
-    BarProp* menubar() const;
-    BarProp* personalbar() const;
-    BarProp* scrollbars() const;
-    BarProp* statusbar() const;
-    BarProp* toolbar() const;
-    Navigator* navigator() const;
</del><ins>+    BarProp* locationbar();
+    BarProp* menubar();
+    BarProp* personalbar();
+    BarProp* scrollbars();
+    BarProp* statusbar();
+    BarProp* toolbar();
+    Navigator* navigator();
</ins><span class="cx">     Navigator* optionalNavigator() const { return m_navigator.get(); }
</span><del>-    Navigator* clientInformation() const { return navigator(); }
</del><ins>+    Navigator* clientInformation() { return navigator(); }
</ins><span class="cx"> 
</span><del>-    Location* location() const;
</del><ins>+    Location* location();
</ins><span class="cx">     void setLocation(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& location, SetLocationLocking = LockHistoryBasedOnGestureState);
</span><span class="cx"> 
</span><span class="cx">     DOMSelection* getSelection();
</span><span class="lines">@@ -211,7 +211,7 @@
</span><span class="cx"> 
</span><span class="cx">     // CSSOM View Module
</span><span class="cx"> 
</span><del>-    RefPtr<StyleMedia> styleMedia() const;
</del><ins>+    RefPtr<StyleMedia> styleMedia();
</ins><span class="cx"> 
</span><span class="cx">     // DOM Level 2 Style Interface
</span><span class="cx"> 
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx">     void resizeBy(float x, float y) const;
</span><span class="cx">     void resizeTo(float width, float height) const;
</span><span class="cx"> 
</span><del>-    VisualViewport* visualViewport() const;
</del><ins>+    VisualViewport* visualViewport();
</ins><span class="cx"> 
</span><span class="cx">     // Timers
</span><span class="cx">     ExceptionOr<int> setTimeout(JSC::ExecState&, std::unique_ptr<ScheduledAction>, int timeout, Vector<JSC::Strong<JSC::Unknown>>&& arguments);
</span><span class="lines">@@ -283,12 +283,12 @@
</span><span class="cx">     void finishedLoading();
</span><span class="cx"> 
</span><span class="cx">     // HTML 5 key/value storage
</span><del>-    ExceptionOr<Storage*> sessionStorage() const;
-    ExceptionOr<Storage*> localStorage() const;
</del><ins>+    ExceptionOr<Storage*> sessionStorage();
+    ExceptionOr<Storage*> localStorage();
</ins><span class="cx">     Storage* optionalSessionStorage() const { return m_sessionStorage.get(); }
</span><span class="cx">     Storage* optionalLocalStorage() const { return m_localStorage.get(); }
</span><span class="cx"> 
</span><del>-    DOMApplicationCache* applicationCache() const;
</del><ins>+    DOMApplicationCache* applicationCache();
</ins><span class="cx">     DOMApplicationCache* optionalApplicationCache() const { return m_applicationCache.get(); }
</span><span class="cx"> 
</span><span class="cx">     CustomElementRegistry* customElementRegistry() { return m_customElementRegistry.get(); }
</span><span class="lines">@@ -321,7 +321,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(USER_MESSAGE_HANDLERS)
</span><span class="cx">     bool shouldHaveWebKitNamespaceForWorld(DOMWrapperWorld&);
</span><del>-    WebKitNamespace* webkitNamespace() const;
</del><ins>+    WebKitNamespace* webkitNamespace();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // FIXME: When this DOMWindow is no longer the active DOMWindow (i.e.,
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowExtensioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindowExtension.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindowExtension.cpp 2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/DOMWindowExtension.cpp    2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -35,8 +35,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-DOMWindowExtension::DOMWindowExtension(Frame* frame, DOMWrapperWorld& world)
-    : DOMWindowProperty(frame)
</del><ins>+DOMWindowExtension::DOMWindowExtension(DOMWindow* window, DOMWrapperWorld& world)
+    : DOMWindowProperty(window)
</ins><span class="cx">     , m_world(world)
</span><span class="cx">     , m_wasDetached(false)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowExtensionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindowExtension.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindowExtension.h   2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/DOMWindowExtension.h      2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -37,9 +37,9 @@
</span><span class="cx"> 
</span><span class="cx"> class DOMWindowExtension : public RefCounted<DOMWindowExtension>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    static Ref<DOMWindowExtension> create(Frame* frame, DOMWrapperWorld& world)
</del><ins>+    static Ref<DOMWindowExtension> create(DOMWindow* window, DOMWrapperWorld& world)
</ins><span class="cx">     {
</span><del>-        return adoptRef(*new DOMWindowExtension(frame, world));
</del><ins>+        return adoptRef(*new DOMWindowExtension(window, world));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     void disconnectFrameForDocumentSuspension() override;
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx">     DOMWrapperWorld& world() const { return m_world; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    WEBCORE_EXPORT DOMWindowExtension(Frame*, DOMWrapperWorld&);
</del><ins>+    WEBCORE_EXPORT DOMWindowExtension(DOMWindow*, DOMWrapperWorld&);
</ins><span class="cx"> 
</span><span class="cx">     Ref<DOMWrapperWorld> m_world;
</span><span class="cx">     RefPtr<Frame> m_disconnectedFrame;
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowPropertycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindowProperty.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindowProperty.cpp  2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/DOMWindowProperty.cpp     2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -33,33 +33,24 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-DOMWindowProperty::DOMWindowProperty(Frame* frame)
-    : m_frame(frame)
-    , m_associatedDOMWindow(nullptr)
</del><ins>+DOMWindowProperty::DOMWindowProperty(DOMWindow* window)
+    : m_window(window)
</ins><span class="cx"> {
</span><del>-    // FIXME: For now it *is* acceptable for a DOMWindowProperty to be created with a null frame.
-    // See fast/dom/navigator-detached-no-crash.html for the recipe.
-    // We should fix that.  <rdar://problem/11567132>
-    if (m_frame) {
-        m_associatedDOMWindow = m_frame->document()->domWindow();
-        m_associatedDOMWindow->registerProperty(*this);
-    }
</del><ins>+    if (m_window)
+        m_window->registerProperty(*this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> DOMWindowProperty::~DOMWindowProperty()
</span><span class="cx"> {
</span><del>-    if (m_associatedDOMWindow)
-        m_associatedDOMWindow->unregisterProperty(*this);
</del><ins>+    if (m_window)
+        m_window->unregisterProperty(*this);
</ins><span class="cx"> 
</span><del>-    m_associatedDOMWindow = nullptr;
-    m_frame = nullptr;
</del><ins>+    m_window = nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DOMWindowProperty::disconnectFrameForDocumentSuspension()
</span><span class="cx"> {
</span><del>-    ASSERT(m_associatedDOMWindow);
-
-    m_frame = nullptr;
</del><ins>+    ASSERT(m_window);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DOMWindowProperty::reconnectFrameFromDocumentSuspension(Frame* frame)
</span><span class="lines">@@ -66,11 +57,8 @@
</span><span class="cx"> {
</span><span class="cx">     // If this property is being reconnected to its Frame to enter the PageCache, it must have
</span><span class="cx">     // been disconnected from its Frame in the first place and it should still have an associated DOMWindow.
</span><del>-    ASSERT(frame);
-    ASSERT(!m_frame);
-    ASSERT(frame->document()->domWindow() == m_associatedDOMWindow);
-
-    m_frame = frame;
</del><ins>+    ASSERT_UNUSED(frame, frame);
+    ASSERT(frame->document()->domWindow() == m_window);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DOMWindowProperty::willDestroyGlobalObjectInCachedFrame()
</span><span class="lines">@@ -77,32 +65,33 @@
</span><span class="cx"> {
</span><span class="cx">     // If the property has been disconnected from its Frame for the page cache, then it must have originally had a Frame
</span><span class="cx">     // and therefore should still have an associated DOMWindow.
</span><del>-    ASSERT(!m_frame);
-    ASSERT(m_associatedDOMWindow);
</del><ins>+    ASSERT(m_window);
</ins><span class="cx"> 
</span><span class="cx">     // DOMWindowProperty lifetime isn't tied directly to the DOMWindow itself so it is important that it unregister
</span><span class="cx">     // itself from any DOMWindow it is associated with if that DOMWindow is going away.
</span><del>-    if (m_associatedDOMWindow)
-        m_associatedDOMWindow->unregisterProperty(*this);
-    m_associatedDOMWindow = nullptr;
-    m_frame = nullptr;
</del><ins>+    if (m_window)
+        m_window->unregisterProperty(*this);
+    m_window = nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DOMWindowProperty::willDestroyGlobalObjectInFrame()
</span><span class="cx"> {
</span><del>-    ASSERT(m_associatedDOMWindow);
</del><ins>+    ASSERT(m_window);
</ins><span class="cx"> 
</span><span class="cx">     // DOMWindowProperty lifetime isn't tied directly to the DOMWindow itself so it is important that it unregister
</span><span class="cx">     // itself from any DOMWindow it is associated with if that DOMWindow is going away.
</span><del>-    if (m_associatedDOMWindow)
-        m_associatedDOMWindow->unregisterProperty(*this);
-    m_associatedDOMWindow = nullptr;
-    m_frame = nullptr;
</del><ins>+    if (m_window)
+        m_window->unregisterProperty(*this);
+    m_window = nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DOMWindowProperty::willDetachGlobalObjectFromFrame()
</span><span class="cx"> {
</span><del>-    m_frame = nullptr;
</del><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Frame* DOMWindowProperty::frame() const
+{
+    return m_window ? m_window->frame() : nullptr;
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowPropertyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindowProperty.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindowProperty.h    2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/DOMWindowProperty.h       2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> 
</span><span class="cx"> class DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    explicit DOMWindowProperty(Frame*);
</del><ins>+    explicit DOMWindowProperty(DOMWindow*);
</ins><span class="cx"> 
</span><span class="cx">     virtual void disconnectFrameForDocumentSuspension();
</span><span class="cx">     virtual void reconnectFrameFromDocumentSuspension(Frame*);
</span><span class="lines">@@ -40,13 +40,13 @@
</span><span class="cx">     virtual void willDestroyGlobalObjectInFrame();
</span><span class="cx">     virtual void willDetachGlobalObjectFromFrame();
</span><span class="cx"> 
</span><del>-    Frame* frame() const { return m_frame; }
</del><ins>+    WEBCORE_EXPORT Frame* frame() const;
+    DOMWindow* window() const { return m_window; }
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     virtual ~DOMWindowProperty();
</span><span class="cx"> 
</span><del>-    Frame* m_frame;
-    DOMWindow* m_associatedDOMWindow;
</del><ins>+    DOMWindow* m_window;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepageHistorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/History.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/History.cpp    2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/History.cpp       2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -43,16 +43,17 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-History::History(Frame& frame)
-    : DOMWindowProperty(&frame)
</del><ins>+History::History(DOMWindow& window)
+    : DOMWindowProperty(&window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned History::length() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return 0;
</span><del>-    auto* page = m_frame->page();
</del><ins>+    auto* page = frame->page();
</ins><span class="cx">     if (!page)
</span><span class="cx">         return 0;
</span><span class="cx">     return page->backForward().count();
</span><span class="lines">@@ -60,10 +61,11 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<History::ScrollRestoration> History::scrollRestoration() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return Exception { SecurityError };
</span><span class="cx"> 
</span><del>-    auto* historyItem = m_frame->loader().history().currentItem();
</del><ins>+    auto* historyItem = frame->loader().history().currentItem();
</ins><span class="cx">     if (!historyItem)
</span><span class="cx">         return ScrollRestoration::Auto;
</span><span class="cx">     
</span><span class="lines">@@ -72,10 +74,11 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> History::setScrollRestoration(ScrollRestoration scrollRestoration)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return Exception { SecurityError };
</span><span class="cx"> 
</span><del>-    auto* historyItem = m_frame->loader().history().currentItem();
</del><ins>+    auto* historyItem = frame->loader().history().currentItem();
</ins><span class="cx">     if (historyItem)
</span><span class="cx">         historyItem->setShouldRestoreScrollPosition(scrollRestoration == ScrollRestoration::Auto);
</span><span class="cx"> 
</span><span class="lines">@@ -90,9 +93,10 @@
</span><span class="cx"> 
</span><span class="cx"> SerializedScriptValue* History::stateInternal() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return nullptr;
</span><del>-    auto* historyItem = m_frame->loader().history().currentItem();
</del><ins>+    auto* historyItem = frame->loader().history().currentItem();
</ins><span class="cx">     if (!historyItem)
</span><span class="cx">         return nullptr;
</span><span class="cx">     return historyItem->stateObject();
</span><span class="lines">@@ -137,34 +141,37 @@
</span><span class="cx"> 
</span><span class="cx"> void History::go(int distance)
</span><span class="cx"> {
</span><del>-    LOG(History, "History %p go(%d) frame %p (main frame %d)", this, distance, m_frame, m_frame ? m_frame->isMainFrame() : false);
</del><ins>+    auto* frame = this->frame();
+    LOG(History, "History %p go(%d) frame %p (main frame %d)", this, distance, frame, frame ? frame->isMainFrame() : false);
</ins><span class="cx"> 
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_frame->navigationScheduler().scheduleHistoryNavigation(distance);
</del><ins>+    frame->navigationScheduler().scheduleHistoryNavigation(distance);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void History::go(Document& document, int distance)
</span><span class="cx"> {
</span><del>-    LOG(History, "History %p go(%d) in document %p frame %p (main frame %d)", this, distance, &document, m_frame, m_frame ? m_frame->isMainFrame() : false);
</del><ins>+    auto* frame = this->frame();
+    LOG(History, "History %p go(%d) in document %p frame %p (main frame %d)", this, distance, &document, frame, frame ? frame->isMainFrame() : false);
</ins><span class="cx"> 
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx"> 
</span><del>-    if (!document.canNavigate(m_frame))
</del><ins>+    if (!document.canNavigate(frame))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_frame->navigationScheduler().scheduleHistoryNavigation(distance);
</del><ins>+    frame->navigationScheduler().scheduleHistoryNavigation(distance);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> URL History::urlForState(const String& urlString)
</span><span class="cx"> {
</span><ins>+    auto* frame = this->frame();
</ins><span class="cx">     if (urlString.isNull())
</span><del>-        return m_frame->document()->url();
-    return m_frame->document()->completeURL(urlString);
</del><ins>+        return frame->document()->url();
+    return frame->document()->completeURL(urlString);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> History::stateObjectAdded(RefPtr<SerializedScriptValue>&& data, const String& title, const String& urlString, StateObjectType stateObjectType)
</span><span class="lines">@@ -176,7 +183,8 @@
</span><span class="cx">     static Seconds stateObjectTimeSpan { 30_s };
</span><span class="cx">     static unsigned perStateObjectTimeSpanLimit = 100;
</span><span class="cx"> 
</span><del>-    if (!m_frame || !m_frame->page())
</del><ins>+    auto* frame = this->frame();
+    if (!frame || !frame->page())
</ins><span class="cx">         return { };
</span><span class="cx"> 
</span><span class="cx">     URL fullURL = urlForState(urlString);
</span><span class="lines">@@ -183,7 +191,7 @@
</span><span class="cx">     if (!fullURL.isValid())
</span><span class="cx">         return Exception { SecurityError };
</span><span class="cx"> 
</span><del>-    const URL& documentURL = m_frame->document()->url();
</del><ins>+    const URL& documentURL = frame->document()->url();
</ins><span class="cx"> 
</span><span class="cx">     auto createBlockedURLSecurityErrorWithMessageSuffix = [&] (const char* suffix) {
</span><span class="cx">         const char* functionName = stateObjectType == StateObjectType::Replace ? "history.replaceState()" : "history.pushState()";
</span><span class="lines">@@ -192,7 +200,7 @@
</span><span class="cx">     if (!protocolHostAndPortAreEqual(fullURL, documentURL) || fullURL.user() != documentURL.user() || fullURL.pass() != documentURL.pass())
</span><span class="cx">         return createBlockedURLSecurityErrorWithMessageSuffix("Protocols, domains, ports, usernames, and passwords must match.");
</span><span class="cx"> 
</span><del>-    const auto& documentSecurityOrigin = m_frame->document()->securityOrigin();
</del><ins>+    const auto& documentSecurityOrigin = frame->document()->securityOrigin();
</ins><span class="cx">     // We allow sandboxed documents, 'data:'/'file:' URLs, etc. to use 'pushState'/'replaceState' to modify the URL query and fragments.
</span><span class="cx">     // See https://bugs.webkit.org/show_bug.cgi?id=183028 for the compatibility concerns.
</span><span class="cx">     bool allowSandboxException = (documentSecurityOrigin.isLocal() || documentSecurityOrigin.isUnique()) && equalIgnoringQueryAndFragment(documentURL, fullURL);
</span><span class="lines">@@ -200,7 +208,7 @@
</span><span class="cx">     if (!allowSandboxException && !documentSecurityOrigin.canRequest(fullURL) && (fullURL.path() != documentURL.path() || fullURL.query() != documentURL.query()))
</span><span class="cx">         return createBlockedURLSecurityErrorWithMessageSuffix("Paths and fragments must match for a sandboxed document.");
</span><span class="cx"> 
</span><del>-    Document* mainDocument = m_frame->page()->mainFrame().document();
</del><ins>+    Document* mainDocument = frame->page()->mainFrame().document();
</ins><span class="cx">     History* mainHistory = nullptr;
</span><span class="cx">     if (mainDocument) {
</span><span class="cx">         if (auto* mainDOMWindow = mainDocument->domWindow())
</span><span class="lines">@@ -250,14 +258,14 @@
</span><span class="cx">     ++mainHistory->m_currentStateObjectTimeSpanObjectsAdded;
</span><span class="cx"> 
</span><span class="cx">     if (!urlString.isEmpty())
</span><del>-        m_frame->document()->updateURLForPushOrReplaceState(fullURL);
</del><ins>+        frame->document()->updateURLForPushOrReplaceState(fullURL);
</ins><span class="cx"> 
</span><span class="cx">     if (stateObjectType == StateObjectType::Push) {
</span><del>-        m_frame->loader().history().pushState(WTFMove(data), title, fullURL.string());
-        m_frame->loader().client().dispatchDidPushStateWithinPage();
</del><ins>+        frame->loader().history().pushState(WTFMove(data), title, fullURL.string());
+        frame->loader().client().dispatchDidPushStateWithinPage();
</ins><span class="cx">     } else if (stateObjectType == StateObjectType::Replace) {
</span><del>-        m_frame->loader().history().replaceState(WTFMove(data), title, fullURL.string());
-        m_frame->loader().client().dispatchDidReplaceStateWithinPage();
</del><ins>+        frame->loader().history().replaceState(WTFMove(data), title, fullURL.string());
+        frame->loader().client().dispatchDidReplaceStateWithinPage();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return { };
</span></span></pre></div>
<a id="trunkSourceWebCorepageHistoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/History.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/History.h      2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/History.h 2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -35,12 +35,11 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class Document;
</span><del>-class Frame;
</del><span class="cx"> class URL;
</span><span class="cx"> 
</span><span class="cx"> class History final : public ScriptWrappable, public RefCounted<History>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    static Ref<History> create(Frame& frame) { return adoptRef(*new History(frame)); }
</del><ins>+    static Ref<History> create(DOMWindow& window) { return adoptRef(*new History(window)); }
</ins><span class="cx"> 
</span><span class="cx">     unsigned length() const;
</span><span class="cx">     
</span><span class="lines">@@ -69,7 +68,7 @@
</span><span class="cx">     ExceptionOr<void> replaceState(RefPtr<SerializedScriptValue>&& data, const String& title, const String& urlString);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit History(Frame&);
</del><ins>+    explicit History(DOMWindow&);
</ins><span class="cx"> 
</span><span class="cx">     enum class StateObjectType { Push, Replace };
</span><span class="cx">     ExceptionOr<void> stateObjectAdded(RefPtr<SerializedScriptValue>&&, const String& title, const String& url, StateObjectType);
</span></span></pre></div>
<a id="trunkSourceWebCorepageLocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Location.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Location.cpp   2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/Location.cpp      2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -39,16 +39,16 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-Location::Location(Frame* frame)
-    : DOMWindowProperty(frame)
</del><ins>+Location::Location(DOMWindow& window)
+    : DOMWindowProperty(&window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline const URL& Location::url() const
</span><span class="cx"> {
</span><del>-    ASSERT(m_frame);
</del><ins>+    ASSERT(frame());
</ins><span class="cx"> 
</span><del>-    const URL& url = m_frame->document()->url();
</del><ins>+    const URL& url = frame()->document()->url();
</ins><span class="cx">     if (!url.isValid())
</span><span class="cx">         return blankURL(); // Use "about:blank" while the page is still loading (before we have a frame).
</span><span class="cx"> 
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> 
</span><span class="cx"> String Location::href() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return String();
</span><span class="cx"> 
</span><span class="cx">     auto& url = this->url();
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx"> 
</span><span class="cx"> String Location::protocol() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return String();
</span><span class="cx"> 
</span><span class="cx">     return makeString(url().protocol(), ":");
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> 
</span><span class="cx"> String Location::host() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return String();
</span><span class="cx"> 
</span><span class="cx">     // Note: this is the IE spec. The NS spec swaps the two, it says
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> 
</span><span class="cx"> String Location::hostname() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return String();
</span><span class="cx"> 
</span><span class="cx">     return url().host().toString();
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> 
</span><span class="cx"> String Location::port() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return String();
</span><span class="cx"> 
</span><span class="cx">     const URL& url = this->url();
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx"> 
</span><span class="cx"> String Location::pathname() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return String();
</span><span class="cx"> 
</span><span class="cx">     const URL& url = this->url();
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx"> 
</span><span class="cx"> String Location::search() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return String();
</span><span class="cx"> 
</span><span class="cx">     const URL& url = this->url();
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx"> 
</span><span class="cx"> String Location::origin() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return String();
</span><span class="cx">     return SecurityOrigin::create(url())->toString();
</span><span class="cx"> }
</span><span class="lines">@@ -134,16 +134,17 @@
</span><span class="cx"> Ref<DOMStringList> Location::ancestorOrigins() const
</span><span class="cx"> {
</span><span class="cx">     auto origins = DOMStringList::create();
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return origins;
</span><del>-    for (Frame* frame = m_frame->tree().parent(); frame; frame = frame->tree().parent())
-        origins->append(frame->document()->securityOrigin().toString());
</del><ins>+    for (auto* ancestor = frame->tree().parent(); ancestor; ancestor = ancestor->tree().parent())
+        origins->append(ancestor->document()->securityOrigin().toString());
</ins><span class="cx">     return origins;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String Location::hash() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return String();
</span><span class="cx"> 
</span><span class="cx">     const String& fragmentIdentifier = url().fragmentIdentifier();
</span><span class="lines">@@ -152,7 +153,7 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> Location::setHref(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& url)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return { };
</span><span class="cx">     return setLocation(activeWindow, firstWindow, url);
</span><span class="cx"> }
</span><span class="lines">@@ -159,9 +160,10 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> Location::setProtocol(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& protocol)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return { };
</span><del>-    URL url = m_frame->document()->url();
</del><ins>+    URL url = frame->document()->url();
</ins><span class="cx">     if (!url.setProtocol(protocol))
</span><span class="cx">         return Exception { SyntaxError };
</span><span class="cx">     return setLocation(activeWindow, firstWindow, url.string());
</span><span class="lines">@@ -169,9 +171,10 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> Location::setHost(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& host)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return { };
</span><del>-    URL url = m_frame->document()->url();
</del><ins>+    URL url = frame->document()->url();
</ins><span class="cx">     url.setHostAndPort(host);
</span><span class="cx">     return setLocation(activeWindow, firstWindow, url.string());
</span><span class="cx"> }
</span><span class="lines">@@ -178,9 +181,10 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> Location::setHostname(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& hostname)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return { };
</span><del>-    URL url = m_frame->document()->url();
</del><ins>+    URL url = frame->document()->url();
</ins><span class="cx">     url.setHost(hostname);
</span><span class="cx">     return setLocation(activeWindow, firstWindow, url.string());
</span><span class="cx"> }
</span><span class="lines">@@ -187,9 +191,10 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> Location::setPort(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& portString)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return { };
</span><del>-    URL url = m_frame->document()->url();
</del><ins>+    URL url = frame->document()->url();
</ins><span class="cx">     int port = portString.toInt();
</span><span class="cx">     if (port < 0 || port > 0xFFFF || portString.isEmpty())
</span><span class="cx">         url.removePort();
</span><span class="lines">@@ -200,9 +205,10 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> Location::setPathname(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& pathname)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return { };
</span><del>-    URL url = m_frame->document()->url();
</del><ins>+    URL url = frame->document()->url();
</ins><span class="cx">     url.setPath(pathname);
</span><span class="cx">     return setLocation(activeWindow, firstWindow, url.string());
</span><span class="cx"> }
</span><span class="lines">@@ -209,9 +215,10 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> Location::setSearch(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& search)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return { };
</span><del>-    URL url = m_frame->document()->url();
</del><ins>+    URL url = frame->document()->url();
</ins><span class="cx">     url.setQuery(search);
</span><span class="cx">     return setLocation(activeWindow, firstWindow, url.string());
</span><span class="cx"> }
</span><span class="lines">@@ -218,10 +225,11 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> Location::setHash(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& hash)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return { };
</span><del>-    ASSERT(m_frame->document());
-    auto url = m_frame->document()->url();
</del><ins>+    ASSERT(frame->document());
+    auto url = frame->document()->url();
</ins><span class="cx">     auto oldFragmentIdentifier = url.fragmentIdentifier();
</span><span class="cx">     auto newFragmentIdentifier = hash;
</span><span class="cx">     if (hash[0] == '#')
</span><span class="lines">@@ -237,7 +245,7 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> Location::assign(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& url)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return { };
</span><span class="cx">     return setLocation(activeWindow, firstWindow, url);
</span><span class="cx"> }
</span><span class="lines">@@ -244,25 +252,27 @@
</span><span class="cx"> 
</span><span class="cx"> void Location::replace(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& url)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return;
</span><del>-    ASSERT(m_frame->document());
-    ASSERT(m_frame->document()->domWindow());
</del><ins>+    ASSERT(frame->document());
+    ASSERT(frame->document()->domWindow());
</ins><span class="cx">     // We call DOMWindow::setLocation directly here because replace() always operates on the current frame.
</span><del>-    m_frame->document()->domWindow()->setLocation(activeWindow, firstWindow, url, LockHistoryAndBackForwardList);
</del><ins>+    frame->document()->domWindow()->setLocation(activeWindow, firstWindow, url, LockHistoryAndBackForwardList);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Location::reload(DOMWindow& activeWindow)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     ASSERT(activeWindow.document());
</span><del>-    ASSERT(m_frame->document());
-    ASSERT(m_frame->document()->domWindow());
</del><ins>+    ASSERT(frame->document());
+    ASSERT(frame->document()->domWindow());
</ins><span class="cx"> 
</span><span class="cx">     auto& activeDocument = *activeWindow.document();
</span><del>-    auto& targetDocument = *m_frame->document();
</del><ins>+    auto& targetDocument = *frame->document();
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: It's not clear this cross-origin security check is valuable.
</span><span class="cx">     // We allow one page to change the location of another. Why block attempts to reload?
</span><span class="lines">@@ -276,17 +286,18 @@
</span><span class="cx">     if (protocolIsJavaScript(targetDocument.url()))
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_frame->navigationScheduler().scheduleRefresh(activeDocument);
</del><ins>+    frame->navigationScheduler().scheduleRefresh(activeDocument);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> Location::setLocation(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& url)
</span><span class="cx"> {
</span><del>-    ASSERT(m_frame);
-    if (!activeWindow.document()->canNavigate(m_frame))
</del><ins>+    auto* frame = this->frame();
+    ASSERT(frame);
+    if (!activeWindow.document()->canNavigate(frame))
</ins><span class="cx">         return Exception { SecurityError };
</span><del>-    ASSERT(m_frame->document());
-    ASSERT(m_frame->document()->domWindow());
-    m_frame->document()->domWindow()->setLocation(activeWindow, firstWindow, url);
</del><ins>+    ASSERT(frame->document());
+    ASSERT(frame->document()->domWindow());
+    frame->document()->domWindow()->setLocation(activeWindow, firstWindow, url);
</ins><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageLocationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Location.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Location.h     2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/Location.h        2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -36,12 +36,11 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class DOMWindow;
</span><del>-class Frame;
</del><span class="cx"> class URL;
</span><span class="cx"> 
</span><span class="cx"> class Location : public ScriptWrappable, public RefCounted<Location>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    static Ref<Location> create(Frame* frame) { return adoptRef(*new Location(frame)); }
</del><ins>+    static Ref<Location> create(DOMWindow& window) { return adoptRef(*new Location(window)); }
</ins><span class="cx"> 
</span><span class="cx">     ExceptionOr<void> setHref(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
</span><span class="cx">     String href() const;
</span><span class="lines">@@ -71,7 +70,7 @@
</span><span class="cx">     Ref<DOMStringList> ancestorOrigins() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit Location(Frame*);
</del><ins>+    explicit Location(DOMWindow&);
</ins><span class="cx"> 
</span><span class="cx">     ExceptionOr<void> setLocation(DOMWindow& activeWindow, DOMWindow& firstWindow, const String&);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageNavigatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Navigator.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Navigator.cpp  2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/Navigator.cpp     2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -49,9 +49,9 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> using namespace WTF;
</span><span class="cx"> 
</span><del>-Navigator::Navigator(ScriptExecutionContext& context, Frame& frame)
</del><ins>+Navigator::Navigator(ScriptExecutionContext& context, DOMWindow& window)
</ins><span class="cx">     : NavigatorBase(context)
</span><del>-    , DOMWindowProperty(&frame)
</del><ins>+    , DOMWindowProperty(&window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -73,12 +73,13 @@
</span><span class="cx"> 
</span><span class="cx"> String Navigator::appVersion() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return String();
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
</span><del>-        ResourceLoadObserver::shared().logNavigatorAPIAccessed(*m_frame->document(), ResourceLoadStatistics::NavigatorAPI::AppVersion);
</del><ins>+        ResourceLoadObserver::shared().logNavigatorAPIAccessed(*frame->document(), ResourceLoadStatistics::NavigatorAPI::AppVersion);
</ins><span class="cx">     String appVersion = NavigatorBase::appVersion();
</span><del>-    if (shouldHideFourDot(*m_frame))
</del><ins>+    if (shouldHideFourDot(*frame))
</ins><span class="cx">         appVersion.replace("4.", "4_");
</span><span class="cx">     return appVersion;
</span><span class="cx"> }
</span><span class="lines">@@ -85,12 +86,13 @@
</span><span class="cx"> 
</span><span class="cx"> const String& Navigator::userAgent() const
</span><span class="cx"> {
</span><del>-    if (!m_frame || !m_frame->page())
</del><ins>+    auto* frame = this->frame();
+    if (!frame || !frame->page())
</ins><span class="cx">         return m_userAgent;
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
</span><del>-        ResourceLoadObserver::shared().logNavigatorAPIAccessed(*m_frame->document(), ResourceLoadStatistics::NavigatorAPI::UserAgent);
</del><ins>+        ResourceLoadObserver::shared().logNavigatorAPIAccessed(*frame->document(), ResourceLoadStatistics::NavigatorAPI::UserAgent);
</ins><span class="cx">     if (m_userAgent.isNull())
</span><del>-        m_userAgent = m_frame->loader().userAgent(m_frame->document()->url());
</del><ins>+        m_userAgent = frame->loader().userAgent(frame->document()->url());
</ins><span class="cx">     return m_userAgent;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -106,7 +108,8 @@
</span><span class="cx"> 
</span><span class="cx"> void Navigator::share(ScriptExecutionContext& context, ShareData data, Ref<DeferredPromise>&& promise)
</span><span class="cx"> {
</span><del>-    if (!m_frame || !m_frame->page()) {
</del><ins>+    auto* frame = this->frame();
+    if (!frame || !frame->page()) {
</ins><span class="cx">         promise->reject(TypeError);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -132,7 +135,7 @@
</span><span class="cx">         url,
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    m_frame->page()->chrome().showShareSheet(shareData, [promise = WTFMove(promise)] (bool completed) {
</del><ins>+    frame->page()->chrome().showShareSheet(shareData, [promise = WTFMove(promise)] (bool completed) {
</ins><span class="cx">         if (completed) {
</span><span class="cx">             promise->resolve();
</span><span class="cx">             return;
</span><span class="lines">@@ -144,11 +147,11 @@
</span><span class="cx"> DOMPluginArray& Navigator::plugins()
</span><span class="cx"> {
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled()) {
</span><del>-        if (m_frame)
-            ResourceLoadObserver::shared().logNavigatorAPIAccessed(*m_frame->document(), ResourceLoadStatistics::NavigatorAPI::Plugins);
</del><ins>+        if (auto* frame = this->frame())
+            ResourceLoadObserver::shared().logNavigatorAPIAccessed(*frame->document(), ResourceLoadStatistics::NavigatorAPI::Plugins);
</ins><span class="cx">     }
</span><span class="cx">     if (!m_plugins)
</span><del>-        m_plugins = DOMPluginArray::create(m_frame);
</del><ins>+        m_plugins = DOMPluginArray::create(m_window);
</ins><span class="cx">     return *m_plugins;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -155,26 +158,27 @@
</span><span class="cx"> DOMMimeTypeArray& Navigator::mimeTypes()
</span><span class="cx"> {
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled()) {
</span><del>-        if (m_frame)
-            ResourceLoadObserver::shared().logNavigatorAPIAccessed(*m_frame->document(), ResourceLoadStatistics::NavigatorAPI::MimeTypes);
</del><ins>+        if (auto* frame = this->frame())
+            ResourceLoadObserver::shared().logNavigatorAPIAccessed(*frame->document(), ResourceLoadStatistics::NavigatorAPI::MimeTypes);
</ins><span class="cx">     }
</span><span class="cx">     if (!m_mimeTypes)
</span><del>-        m_mimeTypes = DOMMimeTypeArray::create(m_frame);
</del><ins>+        m_mimeTypes = DOMMimeTypeArray::create(m_window);
</ins><span class="cx">     return *m_mimeTypes;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool Navigator::cookieEnabled() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
</span><del>-        ResourceLoadObserver::shared().logNavigatorAPIAccessed(*m_frame->document(), ResourceLoadStatistics::NavigatorAPI::CookieEnabled);
</del><ins>+        ResourceLoadObserver::shared().logNavigatorAPIAccessed(*frame->document(), ResourceLoadStatistics::NavigatorAPI::CookieEnabled);
</ins><span class="cx"> 
</span><del>-    if (m_frame->page() && !m_frame->page()->settings().cookieEnabled())
</del><ins>+    if (frame->page() && !frame->page()->settings().cookieEnabled())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto* document = m_frame->document();
</del><ins>+    auto* document = frame->document();
</ins><span class="cx">     if (!document)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -183,15 +187,16 @@
</span><span class="cx"> 
</span><span class="cx"> bool Navigator::javaEnabled() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
</span><del>-        ResourceLoadObserver::shared().logNavigatorAPIAccessed(*m_frame->document(), ResourceLoadStatistics::NavigatorAPI::JavaEnabled);
</del><ins>+        ResourceLoadObserver::shared().logNavigatorAPIAccessed(*frame->document(), ResourceLoadStatistics::NavigatorAPI::JavaEnabled);
</ins><span class="cx"> 
</span><del>-    if (!m_frame->settings().isJavaEnabled())
</del><ins>+    if (!frame->settings().isJavaEnabled())
</ins><span class="cx">         return false;
</span><del>-    if (m_frame->document()->securityOrigin().isLocal() && !m_frame->settings().isJavaEnabledForLocalFiles())
</del><ins>+    if (frame->document()->securityOrigin().isLocal() && !frame->settings().isJavaEnabledForLocalFiles())
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="lines">@@ -201,7 +206,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool Navigator::standalone() const
</span><span class="cx"> {
</span><del>-    return m_frame && m_frame->settings().standalone();
</del><ins>+    auto* frame = this->frame();
+    return frame && frame->settings().standalone();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorepageNavigatorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Navigator.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Navigator.h    2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/Navigator.h       2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> 
</span><span class="cx"> class Navigator final : public NavigatorBase, public ScriptWrappable, public DOMWindowProperty, public Supplementable<Navigator> {
</span><span class="cx"> public:
</span><del>-    static Ref<Navigator> create(ScriptExecutionContext& context, Frame& frame) { return adoptRef(*new Navigator(context, frame)); }
</del><ins>+    static Ref<Navigator> create(ScriptExecutionContext& context, DOMWindow& window) { return adoptRef(*new Navigator(context, window)); }
</ins><span class="cx">     virtual ~Navigator();
</span><span class="cx"> 
</span><span class="cx">     String appVersion() const;
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     void getStorageUpdates();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit Navigator(ScriptExecutionContext&, Frame&);
</del><ins>+    explicit Navigator(ScriptExecutionContext&, DOMWindow&);
</ins><span class="cx"> 
</span><span class="cx">     mutable RefPtr<DOMPluginArray> m_plugins;
</span><span class="cx">     mutable RefPtr<DOMMimeTypeArray> m_mimeTypes;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformancecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Performance.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Performance.cpp        2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/Performance.cpp   2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx">     if (!m_navigation)
</span><del>-        m_navigation = PerformanceNavigation::create(downcast<Document>(*scriptExecutionContext()).frame());
</del><ins>+        m_navigation = PerformanceNavigation::create(downcast<Document>(*scriptExecutionContext()).domWindow());
</ins><span class="cx">     return m_navigation.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx">     if (!m_timing)
</span><del>-        m_timing = PerformanceTiming::create(downcast<Document>(*scriptExecutionContext()).frame());
</del><ins>+        m_timing = PerformanceTiming::create(downcast<Document>(*scriptExecutionContext()).domWindow());
</ins><span class="cx">     return m_timing.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceNavigationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceNavigation.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceNavigation.cpp      2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/PerformanceNavigation.cpp 2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -38,17 +38,18 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-PerformanceNavigation::PerformanceNavigation(Frame* frame)
-    : DOMWindowProperty(frame)
</del><ins>+PerformanceNavigation::PerformanceNavigation(DOMWindow* window)
+    : DOMWindowProperty(window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned short PerformanceNavigation::type() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return TYPE_NAVIGATE;
</span><span class="cx"> 
</span><del>-    DocumentLoader* documentLoader = m_frame->loader().documentLoader();
</del><ins>+    DocumentLoader* documentLoader = frame->loader().documentLoader();
</ins><span class="cx">     if (!documentLoader)
</span><span class="cx">         return TYPE_NAVIGATE;
</span><span class="cx"> 
</span><span class="lines">@@ -65,10 +66,11 @@
</span><span class="cx"> 
</span><span class="cx"> unsigned short PerformanceNavigation::redirectCount() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    DocumentLoader* loader = m_frame->loader().documentLoader();
</del><ins>+    DocumentLoader* loader = frame->loader().documentLoader();
</ins><span class="cx">     if (!loader)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceNavigationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceNavigation.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceNavigation.h        2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/PerformanceNavigation.h   2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -36,11 +36,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class Frame;
-
</del><span class="cx"> class PerformanceNavigation : public RefCounted<PerformanceNavigation>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    static Ref<PerformanceNavigation> create(Frame* frame) { return adoptRef(*new PerformanceNavigation(frame)); }
</del><ins>+    static Ref<PerformanceNavigation> create(DOMWindow* window) { return adoptRef(*new PerformanceNavigation(window)); }
</ins><span class="cx"> 
</span><span class="cx">     enum PerformanceNavigationType {
</span><span class="cx">         TYPE_NAVIGATE,
</span><span class="lines">@@ -53,7 +51,7 @@
</span><span class="cx">     unsigned short redirectCount() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit PerformanceNavigation(Frame*);
</del><ins>+    explicit PerformanceNavigation(DOMWindow*);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceTimingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceTiming.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceTiming.cpp  2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/PerformanceTiming.cpp     2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -43,8 +43,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-PerformanceTiming::PerformanceTiming(Frame* frame)
-    : DOMWindowProperty(frame)
</del><ins>+PerformanceTiming::PerformanceTiming(DOMWindow* window)
+    : DOMWindowProperty(window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -296,18 +296,20 @@
</span><span class="cx"> 
</span><span class="cx"> DocumentLoader* PerformanceTiming::documentLoader() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    return m_frame->loader().documentLoader();
</del><ins>+    return frame->loader().documentLoader();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const DocumentTiming* PerformanceTiming::documentTiming() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    Document* document = m_frame->document();
</del><ins>+    Document* document = frame->document();
</ins><span class="cx">     if (!document)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceTimingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceTiming.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceTiming.h    2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/PerformanceTiming.h       2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -38,13 +38,12 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class DocumentLoader;
</span><del>-class Frame;
</del><span class="cx"> class LoadTiming;
</span><span class="cx"> struct DocumentTiming;
</span><span class="cx"> 
</span><span class="cx"> class PerformanceTiming : public RefCounted<PerformanceTiming>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    static Ref<PerformanceTiming> create(Frame* frame) { return adoptRef(*new PerformanceTiming(frame)); }
</del><ins>+    static Ref<PerformanceTiming> create(DOMWindow* window) { return adoptRef(*new PerformanceTiming(window)); }
</ins><span class="cx"> 
</span><span class="cx">     unsigned long long navigationStart() const;
</span><span class="cx">     unsigned long long unloadEventStart() const;
</span><span class="lines">@@ -69,7 +68,7 @@
</span><span class="cx">     unsigned long long loadEventEnd() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit PerformanceTiming(Frame*);
</del><ins>+    explicit PerformanceTiming(DOMWindow*);
</ins><span class="cx"> 
</span><span class="cx">     const DocumentTiming* documentTiming() const;
</span><span class="cx">     DocumentLoader* documentLoader() const;
</span></span></pre></div>
<a id="trunkSourceWebCorepageScreencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Screen.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Screen.cpp     2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/Screen.cpp        2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -38,83 +38,91 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-Screen::Screen(Frame* frame)
-    : DOMWindowProperty(frame)
</del><ins>+Screen::Screen(DOMWindow& window)
+    : DOMWindowProperty(&window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned Screen::height() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return 0;
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
</span><del>-        ResourceLoadObserver::shared().logScreenAPIAccessed(*m_frame->document(), ResourceLoadStatistics::ScreenAPI::Height);
-    long height = static_cast<long>(screenRect(m_frame->view()).height());
</del><ins>+        ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::Height);
+    long height = static_cast<long>(screenRect(frame->view()).height());
</ins><span class="cx">     return static_cast<unsigned>(height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned Screen::width() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return 0;
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
</span><del>-        ResourceLoadObserver::shared().logScreenAPIAccessed(*m_frame->document(), ResourceLoadStatistics::ScreenAPI::Width);
-    long width = static_cast<long>(screenRect(m_frame->view()).width());
</del><ins>+        ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::Width);
+    long width = static_cast<long>(screenRect(frame->view()).width());
</ins><span class="cx">     return static_cast<unsigned>(width);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned Screen::colorDepth() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return 0;
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
</span><del>-        ResourceLoadObserver::shared().logScreenAPIAccessed(*m_frame->document(), ResourceLoadStatistics::ScreenAPI::ColorDepth);
-    return static_cast<unsigned>(screenDepth(m_frame->view()));
</del><ins>+        ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::ColorDepth);
+    return static_cast<unsigned>(screenDepth(frame->view()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned Screen::pixelDepth() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return 0;
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
</span><del>-        ResourceLoadObserver::shared().logScreenAPIAccessed(*m_frame->document(), ResourceLoadStatistics::ScreenAPI::PixelDepth);
-    return static_cast<unsigned>(screenDepth(m_frame->view()));
</del><ins>+        ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::PixelDepth);
+    return static_cast<unsigned>(screenDepth(frame->view()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int Screen::availLeft() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return 0;
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
</span><del>-        ResourceLoadObserver::shared().logScreenAPIAccessed(*m_frame->document(), ResourceLoadStatistics::ScreenAPI::AvailLeft);
-    return static_cast<int>(screenAvailableRect(m_frame->view()).x());
</del><ins>+        ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::AvailLeft);
+    return static_cast<int>(screenAvailableRect(frame->view()).x());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int Screen::availTop() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return 0;
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
</span><del>-        ResourceLoadObserver::shared().logScreenAPIAccessed(*m_frame->document(), ResourceLoadStatistics::ScreenAPI::AvailTop);
-    return static_cast<int>(screenAvailableRect(m_frame->view()).y());
</del><ins>+        ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::AvailTop);
+    return static_cast<int>(screenAvailableRect(frame->view()).y());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned Screen::availHeight() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return 0;
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
</span><del>-        ResourceLoadObserver::shared().logScreenAPIAccessed(*m_frame->document(), ResourceLoadStatistics::ScreenAPI::AvailHeight);
-    return static_cast<unsigned>(screenAvailableRect(m_frame->view()).height());
</del><ins>+        ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::AvailHeight);
+    return static_cast<unsigned>(screenAvailableRect(frame->view()).height());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> unsigned Screen::availWidth() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return 0;
</span><span class="cx">     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
</span><del>-        ResourceLoadObserver::shared().logScreenAPIAccessed(*m_frame->document(), ResourceLoadStatistics::ScreenAPI::AvailWidth);
-    return static_cast<unsigned>(screenAvailableRect(m_frame->view()).width());
</del><ins>+        ResourceLoadObserver::shared().logScreenAPIAccessed(*frame->document(), ResourceLoadStatistics::ScreenAPI::AvailWidth);
+    return static_cast<unsigned>(screenAvailableRect(frame->view()).width());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepageScreenh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Screen.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Screen.h       2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/Screen.h  2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -36,11 +36,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class Frame;
-
</del><span class="cx"> class Screen final : public ScriptWrappable, public RefCounted<Screen>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    static Ref<Screen> create(Frame* frame) { return adoptRef(*new Screen(frame)); }
</del><ins>+    static Ref<Screen> create(DOMWindow& window) { return adoptRef(*new Screen(window)); }
</ins><span class="cx"> 
</span><span class="cx">     unsigned height() const;
</span><span class="cx">     unsigned width() const;
</span><span class="lines">@@ -52,7 +50,7 @@
</span><span class="cx">     unsigned availWidth() const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit Screen(Frame*);
</del><ins>+    explicit Screen(DOMWindow&);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepageVisualViewportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/VisualViewport.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/VisualViewport.cpp     2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/VisualViewport.cpp        2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -38,8 +38,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-VisualViewport::VisualViewport(Frame* frame)
-    : DOMWindowProperty(frame)
</del><ins>+VisualViewport::VisualViewport(DOMWindow& window)
+    : DOMWindowProperty(&window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -50,9 +50,9 @@
</span><span class="cx"> 
</span><span class="cx"> ScriptExecutionContext* VisualViewport::scriptExecutionContext() const
</span><span class="cx"> {
</span><del>-    if (!m_associatedDOMWindow)
</del><ins>+    if (!m_window)
</ins><span class="cx">         return nullptr;
</span><del>-    return static_cast<ContextDestructionObserver*>(m_associatedDOMWindow)->scriptExecutionContext();
</del><ins>+    return static_cast<ContextDestructionObserver*>(m_window)->scriptExecutionContext();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool VisualViewport::addEventListener(const AtomicString& eventType, Ref<EventListener>&& listener, const AddEventListenerOptions& options)
</span><span class="lines">@@ -60,20 +60,20 @@
</span><span class="cx">     if (!EventTarget::addEventListener(eventType, WTFMove(listener), options))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (m_frame)
-        m_frame->document()->addListenerTypeIfNeeded(eventType);
</del><ins>+    if (auto* frame = this->frame())
+        frame->document()->addListenerTypeIfNeeded(eventType);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void VisualViewport::updateFrameLayout() const
</span><span class="cx"> {
</span><del>-    ASSERT(m_frame);
-    m_frame->document()->updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasks::Synchronously);
</del><ins>+    ASSERT(frame());
+    frame()->document()->updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasks::Synchronously);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> double VisualViewport::offsetLeft() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     updateFrameLayout();
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx"> 
</span><span class="cx"> double VisualViewport::offsetTop() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     updateFrameLayout();
</span><span class="lines">@@ -91,7 +91,7 @@
</span><span class="cx"> 
</span><span class="cx"> double VisualViewport::pageLeft() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     updateFrameLayout();
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> 
</span><span class="cx"> double VisualViewport::pageTop() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     updateFrameLayout();
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx"> 
</span><span class="cx"> double VisualViewport::width() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     updateFrameLayout();
</span><span class="lines">@@ -118,7 +118,7 @@
</span><span class="cx"> 
</span><span class="cx"> double VisualViewport::height() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    if (!frame())
</ins><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="cx">     updateFrameLayout();
</span><span class="lines">@@ -128,7 +128,8 @@
</span><span class="cx"> double VisualViewport::scale() const
</span><span class="cx"> {
</span><span class="cx">     // Subframes always have scale 1 since they aren't scaled relative to their parent frame.
</span><del>-    if (!m_frame || !m_frame->isMainFrame())
</del><ins>+    auto* frame = this->frame();
+    if (!frame || !frame->isMainFrame())
</ins><span class="cx">         return 1;
</span><span class="cx"> 
</span><span class="cx">     updateFrameLayout();
</span><span class="lines">@@ -145,11 +146,11 @@
</span><span class="cx">     double height = 0;
</span><span class="cx">     double scale = 1;
</span><span class="cx"> 
</span><del>-    if (m_frame) {
-        if (auto* view = m_frame->view()) {
</del><ins>+    if (auto* frame = this->frame()) {
+        if (auto* view = frame->view()) {
</ins><span class="cx">             auto visualViewportRect = view->visualViewportRect();
</span><span class="cx">             auto layoutViewportRect = view->layoutViewportRect();
</span><del>-            auto pageZoomFactor = m_frame->pageZoomFactor();
</del><ins>+            auto pageZoomFactor = frame->pageZoomFactor();
</ins><span class="cx">             ASSERT(pageZoomFactor);
</span><span class="cx">             offsetLeft = (visualViewportRect.x() - layoutViewportRect.x()) / pageZoomFactor;
</span><span class="cx">             offsetTop = (visualViewportRect.y() - layoutViewportRect.y()) / pageZoomFactor;
</span><span class="lines">@@ -158,7 +159,7 @@
</span><span class="cx">             width = visualViewportRect.width() / pageZoomFactor;
</span><span class="cx">             height = visualViewportRect.height() / pageZoomFactor;
</span><span class="cx">         }
</span><del>-        if (auto* page = m_frame->page())
</del><ins>+        if (auto* page = frame->page())
</ins><span class="cx">             scale = page->pageScaleFactor();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -177,18 +178,20 @@
</span><span class="cx"> 
</span><span class="cx"> void VisualViewport::enqueueResizeEvent()
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_frame->document()->eventQueue().enqueueResizeEvent(*this, Event::CanBubble::No, Event::IsCancelable::No);
</del><ins>+    frame->document()->eventQueue().enqueueResizeEvent(*this, Event::CanBubble::No, Event::IsCancelable::No);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void VisualViewport::enqueueScrollEvent()
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_frame->document()->eventQueue().enqueueScrollEvent(*this, Event::CanBubble::No, Event::IsCancelable::No);
</del><ins>+    frame->document()->eventQueue().enqueueScrollEvent(*this, Event::CanBubble::No, Event::IsCancelable::No);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepageVisualViewporth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/VisualViewport.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/VisualViewport.h       2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/VisualViewport.h  2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -31,11 +31,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class Frame;
-
</del><span class="cx"> class VisualViewport final : public RefCounted<VisualViewport>, public EventTargetWithInlineData, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    static Ref<VisualViewport> create(Frame* frame) { return adoptRef(*new VisualViewport(frame)); }
</del><ins>+    static Ref<VisualViewport> create(DOMWindow& window) { return adoptRef(*new VisualViewport(window)); }
</ins><span class="cx"> 
</span><span class="cx">     // EventTarget
</span><span class="cx">     EventTargetInterface eventTargetInterface() const final;
</span><span class="lines">@@ -56,7 +54,7 @@
</span><span class="cx">     using RefCounted::deref;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit VisualViewport(Frame*);
</del><ins>+    explicit VisualViewport(DOMWindow&);
</ins><span class="cx"> 
</span><span class="cx">     void refEventTarget() final { ref(); }
</span><span class="cx">     void derefEventTarget() final { deref(); }
</span></span></pre></div>
<a id="trunkSourceWebCorepageWebKitNamespacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/WebKitNamespace.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/WebKitNamespace.cpp    2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/WebKitNamespace.cpp       2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -33,10 +33,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-WebKitNamespace::WebKitNamespace(Frame& frame, UserContentProvider& userContentProvider)
-    : DOMWindowProperty(&frame)
-    , m_messageHandlerNamespace(UserMessageHandlersNamespace::create(frame, userContentProvider))
</del><ins>+WebKitNamespace::WebKitNamespace(DOMWindow& window, UserContentProvider& userContentProvider)
+    : DOMWindowProperty(&window)
+    , m_messageHandlerNamespace(UserMessageHandlersNamespace::create(*window.frame(), userContentProvider))
</ins><span class="cx"> {
</span><ins>+    ASSERT(window.frame());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebKitNamespace::~WebKitNamespace() = default;
</span></span></pre></div>
<a id="trunkSourceWebCorepageWebKitNamespaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/WebKitNamespace.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/WebKitNamespace.h      2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/page/WebKitNamespace.h 2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -33,15 +33,14 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class Frame;
</del><span class="cx"> class UserContentProvider;
</span><span class="cx"> class UserMessageHandlersNamespace;
</span><span class="cx"> 
</span><span class="cx"> class WebKitNamespace : public DOMWindowProperty, public RefCounted<WebKitNamespace> {
</span><span class="cx"> public:
</span><del>-    static Ref<WebKitNamespace> create(Frame& frame, UserContentProvider& userContentProvider)
</del><ins>+    static Ref<WebKitNamespace> create(DOMWindow& window, UserContentProvider& userContentProvider)
</ins><span class="cx">     {
</span><del>-        return adoptRef(*new WebKitNamespace(frame, userContentProvider));
</del><ins>+        return adoptRef(*new WebKitNamespace(window, userContentProvider));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     virtual ~WebKitNamespace();
</span><span class="lines">@@ -49,7 +48,7 @@
</span><span class="cx">     UserMessageHandlersNamespace* messageHandlers();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit WebKitNamespace(Frame&, UserContentProvider&);
</del><ins>+    explicit WebKitNamespace(DOMWindow&, UserContentProvider&);
</ins><span class="cx"> 
</span><span class="cx">     Ref<UserMessageHandlersNamespace> m_messageHandlerNamespace;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsDOMMimeTypeArraycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/DOMMimeTypeArray.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/DOMMimeTypeArray.cpp        2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/plugins/DOMMimeTypeArray.cpp   2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -28,8 +28,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-DOMMimeTypeArray::DOMMimeTypeArray(Frame* frame)
-    : DOMWindowProperty(frame)
</del><ins>+DOMMimeTypeArray::DOMMimeTypeArray(DOMWindow* window)
+    : DOMWindowProperty(window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (index >= mimes.size())
</span><span class="cx">         return nullptr;
</span><del>-    return DOMMimeType::create(data, m_frame, index);
</del><ins>+    return DOMMimeType::create(data, frame(), index);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr<DOMMimeType> DOMMimeTypeArray::namedItem(const AtomicString& propertyName)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">     data->getWebVisibleMimesAndPluginIndices(mimes, mimePluginIndices);
</span><span class="cx">     for (unsigned i = 0; i < mimes.size(); ++i) {
</span><span class="cx">         if (mimes[i].type == propertyName)
</span><del>-            return DOMMimeType::create(data, m_frame, i);
</del><ins>+            return DOMMimeType::create(data, frame(), i);
</ins><span class="cx">     }
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -98,16 +98,15 @@
</span><span class="cx"> 
</span><span class="cx"> PluginData* DOMMimeTypeArray::getPluginData() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    Page* page = m_frame->page();
</del><ins>+    auto* page = frame->page();
</ins><span class="cx">     if (!page)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    PluginData* pluginData = &page->pluginData();
-
-    return pluginData;
</del><ins>+    return &page->pluginData();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsDOMMimeTypeArrayh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/DOMMimeTypeArray.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/DOMMimeTypeArray.h  2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/plugins/DOMMimeTypeArray.h     2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -27,12 +27,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class Frame;
</del><span class="cx"> class PluginData;
</span><span class="cx"> 
</span><span class="cx"> class DOMMimeTypeArray : public ScriptWrappable, public RefCounted<DOMMimeTypeArray>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    static Ref<DOMMimeTypeArray> create(Frame* frame) { return adoptRef(*new DOMMimeTypeArray(frame)); }
</del><ins>+    static Ref<DOMMimeTypeArray> create(DOMWindow* window) { return adoptRef(*new DOMMimeTypeArray(window)); }
</ins><span class="cx">     ~DOMMimeTypeArray();
</span><span class="cx"> 
</span><span class="cx">     unsigned length() const;
</span><span class="lines">@@ -41,7 +40,7 @@
</span><span class="cx">     Vector<AtomicString> supportedPropertyNames();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit DOMMimeTypeArray(Frame*);
</del><ins>+    explicit DOMMimeTypeArray(DOMWindow*);
</ins><span class="cx">     PluginData* getPluginData() const;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsDOMPluginArraycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/DOMPluginArray.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/DOMPluginArray.cpp  2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/plugins/DOMPluginArray.cpp     2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -28,8 +28,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-DOMPluginArray::DOMPluginArray(Frame* frame)
-    : DOMWindowProperty(frame)
</del><ins>+DOMPluginArray::DOMPluginArray(DOMWindow* window)
+    : DOMWindowProperty(window)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     const Vector<PluginInfo>& plugins = data->publiclyVisiblePlugins();
</span><span class="cx">     if (index >= plugins.size())
</span><span class="cx">         return nullptr;
</span><del>-    return DOMPlugin::create(data, m_frame, plugins[index]);
</del><ins>+    return DOMPlugin::create(data, frame(), plugins[index]);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr<DOMPlugin> DOMPluginArray::namedItem(const AtomicString& propertyName)
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx"> 
</span><span class="cx">     for (auto& plugin : data->webVisiblePlugins()) {
</span><span class="cx">         if (plugin.name == propertyName)
</span><del>-            return DOMPlugin::create(data, m_frame, plugin);
</del><ins>+            return DOMPlugin::create(data, frame(), plugin);
</ins><span class="cx">     }
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="lines">@@ -87,10 +87,11 @@
</span><span class="cx"> 
</span><span class="cx"> void DOMPluginArray::refresh(bool reloadPages)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    if (!m_frame->page())
</del><ins>+    if (!frame->page())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     Page::refreshPlugins(reloadPages);
</span><span class="lines">@@ -98,10 +99,11 @@
</span><span class="cx"> 
</span><span class="cx"> PluginData* DOMPluginArray::pluginData() const
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    Page* page = m_frame->page();
</del><ins>+    Page* page = frame->page();
</ins><span class="cx">     if (!page)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsDOMPluginArrayh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/DOMPluginArray.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/DOMPluginArray.h    2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/plugins/DOMPluginArray.h       2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -27,12 +27,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class Frame;
</del><span class="cx"> class PluginData;
</span><span class="cx"> 
</span><span class="cx"> class DOMPluginArray : public ScriptWrappable, public RefCounted<DOMPluginArray>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    static Ref<DOMPluginArray> create(Frame* frame) { return adoptRef(*new DOMPluginArray(frame)); }
</del><ins>+    static Ref<DOMPluginArray> create(DOMWindow* window) { return adoptRef(*new DOMPluginArray(window)); }
</ins><span class="cx">     ~DOMPluginArray();
</span><span class="cx"> 
</span><span class="cx">     unsigned length() const;
</span><span class="lines">@@ -43,7 +42,7 @@
</span><span class="cx">     void refresh(bool reloadPages);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    explicit DOMPluginArray(Frame*);
</del><ins>+    explicit DOMPluginArray(DOMWindow*);
</ins><span class="cx">     PluginData* pluginData() const;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorestorageStoragecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/storage/Storage.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/storage/Storage.cpp 2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/storage/Storage.cpp    2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -37,16 +37,16 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-Ref<Storage> Storage::create(Frame* frame, RefPtr<StorageArea>&& storageArea)
</del><ins>+Ref<Storage> Storage::create(DOMWindow& window, RefPtr<StorageArea>&& storageArea)
</ins><span class="cx"> {
</span><del>-    return adoptRef(*new Storage(frame, WTFMove(storageArea)));
</del><ins>+    return adoptRef(*new Storage(window, WTFMove(storageArea)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Storage::Storage(Frame* frame, RefPtr<StorageArea>&& storageArea)
-    : DOMWindowProperty(frame)
</del><ins>+Storage::Storage(DOMWindow& window, RefPtr<StorageArea>&& storageArea)
+    : DOMWindowProperty(&window)
</ins><span class="cx">     , m_storageArea(WTFMove(storageArea))
</span><span class="cx"> {
</span><del>-    ASSERT(m_frame);
</del><ins>+    ASSERT(frame());
</ins><span class="cx">     ASSERT(m_storageArea);
</span><span class="cx"> 
</span><span class="cx">     m_storageArea->incrementAccessCount();
</span><span class="lines">@@ -74,11 +74,12 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> Storage::setItem(const String& key, const String& value)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return Exception { InvalidAccessError };
</span><span class="cx"> 
</span><span class="cx">     bool quotaException = false;
</span><del>-    m_storageArea->setItem(m_frame, key, value, quotaException);
</del><ins>+    m_storageArea->setItem(frame, key, value, quotaException);
</ins><span class="cx">     if (quotaException)
</span><span class="cx">         return Exception { QuotaExceededError };
</span><span class="cx">     return { };
</span><span class="lines">@@ -86,19 +87,21 @@
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> Storage::removeItem(const String& key)
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return Exception { InvalidAccessError };
</span><span class="cx"> 
</span><del>-    m_storageArea->removeItem(m_frame, key);
</del><ins>+    m_storageArea->removeItem(frame, key);
</ins><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ExceptionOr<void> Storage::clear()
</span><span class="cx"> {
</span><del>-    if (!m_frame)
</del><ins>+    auto* frame = this->frame();
+    if (!frame)
</ins><span class="cx">         return Exception { InvalidAccessError };
</span><span class="cx"> 
</span><del>-    m_storageArea->clear(m_frame);
</del><ins>+    m_storageArea->clear(frame);
</ins><span class="cx">     return { };
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorestorageStorageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/storage/Storage.h (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/storage/Storage.h   2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebCore/storage/Storage.h      2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -31,12 +31,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class Frame;
</del><span class="cx"> class StorageArea;
</span><span class="cx"> 
</span><span class="cx"> class Storage : public ScriptWrappable, public RefCounted<Storage>, public DOMWindowProperty {
</span><span class="cx"> public:
</span><del>-    static Ref<Storage> create(Frame*, RefPtr<StorageArea>&&);
</del><ins>+    static Ref<Storage> create(DOMWindow&, RefPtr<StorageArea>&&);
</ins><span class="cx">     ~Storage();
</span><span class="cx"> 
</span><span class="cx">     unsigned length() const;
</span><span class="lines">@@ -54,7 +53,7 @@
</span><span class="cx">     StorageArea& area() const { return *m_storageArea; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    Storage(Frame*, RefPtr<StorageArea>&&);
</del><ins>+    Storage(DOMWindow&, RefPtr<StorageArea>&&);
</ins><span class="cx"> 
</span><span class="cx">     const RefPtr<StorageArea> m_storageArea;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebKit/ChangeLog       2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2018-10-08  Chris Dumez  <cdumez@apple.com>
+
+        Have DOMWindowProperty get is frame from its associated DOMWindow
+        https://bugs.webkit.org/show_bug.cgi?id=190341
+
+        Reviewed by Alex Christensen.
+
+        * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
+        (WebKit::InjectedBundleDOMWindowExtension::InjectedBundleDOMWindowExtension):
+
</ins><span class="cx"> 2018-10-07  Dan Bernstein  <mitz@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Tried to fix HAVE(LINK_PREVIEW) iOS builds.
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessInjectedBundleAPIglibDOMDOMObjectCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp    2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp       2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -102,10 +102,10 @@
</span><span class="cx">         ASSERT(!m_objects.contains(&data));
</span><span class="cx"> 
</span><span class="cx">         WebCore::DOMWindow* domWindow = m_frame->document()->domWindow();
</span><del>-        if (domWindow && (!m_domWindowObserver || m_domWindowObserver->domWindow() != domWindow)) {
</del><ins>+        if (domWindow && (!m_domWindowObserver || m_domWindowObserver->window() != domWindow)) {
</ins><span class="cx">             // New DOMWindow, clear the cache and create a new DOMWindowObserver.
</span><span class="cx">             clear();
</span><del>-            m_domWindowObserver = std::make_unique<DOMWindowObserver>(*m_frame, *this, domWindow);
</del><ins>+            m_domWindowObserver = std::make_unique<DOMWindowObserver>(*domWindow, *this);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         m_objects.append(&data);
</span><span class="lines">@@ -116,12 +116,10 @@
</span><span class="cx">     class DOMWindowObserver final: public WebCore::DOMWindowProperty {
</span><span class="cx">         WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx">     public:
</span><del>-        DOMWindowObserver(WebCore::Frame& frame, DOMObjectCacheFrameObserver& frameObserver, WebCore::DOMWindow* window)
-            : DOMWindowProperty(&frame)
</del><ins>+        DOMWindowObserver(WebCore::DOMWindow& window, DOMObjectCacheFrameObserver& frameObserver)
+            : DOMWindowProperty(&window)
</ins><span class="cx">             , m_frameObserver(frameObserver)
</span><del>-            , m_domWindow(window)
</del><span class="cx">         {
</span><del>-            ASSERT(m_domWindow);
</del><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         virtual ~DOMWindowObserver()
</span><span class="lines">@@ -128,8 +126,6 @@
</span><span class="cx">         {
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        WebCore::DOMWindow* domWindow() const { return m_domWindow; }
-
</del><span class="cx">     private:
</span><span class="cx">         void willDetachGlobalObjectFromFrame() override
</span><span class="cx">         {
</span><span class="lines">@@ -139,7 +135,6 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         DOMObjectCacheFrameObserver& m_frameObserver;
</span><del>-        WebCore::DOMWindow* m_domWindow;
</del><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     static void objectFinalizedCallback(gpointer userData, GObject* finalizedObject)
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessInjectedBundleInjectedBundleDOMWindowExtensioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp (236916 => 236917)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp       2018-10-08 16:58:18 UTC (rev 236916)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp  2018-10-08 17:12:38 UTC (rev 236917)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> InjectedBundleDOMWindowExtension::InjectedBundleDOMWindowExtension(WebFrame* frame, InjectedBundleScriptWorld* world)
</span><del>-    : m_coreExtension(DOMWindowExtension::create(frame->coreFrame(), world->coreWorld()))
</del><ins>+    : m_coreExtension(DOMWindowExtension::create(frame->coreFrame() ? frame->coreFrame()->window() : nullptr, world->coreWorld()))
</ins><span class="cx"> {
</span><span class="cx">     allExtensions().add(m_coreExtension.get(), this);
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>