FrameLoader: frame() and client() should return references.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Aug 2013 16:01:31 +0000 (16:01 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Aug 2013 16:01:31 +0000 (16:01 +0000)
<https://webkit.org/b/120158>

Reviewed by Anders Carlsson.

These two are never null so change them to return references.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154449 268f45cc-cd09-0410-ab3c-d52691b4dbfc

75 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
Source/WebCore/Modules/websockets/WebSocketChannel.cpp
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Source/WebCore/bindings/ScriptControllerBase.cpp
Source/WebCore/dom/DOMImplementation.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/history/CachedFrame.cpp
Source/WebCore/history/PageCache.cpp
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLFrameSetElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/ImageDocument.cpp
Source/WebCore/html/PluginDocument.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/html/parser/HTMLConstructionSite.cpp
Source/WebCore/html/parser/XSSAuditorDelegate.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/DocumentWriter.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/FrameLoader.h
Source/WebCore/loader/HistoryController.cpp
Source/WebCore/loader/MixedContentChecker.cpp
Source/WebCore/loader/MixedContentChecker.h
Source/WebCore/loader/NetscapePlugInStreamLoader.cpp
Source/WebCore/loader/PingLoader.cpp
Source/WebCore/loader/PolicyChecker.cpp
Source/WebCore/loader/ProgressTracker.cpp
Source/WebCore/loader/ResourceLoadNotifier.cpp
Source/WebCore/loader/ResourceLoadScheduler.cpp
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/loader/appcache/ApplicationCacheHost.cpp
Source/WebCore/loader/cache/CachedImage.cpp
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/cf/ResourceLoaderCFNet.cpp
Source/WebCore/loader/icon/IconController.cpp
Source/WebCore/loader/icon/IconLoader.cpp
Source/WebCore/loader/mac/ResourceLoaderMac.mm
Source/WebCore/page/ContextMenuController.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/DOMWindowExtension.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/History.cpp
Source/WebCore/platform/ios/PasteboardIOS.mm
Source/WebCore/platform/mac/PasteboardMac.mm
Source/WebCore/plugins/PluginView.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderWidget.cpp
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
Source/WebKit/efl/ewk/ewk_frame.cpp
Source/WebKit/efl/ewk/ewk_view.cpp
Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
Source/WebKit/gtk/webkit/webkitwebdatasource.cpp
Source/WebKit/gtk/webkit/webkitwebframe.cpp
Source/WebKit/gtk/webkit/webkitwebview.cpp
Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm
Source/WebKit/mac/WebView/WebFrame.mm
Source/WebKit/mac/WebView/WebHTMLRepresentation.mm
Source/WebKit/mac/WebView/WebRenderLayer.mm
Source/WebKit/mac/WebView/WebRenderNode.mm
Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
Source/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.cpp
Source/WebKit/win/WebFrame.cpp
Source/WebKit2/Shared/WebRenderLayer.cpp
Source/WebKit2/Shared/WebRenderObject.cpp
Source/WebKit2/WebProcess/Network/WebResourceLoadScheduler.cpp
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm

index 7027080..18215f5 100644 (file)
@@ -1,3 +1,12 @@
+2013-08-22  Andreas Kling  <akling@apple.com>
+
+        FrameLoader: frame() and client() should return references.
+        <https://webkit.org/b/120158>
+
+        Reviewed by Anders Carlsson.
+
+        These two are never null so change them to return references.
+
 2013-08-22  Andrei Bucur  <abucur@adobe.com>
 
         RenderNamedFlowThread should not create NodeRenderingContext objects
index 5ee9552..9e8f2a1 100644 (file)
@@ -152,7 +152,7 @@ RTCPeerConnection::RTCPeerConnection(ScriptExecutionContext* context, PassRefPtr
         return;
     }
 
-    document->frame()->loader()->client()->dispatchWillStartUsingPeerConnectionHandler(m_peerHandler.get());
+    document->frame()->loader()->client().dispatchWillStartUsingPeerConnectionHandler(m_peerHandler.get());
 
     if (!m_peerHandler->initialize(configuration, constraints)) {
         ec = NOT_SUPPORTED_ERR;
index cb54270..a06d66b 100644 (file)
@@ -248,7 +248,7 @@ void WebSocketChannel::willOpenSocketStream(SocketStreamHandle* handle)
     LOG(Network, "WebSocketChannel %p willOpenSocketStream()", this);
     ASSERT(handle);
     if (m_document->frame())
-        m_document->frame()->loader().client()->dispatchWillOpenSocketStream(handle);
+        m_document->frame()->loader().client().dispatchWillOpenSocketStream(handle);
 }
 
 void WebSocketChannel::didOpenSocketStream(SocketStreamHandle* handle)
index 2a79f6f..8409716 100644 (file)
@@ -1468,7 +1468,7 @@ static id textMarkerRangeFromVisiblePositions(AXObjectCache *cache, VisiblePosit
     if (!frame)
         return nil;
     
-    return frame->loader().client()->accessibilityRemoteObject();
+    return frame->loader().client().accessibilityRemoteObject();
 }
 
 static void convertToVector(NSArray* array, AccessibilityObject::AccessibilityChildrenVector& vector)
index 635a12d..93d6da8 100644 (file)
@@ -51,9 +51,9 @@ bool ScriptController::canExecuteScripts(ReasonForCallingCanExecuteScripts reaso
         return true;
     }
 
-    const bool allowed = m_frame->loader().client()->allowScript(m_frame->settings().isScriptEnabled());
+    const bool allowed = m_frame->loader().client().allowScript(m_frame->settings().isScriptEnabled());
     if (!allowed && reason == AboutToExecuteScript)
-        m_frame->loader().client()->didNotAllowScript();
+        m_frame->loader().client().didNotAllowScript();
     return allowed;
 }
 
index 3240a1d..c119e98 100644 (file)
@@ -375,7 +375,7 @@ PassRefPtr<Document> DOMImplementation::createDocument(const String& type, Frame
     // Everything else except text/plain can be overridden by plugins. In particular, Adobe SVG Viewer should be used for SVG, if installed.
     // Disallowing plug-ins to use text/plain prevents plug-ins from hijacking a fundamental type that the browser is expected to handle,
     // and also serves as an optimization to prevent loading the plug-in database in the common case.
-    if (type != "text/plain" && ((pluginData && pluginData->supportsMimeType(type, allowedPluginTypes)) || (frame && frame->loader().client()->shouldAlwaysUsePluginDocument(type))))
+    if (type != "text/plain" && ((pluginData && pluginData->supportsMimeType(type, allowedPluginTypes)) || (frame && frame->loader().client().shouldAlwaysUsePluginDocument(type))))
         return PluginDocument::create(frame, url);
     if (isTextMIMEType(type))
         return TextDocument::create(frame, url);
index a610f10..1ea796c 100644 (file)
@@ -4024,7 +4024,7 @@ void Document::documentDidResumeFromPageCache()
         frameView->setAnimatorsAreActive();
 
     ASSERT(m_frame);
-    m_frame->loader().client()->dispatchDidBecomeFrameset(isFrameSet());
+    m_frame->loader().client().dispatchDidBecomeFrameset(isFrameSet());
 }
 
 void Document::registerForPageCacheSuspensionCallbacks(Element* e)
@@ -4532,7 +4532,7 @@ void Document::initSecurityContext()
             // harnesses for web sites.
             securityOrigin()->grantUniversalAccess();
         } else if (securityOrigin()->isLocal()) {
-            if (settings->allowUniversalAccessFromFileURLs() || m_frame->loader().client()->shouldForceUniversalAccessFromLocalURL(m_url)) {
+            if (settings->allowUniversalAccessFromFileURLs() || m_frame->loader().client().shouldForceUniversalAccessFromLocalURL(m_url)) {
                 // Some clients want local URLs to have universal access, but that setting is dangerous for other clients.
                 securityOrigin()->grantUniversalAccess();
             } else if (!settings->allowFileAccessFromFileURLs()) {
index 294f61b..50245ad 100644 (file)
@@ -123,7 +123,7 @@ void CachedFrameBase::restore()
         frame.view()->restoreBackingStores();
 #endif
 
-    frame.loader().client()->didRestoreFromPageCache();
+    frame.loader().client().didRestoreFromPageCache();
 
     // Reconstruct the FrameTree
     for (unsigned i = 0; i < m_childFrames.size(); ++i)
@@ -183,7 +183,7 @@ CachedFrame::CachedFrame(Frame* frame)
 
     m_document->domWindow()->suspendForPageCache();
 
-    frame->loader().client()->savePlatformDataToCachedFrame(this);
+    frame->loader().client().savePlatformDataToCachedFrame(this);
 
 #if USE(ACCELERATED_COMPOSITING)
     if (m_isComposited && pageCache()->shouldClearBackingStores())
@@ -203,7 +203,7 @@ CachedFrame::CachedFrame(Frame* frame)
     if (!m_isMainFrame)
         frame->page()->decrementSubframeCount();
 
-    frame->loader().client()->didSaveToPageCache();
+    frame->loader().client().didSaveToPageCache();
 
 #ifndef NDEBUG
     if (m_isMainFrame)
index 33a9947..3a890b7 100644 (file)
@@ -160,7 +160,7 @@ static unsigned logCanCacheFrameDecision(Frame* frame, int indentLevel)
         PCLOG("   -The DocumentLoader uses an application cache");
         rejectReasons |= 1 << DocumentLoaderUsesApplicationCache;
     }
-    if (!frame->loader().client()->canCachePage()) {
+    if (!frame->loader().client().canCachePage()) {
         PCLOG("   -The client says this frame cannot be cached");
         rejectReasons |= 1 << ClientDeniesCaching;
     }
@@ -333,7 +333,7 @@ bool PageCache::canCachePageContainingThisFrame(Frame* frame)
         // FIXME: We should investigating caching frames that have an associated
         // application cache. <rdar://problem/5917899> tracks that work.
         && documentLoader->applicationCacheHost()->canCacheInPageCache()
-        && frameLoader.client()->canCachePage();
+        && frameLoader.client().canCachePage();
 }
     
 bool PageCache::canCache(Page* page) const
index 373670e..92fb7cc 100644 (file)
@@ -545,7 +545,7 @@ void HTMLAnchorElement::handleClick(Event* event)
             frame->loader().addExtraFieldsToMainResourceRequest(request);
         }
 
-        frame->loader().client()->startDownload(request, fastGetAttribute(downloadAttr));
+        frame->loader().client().startDownload(request, fastGetAttribute(downloadAttr));
     } else
 #endif
         frame->loader().urlSelected(kurl, target(), event, false, false, hasRel(RelationNoReferrer) ? NeverSendReferrer : MaybeSendReferrer);
index 43ebd3c..ac91c00 100644 (file)
@@ -269,7 +269,7 @@ bool HTMLFormElement::prepareForSubmission(Event* event)
     StringPairVector controlNamesAndValues;
     getTextFieldValues(controlNamesAndValues);
     RefPtr<FormState> formState = FormState::create(this, controlNamesAndValues, document(), NotSubmittedByJavaScript);
-    frame->loader().client()->dispatchWillSendSubmitEvent(formState.release());
+    frame->loader().client().dispatchWillSendSubmitEvent(formState.release());
 
     if (dispatchEvent(Event::create(eventNames().submitEvent, true, true)))
         m_shouldSubmit = true;
index 420e919..bde900e 100644 (file)
@@ -216,7 +216,7 @@ Node::InsertionNotificationRequest HTMLFrameSetElement::insertedInto(ContainerNo
     HTMLElement::insertedInto(insertionPoint);
     if (insertionPoint->inDocument()) {
         if (Frame* frame = document()->frame())
-            frame->loader().client()->dispatchDidBecomeFrameset(document()->isFrameSet());
+            frame->loader().client().dispatchDidBecomeFrameset(document()->isFrameSet());
     }
 
     return InsertionDone;
@@ -227,7 +227,7 @@ void HTMLFrameSetElement::removedFrom(ContainerNode* insertionPoint)
     HTMLElement::removedFrom(insertionPoint);
     if (insertionPoint->inDocument()) {
         if (Frame* frame = document()->frame())
-            frame->loader().client()->dispatchDidBecomeFrameset(document()->isFrameSet());
+            frame->loader().client().dispatchDidBecomeFrameset(document()->isFrameSet());
     }
 }
 
index 7126005..5cac762 100644 (file)
@@ -567,7 +567,7 @@ RenderObject* HTMLMediaElement::createRenderer(RenderArena* arena, RenderStyle*)
         mediaRenderer->setWidget(m_proxyWidget);
 
         if (Frame* frame = document()->frame())
-            frame->loader().client()->showMediaPlayerProxyPlugin(m_proxyWidget.get());
+            frame->loader().client().showMediaPlayerProxyPlugin(m_proxyWidget.get());
     }
     return mediaRenderer;
 #else
@@ -648,7 +648,7 @@ void HTMLMediaElement::didAttachRenderers()
 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
     else if (m_proxyWidget) {
         if (Frame* frame = document()->frame())
-            frame->loader().client()->hideMediaPlayerProxyPlugin(m_proxyWidget.get());
+            frame->loader().client().hideMediaPlayerProxyPlugin(m_proxyWidget.get());
     }
 #endif
 }
index 875d1aa..2b3ea72 100644 (file)
@@ -158,7 +158,7 @@ bool HTMLPlugInImageElement::isImageType()
 
     if (Frame* frame = document()->frame()) {
         KURL completedURL = document()->completeURL(m_url);
-        return frame->loader().client()->objectContentType(completedURL, m_serviceType, shouldPreferPlugInsForImages()) == ObjectContentImage;
+        return frame->loader().client().objectContentType(completedURL, m_serviceType, shouldPreferPlugInsForImages()) == ObjectContentImage;
     }
 
     return Image::supportsType(m_serviceType);
@@ -188,7 +188,7 @@ bool HTMLPlugInImageElement::wouldLoadAsNetscapePlugin(const String& url, const
         completedURL = document()->completeURL(url);
 
     FrameLoader& frameLoader = document()->frame()->loader();
-    if (frameLoader.client()->objectContentType(completedURL, serviceType, shouldPreferPlugInsForImages()) == ObjectContentNetscapePlugin)
+    if (frameLoader.client().objectContentType(completedURL, serviceType, shouldPreferPlugInsForImages()) == ObjectContentNetscapePlugin)
         return true;
     return false;
 }
index 74d11e6..0adf882 100644 (file)
@@ -130,7 +130,7 @@ static float pageZoomFactor(const Document* document)
 void ImageDocumentParser::appendBytes(DocumentWriter*, const char*, size_t)
 {
     Frame* frame = document()->frame();
-    if (!frame->loader().client()->allowImage(frame->settings().areImagesEnabled(), document()->url()))
+    if (!frame->loader().client().allowImage(frame->settings().areImagesEnabled(), document()->url()))
         return;
 
     CachedImage* cachedImage = document()->cachedImage();
index 6cc40c2..a00582b 100644 (file)
@@ -122,7 +122,7 @@ void PluginDocumentParser::appendBytes(DocumentWriter*, const char*, size_t)
 
     if (RenderPart* renderer = m_embedElement->renderPart()) {
         if (Widget* widget = renderer->widget()) {
-            frame->loader().client()->redirectDataToPlugin(widget);
+            frame->loader().client().redirectDataToPlugin(widget);
             // In a plugin document, the main resource is the plugin. If we have a null widget, that means
             // the loading of the plugin was cancelled, which gives us a null mainResourceLoader(), so we
             // need to have this call in a null check of the widget or of mainResourceLoader().
@@ -162,7 +162,7 @@ void PluginDocument::detach()
 {
     // Release the plugin Element so that we don't have a circular reference.
     m_pluginElement = 0;
-    frame()->loader().client()->redirectDataToPlugin(0);
+    frame()->loader().client().redirectDataToPlugin(0);
     Document::detach();
 }
 
index 54ca48b..8dac77d 100644 (file)
@@ -414,7 +414,7 @@ PassOwnPtr<WebGLRenderingContext> WebGLRenderingContext::create(HTMLCanvasElemen
 
     // The FrameLoaderClient might creation of a new WebGL context despite the page settings; in
     // particular, if WebGL contexts were lost one or more times via the GL_ARB_robustness extension.
-    if (!frame->loader().client()->allowWebGL(frame->settings().webGLEnabled())) {
+    if (!frame->loader().client().allowWebGL(frame->settings().webGLEnabled())) {
         canvas->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextcreationerrorEvent, false, true, "Web page was not allowed to create a WebGL context."));
         return nullptr;
     }
@@ -4600,7 +4600,7 @@ void WebGLRenderingContext::loseContextImpl(WebGLRenderingContext::LostContextMo
         // decide to take action such as asking the user for permission to use WebGL again.
         if (Document* document = canvas()->document()) {
             if (Frame* frame = document->frame())
-                frame->loader().client()->didLoseWebGLContext(m_context->getExtensions()->getGraphicsResetStatusARB());
+                frame->loader().client().didLoseWebGLContext(m_context->getExtensions()->getGraphicsResetStatusARB());
         }
     }
 
@@ -5819,7 +5819,7 @@ void WebGLRenderingContext::maybeRestoreContext(Timer<WebGLRenderingContext>*)
     if (!frame)
         return;
 
-    if (!frame->loader().client()->allowWebGL(frame->settings().webGLEnabled()))
+    if (!frame->loader().client().allowWebGL(frame->settings().webGLEnabled()))
         return;
 
     FrameView* view = frame->view();
index 6193abd..548d353 100644 (file)
@@ -411,7 +411,7 @@ void HTMLConstructionSite::insertHTMLBodyElement(AtomicHTMLToken* token)
     attachLater(currentNode(), body);
     m_openElements.pushHTMLBodyElement(HTMLStackItem::create(body.release(), token));
     if (Frame* frame = m_document->frame())
-        frame->loader().client()->dispatchWillInsertBody();
+        frame->loader().client().dispatchWillInsertBody();
 }
 
 void HTMLConstructionSite::insertHTMLFormElement(AtomicHTMLToken* token, bool isDemoted)
index 6719c9f..7d5c413 100644 (file)
@@ -106,7 +106,7 @@ void XSSAuditorDelegate::didBlockScript(const XSSInfo& xssInfo)
     if (!m_didSendNotifications) {
         m_didSendNotifications = true;
 
-        frameLoader.client()->didDetectXSS(m_document->url(), xssInfo.m_didBlockEntirePage);
+        frameLoader.client().didDetectXSS(m_document->url(), xssInfo.m_didBlockEntirePage);
 
         if (!m_reportURL.isEmpty())
             PingLoader::sendViolationReport(m_document->frame(), m_reportURL, generateViolationReport());
index 4b60a9b..9649cc6 100644 (file)
@@ -215,7 +215,7 @@ void DocumentLoader::setRequest(const ResourceRequest& req)
 void DocumentLoader::setMainDocumentError(const ResourceError& error)
 {
     m_mainDocumentError = error;    
-    frameLoader()->client()->setMainDocumentError(this, error);
+    frameLoader()->client().setMainDocumentError(this, error);
 }
 
 void DocumentLoader::mainReceivedError(const ResourceError& error)
@@ -224,7 +224,7 @@ void DocumentLoader::mainReceivedError(const ResourceError& error)
 
     if (m_identifierForLoadWithoutResourceLoader) {
         ASSERT(!mainResourceLoader());
-        frameLoader()->client()->dispatchDidFailLoading(this, m_identifierForLoadWithoutResourceLoader, error);
+        frameLoader()->client().dispatchDidFailLoading(this, m_identifierForLoadWithoutResourceLoader, error);
     }
 
     // There is a bug in CFNetwork where callbacks can be dispatched even when loads are deferred.
@@ -401,7 +401,7 @@ void DocumentLoader::finishedLoading(double finishTime)
         // DocumentWriter::begin() gets called and creates the Document.
         if (!m_gotFirstByte)
             commitData(0, 0);
-        frameLoader()->client()->finishedLoading(this);
+        frameLoader()->client().finishedLoading(this);
     }
 
     m_writer.end();
@@ -665,7 +665,7 @@ void DocumentLoader::continueAfterContentPolicy(PolicyAction policy)
 #endif
             || equalIgnoringCase("multipart/related", mimeType))
             && !m_substituteData.isValid() && !SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol());
-        if (!frameLoader()->client()->canShowMIMEType(mimeType) || isRemoteWebArchive) {
+        if (!frameLoader()->client().canShowMIMEType(mimeType) || isRemoteWebArchive) {
             frameLoader()->policyChecker()->cannotShowMIMEType(m_response);
             // Check reachedTerminalState since the load may have already been canceled inside of _handleUnimplementablePolicyWithErrorCode::.
             stopLoadingForPolicyChange();
@@ -677,7 +677,7 @@ void DocumentLoader::continueAfterContentPolicy(PolicyAction policy)
     case PolicyDownload: {
         // m_mainResource can be null, e.g. when loading a substitute resource from application cache.
         if (!m_mainResource) {
-            mainReceivedError(frameLoader()->client()->cannotShowURLError(m_request));
+            mainReceivedError(frameLoader()->client().cannotShowURLError(m_request));
             return;
         }
 
@@ -687,7 +687,7 @@ void DocumentLoader::continueAfterContentPolicy(PolicyAction policy)
         // When starting the request, we didn't know that it would result in download and not navigation. Now we know that main document URL didn't change.
         // Download may use this knowledge for purposes unrelated to cookies, notably for setting file quarantine data.
         frameLoader()->setOriginalURLForDownloadRequest(m_request);
-        frameLoader()->client()->convertMainResourceLoadToDownload(this, m_request, m_response);
+        frameLoader()->client().convertMainResourceLoadToDownload(this, m_request, m_response);
 
         // It might have gone missing
         if (mainResourceLoader())
@@ -741,12 +741,12 @@ void DocumentLoader::commitLoad(const char* data, int length)
     if (ArchiveFactory::isArchiveMimeType(response().mimeType()))
         return;
 #endif
-    frameLoader->client()->committedLoad(this, data, length);
+    frameLoader->client().committedLoad(this, data, length);
 }
 
 ResourceError DocumentLoader::interruptedForPolicyChangeError() const
 {
-    return frameLoader()->client()->interruptedForPolicyChangeError(request());
+    return frameLoader()->client().interruptedForPolicyChangeError(request());
 }
 
 void DocumentLoader::stopLoadingForPolicyChange()
@@ -1338,12 +1338,12 @@ bool DocumentLoader::isMultipartReplacingLoad() const
 bool DocumentLoader::maybeLoadEmpty()
 {
     bool shouldLoadEmpty = !m_substituteData.isValid() && (m_request.url().isEmpty() || SchemeRegistry::shouldLoadURLSchemeAsEmptyDocument(m_request.url().protocol()));
-    if (!shouldLoadEmpty && !frameLoader()->client()->representationExistsForURLScheme(m_request.url().protocol()))
+    if (!shouldLoadEmpty && !frameLoader()->client().representationExistsForURLScheme(m_request.url().protocol()))
         return false;
 
     if (m_request.url().isEmpty() && !frameLoader()->stateMachine()->creatingInitialEmptyDocument())
         m_request.setURL(blankURL());
-    String mimeType = shouldLoadEmpty ? "text/html" : frameLoader()->client()->generatedMIMETypeForURLScheme(m_request.url().protocol());
+    String mimeType = shouldLoadEmpty ? "text/html" : frameLoader()->client().generatedMIMETypeForURLScheme(m_request.url().protocol());
     m_response = ResourceResponse(m_request.url(), mimeType, 0, String(), String());
     finishedLoading(monotonicallyIncreasingTime());
     return true;
index b89dd3d..192fe11 100644 (file)
@@ -104,9 +104,9 @@ void DocumentWriter::begin()
 
 PassRefPtr<Document> DocumentWriter::createDocument(const KURL& url)
 {
-    if (!m_frame->loader().stateMachine()->isDisplayingInitialEmptyDocument() && m_frame->loader().client()->shouldAlwaysUsePluginDocument(m_mimeType))
+    if (!m_frame->loader().stateMachine()->isDisplayingInitialEmptyDocument() && m_frame->loader().client().shouldAlwaysUsePluginDocument(m_mimeType))
         return PluginDocument::create(m_frame, url);
-    if (!m_frame->loader().client()->hasHTMLView())
+    if (!m_frame->loader().client().hasHTMLView())
         return PlaceholderDocument::create(m_frame, url);
     return DOMImplementation::createDocument(m_mimeType, m_frame, url, m_frame->inViewSourceMode());
 }
@@ -160,7 +160,7 @@ void DocumentWriter::begin(const KURL& urlReference, bool dispatch, Document* ow
     // document.open).
     m_parser = document->parser();
 
-    if (m_frame->view() && m_frame->loader().client()->hasHTMLView())
+    if (m_frame->view() && m_frame->loader().client().hasHTMLView())
         m_frame->view()->setContentsSize(IntSize());
 
     m_state = StartedWritingState;
index c57a3be..ab3098a 100644 (file)
@@ -174,50 +174,50 @@ static bool isDocumentSandboxed(Frame* frame, SandboxFlags mask)
 
 class FrameLoader::FrameProgressTracker {
 public:
-    static PassOwnPtr<FrameProgressTracker> create(Frame* frame) { return adoptPtr(new FrameProgressTracker(frame)); }
+    static PassOwnPtr<FrameProgressTracker> create(Frame& frame) { return adoptPtr(new FrameProgressTracker(frame)); }
     ~FrameProgressTracker()
     {
-        ASSERT(!m_inProgress || m_frame->page());
+        ASSERT(!m_inProgress || m_frame.page());
         if (m_inProgress)
-            m_frame->page()->progress().progressCompleted(m_frame);
+            m_frame.page()->progress().progressCompleted(&m_frame);
     }
 
     void progressStarted()
     {
-        ASSERT(m_frame->page());
+        ASSERT(m_frame.page());
         if (!m_inProgress)
-            m_frame->page()->progress().progressStarted(m_frame);
+            m_frame.page()->progress().progressStarted(&m_frame);
         m_inProgress = true;
     }
 
     void progressCompleted()
     {
         ASSERT(m_inProgress);
-        ASSERT(m_frame->page());
+        ASSERT(m_frame.page());
         m_inProgress = false;
-        m_frame->page()->progress().progressCompleted(m_frame);
+        m_frame.page()->progress().progressCompleted(&m_frame);
     }
 
 private:
-    FrameProgressTracker(Frame* frame)
+    FrameProgressTracker(Frame& frame)
         : m_frame(frame)
         , m_inProgress(false)
     {
     }
 
-    Frame* m_frame;
+    Frame& m_frame;
     bool m_inProgress;
 };
 
-FrameLoader::FrameLoader(Frame* frame, FrameLoaderClient* client)
+FrameLoader::FrameLoader(Frame& frame, FrameLoaderClient& client)
     : m_frame(frame)
     , m_client(client)
-    , m_policyChecker(adoptPtr(new PolicyChecker(frame)))
-    , m_history(adoptPtr(new HistoryController(frame)))
-    , m_notifer(frame)
-    , m_subframeLoader(frame)
-    , m_icon(adoptPtr(new IconController(frame)))
-    , m_mixedContentChecker(frame)
+    , m_policyChecker(adoptPtr(new PolicyChecker(&frame)))
+    , m_history(adoptPtr(new HistoryController(&frame)))
+    , m_notifer(&frame)
+    , m_subframeLoader(&frame)
+    , m_icon(adoptPtr(new IconController(&frame)))
+    , m_mixedContentChecker(&frame)
     , m_state(FrameStateProvisional)
     , m_loadType(FrameLoadTypeStandard)
     , m_delegateIsHandlingProvisionalLoadError(false)
@@ -250,7 +250,7 @@ FrameLoader::~FrameLoader()
     for (HashSet<Frame*>::iterator it = m_openedFrames.begin(); it != end; ++it)
         (*it)->loader().m_opener = 0;
 
-    m_client->frameLoaderDestroyed();
+    m_client.frameLoaderDestroyed();
 
     if (m_networkingContext)
         m_networkingContext->invalidate();
@@ -259,13 +259,13 @@ FrameLoader::~FrameLoader()
 void FrameLoader::init()
 {
     // This somewhat odd set of steps gives the frame an initial empty document.
-    setPolicyDocumentLoader(m_client->createDocumentLoader(ResourceRequest(KURL(ParsedURLString, emptyString())), SubstituteData()).get());
+    setPolicyDocumentLoader(m_client.createDocumentLoader(ResourceRequest(KURL(ParsedURLString, emptyString())), SubstituteData()).get());
     setProvisionalDocumentLoader(m_policyDocumentLoader.get());
     m_provisionalDocumentLoader->startLoadingMainResource();
-    m_frame->document()->cancelParsing();
+    m_frame.document()->cancelParsing();
     m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocument);
 
-    m_networkingContext = m_client->createNetworkingContext();
+    m_networkingContext = m_client.createNetworkingContext();
     m_progressTracker = FrameProgressTracker::create(m_frame);
 }
 
@@ -280,7 +280,7 @@ void FrameLoader::setDefersLoading(bool defers)
     history()->setDefersLoading(defers);
 
     if (!defers) {
-        m_frame->navigationScheduler().startTimer();
+        m_frame.navigationScheduler().startTimer();
         startCheckCompleteTimer();
     }
 }
@@ -293,7 +293,7 @@ void FrameLoader::changeLocation(SecurityOrigin* securityOrigin, const KURL& url
 
 void FrameLoader::urlSelected(const KURL& url, const String& passedTarget, PassRefPtr<Event> triggeringEvent, bool lockHistory, bool lockBackForwardList, ShouldSendReferrer shouldSendReferrer)
 {
-    urlSelected(FrameLoadRequest(m_frame->document()->securityOrigin(), ResourceRequest(url), passedTarget),
+    urlSelected(FrameLoadRequest(m_frame.document()->securityOrigin(), ResourceRequest(url), passedTarget),
         triggeringEvent, lockHistory, lockBackForwardList, shouldSendReferrer, DoNotReplaceDocumentIfJavaScriptURL);
 }
 
@@ -303,14 +303,14 @@ void FrameLoader::urlSelected(const FrameLoadRequest& passedRequest, PassRefPtr<
 {
     ASSERT(!m_suppressOpenerInNewFrame);
 
-    RefPtr<Frame> protect(m_frame);
+    RefPtr<Frame> protect(&m_frame);
     FrameLoadRequest frameRequest(passedRequest);
 
-    if (m_frame->script().executeIfJavaScriptURL(frameRequest.resourceRequest().url(), shouldReplaceDocumentIfJavaScriptURL))
+    if (m_frame.script().executeIfJavaScriptURL(frameRequest.resourceRequest().url(), shouldReplaceDocumentIfJavaScriptURL))
         return;
 
     if (frameRequest.frameName().isEmpty())
-        frameRequest.setFrameName(m_frame->document()->baseTarget());
+        frameRequest.setFrameName(m_frame.document()->baseTarget());
 
     if (shouldSendReferrer == NeverSendReferrer)
         m_suppressOpenerInNewFrame = true;
@@ -328,32 +328,32 @@ void FrameLoader::submitForm(PassRefPtr<FormSubmission> submission)
     // FIXME: Find a good spot for these.
     ASSERT(submission->data());
     ASSERT(submission->state());
-    ASSERT(!submission->state()->sourceDocument()->frame() || submission->state()->sourceDocument()->frame() == m_frame);
+    ASSERT(!submission->state()->sourceDocument()->frame() || submission->state()->sourceDocument()->frame() == &m_frame);
     
-    if (!m_frame->page())
+    if (!m_frame.page())
         return;
     
     if (submission->action().isEmpty())
         return;
 
-    if (isDocumentSandboxed(m_frame, SandboxForms)) {
+    if (isDocumentSandboxed(&m_frame, SandboxForms)) {
         // FIXME: This message should be moved off the console once a solution to https://bugs.webkit.org/show_bug.cgi?id=103274 exists.
-        m_frame->document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Blocked form submission to '" + submission->action().stringCenterEllipsizedToLength() + "' because the form's frame is sandboxed and the 'allow-forms' permission is not set.");
+        m_frame.document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, "Blocked form submission to '" + submission->action().stringCenterEllipsizedToLength() + "' because the form's frame is sandboxed and the 'allow-forms' permission is not set.");
         return;
     }
 
     if (protocolIsJavaScript(submission->action())) {
-        if (!m_frame->document()->contentSecurityPolicy()->allowFormAction(KURL(submission->action())))
+        if (!m_frame.document()->contentSecurityPolicy()->allowFormAction(KURL(submission->action())))
             return;
         m_isExecutingJavaScriptFormAction = true;
-        m_frame->script().executeIfJavaScriptURL(submission->action(), DoNotReplaceDocumentIfJavaScriptURL);
+        m_frame.script().executeIfJavaScriptURL(submission->action(), DoNotReplaceDocumentIfJavaScriptURL);
         m_isExecutingJavaScriptFormAction = false;
         return;
     }
 
     Frame* targetFrame = findFrameForNavigation(submission->target(), submission->state()->sourceDocument());
     if (!targetFrame) {
-        if (!DOMWindow::allowPopUp(m_frame) && !ScriptController::processingUserGesture())
+        if (!DOMWindow::allowPopUp(&m_frame) && !ScriptController::processingUserGesture())
             return;
 
         // FIXME: targetFrame can be 0 for two distinct reasons:
@@ -362,7 +362,7 @@ void FrameLoader::submitForm(PassRefPtr<FormSubmission> submission)
         // Continuing form submission makes no sense in the latter case.
         // There is a repeat check after timer fires, so this is not a correctness issue.
 
-        targetFrame = m_frame;
+        targetFrame = &m_frame;
     } else
         submission->clearTarget();
 
@@ -381,13 +381,13 @@ void FrameLoader::submitForm(PassRefPtr<FormSubmission> submission)
     // than replacing this frame's content, so this check is flawed. On the other hand, the check is hardly
     // needed any more now that we reset m_submittedFormURL on each mouse or key down event.
 
-    if (m_frame->tree()->isDescendantOf(targetFrame)) {
+    if (m_frame.tree()->isDescendantOf(targetFrame)) {
         if (m_submittedFormURL == submission->requestURL())
             return;
         m_submittedFormURL = submission->requestURL();
     }
 
-    submission->data()->generateFiles(m_frame->document());
+    submission->data()->generateFiles(m_frame.document());
     submission->setReferrer(outgoingReferrer());
     submission->setOrigin(outgoingOrigin());
 
@@ -396,25 +396,25 @@ void FrameLoader::submitForm(PassRefPtr<FormSubmission> submission)
 
 void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy)
 {
-    if (m_frame->document() && m_frame->document()->parser())
-        m_frame->document()->parser()->stopParsing();
+    if (m_frame.document() && m_frame.document()->parser())
+        m_frame.document()->parser()->stopParsing();
 
     if (unloadEventPolicy != UnloadEventPolicyNone) {
-        if (m_frame->document()) {
+        if (m_frame.document()) {
             if (m_didCallImplicitClose && !m_wasUnloadEventEmitted) {
-                Element* currentFocusedElement = m_frame->document()->focusedElement();
+                Element* currentFocusedElement = m_frame.document()->focusedElement();
                 if (currentFocusedElement && currentFocusedElement->toInputElement())
                     currentFocusedElement->toInputElement()->endEditing();
                 if (m_pageDismissalEventBeingDispatched == NoDismissal) {
                     if (unloadEventPolicy == UnloadEventPolicyUnloadAndPageHide) {
                         m_pageDismissalEventBeingDispatched = PageHideDismissal;
-                        m_frame->document()->domWindow()->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, m_frame->document()->inPageCache()), m_frame->document());
+                        m_frame.document()->domWindow()->dispatchEvent(PageTransitionEvent::create(eventNames().pagehideEvent, m_frame.document()->inPageCache()), m_frame.document());
                     }
 
                     // FIXME: update Page Visibility state here.
                     // https://bugs.webkit.org/show_bug.cgi?id=116770
 
-                    if (!m_frame->document()->inPageCache()) {
+                    if (!m_frame.document()->inPageCache()) {
                         RefPtr<Event> unloadEvent(Event::create(eventNames().unloadEvent, false, false));
                         // The DocumentLoader (and thus its DocumentLoadTiming) might get destroyed
                         // while dispatching the event, so protect it to prevent writing the end
@@ -425,39 +425,39 @@ void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy)
                             DocumentLoadTiming* timing = documentLoader->timing();
                             ASSERT(timing->navigationStart());
                             timing->markUnloadEventStart();
-                            m_frame->document()->domWindow()->dispatchEvent(unloadEvent, m_frame->document());
+                            m_frame.document()->domWindow()->dispatchEvent(unloadEvent, m_frame.document());
                             timing->markUnloadEventEnd();
                         } else
-                            m_frame->document()->domWindow()->dispatchEvent(unloadEvent, m_frame->document());
+                            m_frame.document()->domWindow()->dispatchEvent(unloadEvent, m_frame.document());
                     }
                 }
                 m_pageDismissalEventBeingDispatched = NoDismissal;
-                if (m_frame->document())
-                    m_frame->document()->updateStyleIfNeeded();
+                if (m_frame.document())
+                    m_frame.document()->updateStyleIfNeeded();
                 m_wasUnloadEventEmitted = true;
             }
         }
 
-        // Dispatching the unload event could have made m_frame->document() null.
-        if (m_frame->document() && !m_frame->document()->inPageCache()) {
+        // Dispatching the unload event could have made m_frame.document() null.
+        if (m_frame.document() && !m_frame.document()->inPageCache()) {
             // Don't remove event listeners from a transitional empty document (see bug 28716 for more information).
             bool keepEventListeners = m_stateMachine.isDisplayingInitialEmptyDocument() && m_provisionalDocumentLoader
-                && m_frame->document()->isSecureTransitionTo(m_provisionalDocumentLoader->url());
+                && m_frame.document()->isSecureTransitionTo(m_provisionalDocumentLoader->url());
 
             if (!keepEventListeners)
-                m_frame->document()->removeAllEventListeners();
+                m_frame.document()->removeAllEventListeners();
         }
     }
 
     m_isComplete = true; // to avoid calling completed() in finishedParsing()
     m_didCallImplicitClose = true; // don't want that one either
 
-    if (m_frame->document() && m_frame->document()->parsing()) {
+    if (m_frame.document() && m_frame.document()->parsing()) {
         finishedParsing();
-        m_frame->document()->setParsing(false);
+        m_frame.document()->setParsing(false);
     }
 
-    if (Document* doc = m_frame->document()) {
+    if (Document* doc = m_frame.document()) {
         // FIXME: HTML5 doesn't tell us to set the state to complete when aborting, but we do anyway to match legacy behavior.
         // http://www.w3.org/Bugs/Public/show_bug.cgi?id=10537
         doc->setReadyState(Document::Complete);
@@ -469,16 +469,16 @@ void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy)
     }
 
     // FIXME: This will cancel redirection timer, which really needs to be restarted when restoring the frame from b/f cache.
-    m_frame->navigationScheduler().cancel();
+    m_frame.navigationScheduler().cancel();
 }
 
 void FrameLoader::stop()
 {
     // http://bugs.webkit.org/show_bug.cgi?id=10854
     // The frame's last ref may be removed and it will be deleted by checkCompleted().
-    RefPtr<Frame> protector(m_frame);
+    RefPtr<Frame> protector(&m_frame);
 
-    if (DocumentParser* parser = m_frame->document()->parser()) {
+    if (DocumentParser* parser = m_frame.document()->parser()) {
         parser->stopParsing();
         parser->finish();
     }
@@ -490,11 +490,11 @@ void FrameLoader::willTransitionToCommitted()
 {
     // This function is called when a frame is still fully in place (not cached, not detached), but will be replaced.
 
-    if (m_frame->editor().hasComposition()) {
+    if (m_frame.editor().hasComposition()) {
         // The text was already present in DOM, so it's better to confirm than to cancel the composition.
-        m_frame->editor().confirmComposition();
-        if (EditorClient* editorClient = m_frame->editor().client())
-            editorClient->respondToChangedSelection(m_frame);
+        m_frame.editor().confirmComposition();
+        if (EditorClient* editorClient = m_frame.editor().client())
+            editorClient->respondToChangedSelection(&m_frame);
     }
 }
 
@@ -503,23 +503,23 @@ bool FrameLoader::closeURL()
     history()->saveDocumentState();
     
     // Should only send the pagehide event here if the current document exists and has not been placed in the page cache.    
-    Document* currentDocument = m_frame->document();
+    Document* currentDocument = m_frame.document();
     stopLoading(currentDocument && !currentDocument->inPageCache() ? UnloadEventPolicyUnloadAndPageHide : UnloadEventPolicyUnloadOnly);
     
-    m_frame->editor().clearUndoRedoOperations();
+    m_frame.editor().clearUndoRedoOperations();
     return true;
 }
 
 bool FrameLoader::didOpenURL()
 {
-    if (m_frame->navigationScheduler().redirectScheduledDuringLoad()) {
+    if (m_frame.navigationScheduler().redirectScheduledDuringLoad()) {
         // A redirect was scheduled before the document was created.
         // This can happen when one frame changes another frame's location.
         return false;
     }
 
-    m_frame->navigationScheduler().cancel();
-    m_frame->editor().clearLastEditCommand();
+    m_frame.navigationScheduler().cancel();
+    m_frame.editor().clearLastEditCommand();
 
     m_isComplete = false;
     m_didCallImplicitClose = false;
@@ -528,7 +528,7 @@ bool FrameLoader::didOpenURL()
     // its frame is not in a consistent state for rendering, so avoid setJSStatusBarText
     // since it may cause clients to attempt to render the frame.
     if (!m_stateMachine.creatingInitialEmptyDocument()) {
-        DOMWindow* window = m_frame->document()->domWindow();
+        DOMWindow* window = m_frame.document()->domWindow();
         window->setStatus(String());
         window->setDefaultStatus(String());
     }
@@ -551,62 +551,62 @@ void FrameLoader::didExplicitOpen()
     // from a subsequent window.document.open / window.document.write call. 
     // Canceling redirection here works for all cases because document.open 
     // implicitly precedes document.write.
-    m_frame->navigationScheduler().cancel();
+    m_frame.navigationScheduler().cancel();
 }
 
 
 void FrameLoader::cancelAndClear()
 {
-    m_frame->navigationScheduler().cancel();
+    m_frame.navigationScheduler().cancel();
 
     if (!m_isComplete)
         closeURL();
 
-    clear(m_frame->document(), false);
-    m_frame->script().updatePlatformScriptObjects();
+    clear(m_frame.document(), false);
+    m_frame.script().updatePlatformScriptObjects();
 }
 
 void FrameLoader::clear(Document* newDocument, bool clearWindowProperties, bool clearScriptObjects, bool clearFrameView)
 {
-    m_frame->editor().clear();
+    m_frame.editor().clear();
 
     if (!m_needsClear)
         return;
     m_needsClear = false;
     
-    if (!m_frame->document()->inPageCache()) {
-        m_frame->document()->cancelParsing();
-        m_frame->document()->stopActiveDOMObjects();
-        if (m_frame->document()->attached()) {
-            m_frame->document()->prepareForDestruction();
-            m_frame->document()->removeFocusedNodeOfSubtree(m_frame->document());
+    if (!m_frame.document()->inPageCache()) {
+        m_frame.document()->cancelParsing();
+        m_frame.document()->stopActiveDOMObjects();
+        if (m_frame.document()->attached()) {
+            m_frame.document()->prepareForDestruction();
+            m_frame.document()->removeFocusedNodeOfSubtree(m_frame.document());
         }
     }
 
     // Do this after detaching the document so that the unload event works.
     if (clearWindowProperties) {
-        InspectorInstrumentation::frameWindowDiscarded(m_frame, m_frame->document()->domWindow());
-        m_frame->document()->domWindow()->resetUnlessSuspendedForPageCache();
-        m_frame->script().clearWindowShell(newDocument->domWindow(), m_frame->document()->inPageCache());
+        InspectorInstrumentation::frameWindowDiscarded(&m_frame, m_frame.document()->domWindow());
+        m_frame.document()->domWindow()->resetUnlessSuspendedForPageCache();
+        m_frame.script().clearWindowShell(newDocument->domWindow(), m_frame.document()->inPageCache());
     }
 
-    m_frame->selection().prepareForDestruction();
-    m_frame->eventHandler().clear();
-    if (clearFrameView && m_frame->view())
-        m_frame->view()->clear();
+    m_frame.selection().prepareForDestruction();
+    m_frame.eventHandler().clear();
+    if (clearFrameView && m_frame.view())
+        m_frame.view()->clear();
 
     // Do not drop the document before the ScriptController and view are cleared
     // as some destructors might still try to access the document.
-    m_frame->setDocument(0);
+    m_frame.setDocument(0);
 
     m_subframeLoader.clear();
 
     if (clearScriptObjects)
-        m_frame->script().clearScriptObjects();
+        m_frame.script().clearScriptObjects();
 
-    m_frame->script().enableEval();
+    m_frame.script().enableEval();
 
-    m_frame->navigationScheduler().clear();
+    m_frame.navigationScheduler().clear();
 
     m_checkTimer.stop();
     m_shouldCallCheckCompleted = false;
@@ -626,12 +626,12 @@ void FrameLoader::receivedFirstData()
         StringWithDirection ptitle = m_documentLoader->title();
         // If we have a title let the WebView know about it.
         if (!ptitle.isNull())
-            m_client->dispatchDidReceiveTitle(ptitle);
+            m_client.dispatchDidReceiveTitle(ptitle);
     }
 
     if (!m_documentLoader)
         return;
-    if (m_frame->document()->isViewSource())
+    if (m_frame.document()->isViewSource())
         return;
 
     double delay;
@@ -639,11 +639,11 @@ void FrameLoader::receivedFirstData()
     if (!parseHTTPRefresh(m_documentLoader->response().httpHeaderField("Refresh"), false, delay, url))
         return;
     if (url.isEmpty())
-        url = m_frame->document()->url().string();
+        url = m_frame.document()->url().string();
     else
-        url = m_frame->document()->completeURL(url).string();
+        url = m_frame.document()->completeURL(url).string();
 
-    m_frame->navigationScheduler().scheduleRedirect(delay, url);
+    m_frame.navigationScheduler().scheduleRedirect(delay, url);
 }
 
 void FrameLoader::setOutgoingReferrer(const KURL& url)
@@ -656,10 +656,10 @@ void FrameLoader::didBeginDocument(bool dispatch)
     m_needsClear = true;
     m_isComplete = false;
     m_didCallImplicitClose = false;
-    m_frame->document()->setReadyState(Document::Loading);
+    m_frame.document()->setReadyState(Document::Loading);
 
     if (m_pendingStateObject) {
-        m_frame->document()->statePopped(m_pendingStateObject.get());
+        m_frame.document()->statePopped(m_pendingStateObject.get());
         m_pendingStateObject.clear();
     }
 
@@ -667,34 +667,34 @@ void FrameLoader::didBeginDocument(bool dispatch)
         dispatchDidClearWindowObjectsInAllWorlds();
 
     updateFirstPartyForCookies();
-    m_frame->document()->initContentSecurityPolicy();
+    m_frame.document()->initContentSecurityPolicy();
 
-    Settings* settings = m_frame->document()->settings();
+    Settings* settings = m_frame.document()->settings();
     if (settings) {
-        m_frame->document()->cachedResourceLoader()->setImagesEnabled(settings->areImagesEnabled());
-        m_frame->document()->cachedResourceLoader()->setAutoLoadImages(settings->loadsImagesAutomatically());
+        m_frame.document()->cachedResourceLoader()->setImagesEnabled(settings->areImagesEnabled());
+        m_frame.document()->cachedResourceLoader()->setAutoLoadImages(settings->loadsImagesAutomatically());
     }
 
     if (m_documentLoader) {
         String dnsPrefetchControl = m_documentLoader->response().httpHeaderField("X-DNS-Prefetch-Control");
         if (!dnsPrefetchControl.isEmpty())
-            m_frame->document()->parseDNSPrefetchControlHeader(dnsPrefetchControl);
+            m_frame.document()->parseDNSPrefetchControlHeader(dnsPrefetchControl);
 
         String policyValue = m_documentLoader->response().httpHeaderField("Content-Security-Policy");
         if (!policyValue.isEmpty())
-            m_frame->document()->contentSecurityPolicy()->didReceiveHeader(policyValue, ContentSecurityPolicy::Enforce);
+            m_frame.document()->contentSecurityPolicy()->didReceiveHeader(policyValue, ContentSecurityPolicy::Enforce);
 
         policyValue = m_documentLoader->response().httpHeaderField("Content-Security-Policy-Report-Only");
         if (!policyValue.isEmpty())
-            m_frame->document()->contentSecurityPolicy()->didReceiveHeader(policyValue, ContentSecurityPolicy::Report);
+            m_frame.document()->contentSecurityPolicy()->didReceiveHeader(policyValue, ContentSecurityPolicy::Report);
 
         policyValue = m_documentLoader->response().httpHeaderField("X-WebKit-CSP");
         if (!policyValue.isEmpty())
-            m_frame->document()->contentSecurityPolicy()->didReceiveHeader(policyValue, ContentSecurityPolicy::PrefixedEnforce);
+            m_frame.document()->contentSecurityPolicy()->didReceiveHeader(policyValue, ContentSecurityPolicy::PrefixedEnforce);
 
         policyValue = m_documentLoader->response().httpHeaderField("X-WebKit-CSP-Report-Only");
         if (!policyValue.isEmpty())
-            m_frame->document()->contentSecurityPolicy()->didReceiveHeader(policyValue, ContentSecurityPolicy::PrefixedReport);
+            m_frame.document()->contentSecurityPolicy()->didReceiveHeader(policyValue, ContentSecurityPolicy::PrefixedReport);
 
         String headerContentLanguage = m_documentLoader->response().httpHeaderField("Content-Language");
         if (!headerContentLanguage.isEmpty()) {
@@ -702,7 +702,7 @@ void FrameLoader::didBeginDocument(bool dispatch)
             headerContentLanguage.truncate(commaIndex); // notFound == -1 == don't truncate
             headerContentLanguage = headerContentLanguage.stripWhiteSpace(isHTMLSpace);
             if (!headerContentLanguage.isEmpty())
-                m_frame->document()->setContentLanguage(headerContentLanguage);
+                m_frame.document()->setContentLanguage(headerContentLanguage);
         }
     }
 
@@ -711,7 +711,7 @@ void FrameLoader::didBeginDocument(bool dispatch)
 
 void FrameLoader::finishedParsing()
 {
-    m_frame->injectUserScripts(InjectAtDocumentEnd);
+    m_frame.injectUserScripts(InjectAtDocumentEnd);
 
     if (m_stateMachine.creatingInitialEmptyDocument())
         return;
@@ -719,19 +719,19 @@ void FrameLoader::finishedParsing()
     // This can be called from the Frame's destructor, in which case we shouldn't protect ourselves
     // because doing so will cause us to re-enter the destructor when protector goes out of scope.
     // Null-checking the FrameView indicates whether or not we're in the destructor.
-    RefPtr<Frame> protector = m_frame->view() ? m_frame : 0;
+    RefPtr<Frame> protector = m_frame.view() ? &m_frame : 0;
 
-    m_client->dispatchDidFinishDocumentLoad();
+    m_client.dispatchDidFinishDocumentLoad();
 
     checkCompleted();
 
-    if (!m_frame->view())
+    if (!m_frame.view())
         return; // We are being destroyed by something checkCompleted called.
 
     // Check if the scrollbars are really needed for the content.
     // If not, remove them, relayout, and repaint.
-    m_frame->view()->restoreScrollbar();
-    scrollToFragmentWithParentBoundary(m_frame->document()->url());
+    m_frame.view()->restoreScrollbar();
+    scrollToFragmentWithParentBoundary(m_frame.document()->url());
 }
 
 void FrameLoader::loadDone()
@@ -741,7 +741,7 @@ void FrameLoader::loadDone()
 
 bool FrameLoader::allChildrenAreComplete() const
 {
-    for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling()) {
+    for (Frame* child = m_frame.tree()->firstChild(); child; child = child->tree()->nextSibling()) {
         if (!child->loader().m_isComplete)
             return false;
     }
@@ -750,7 +750,7 @@ bool FrameLoader::allChildrenAreComplete() const
 
 bool FrameLoader::allAncestorsAreComplete() const
 {
-    for (Frame* ancestor = m_frame; ancestor; ancestor = ancestor->tree()->parent()) {
+    for (Frame* ancestor = &m_frame; ancestor; ancestor = ancestor->tree()->parent()) {
         if (!ancestor->loader().m_isComplete)
             return false;
     }
@@ -759,26 +759,26 @@ bool FrameLoader::allAncestorsAreComplete() const
 
 void FrameLoader::checkCompleted()
 {
-    RefPtr<Frame> protect(m_frame);
+    RefPtr<Frame> protect(&m_frame);
     m_shouldCallCheckCompleted = false;
 
-    if (m_frame->view())
-        m_frame->view()->handleLoadCompleted();
+    if (m_frame.view())
+        m_frame.view()->handleLoadCompleted();
 
     // Have we completed before?
     if (m_isComplete)
         return;
 
     // Are we still parsing?
-    if (m_frame->document()->parsing())
+    if (m_frame.document()->parsing())
         return;
 
     // Still waiting for images/scripts?
-    if (m_frame->document()->cachedResourceLoader()->requestCount())
+    if (m_frame.document()->cachedResourceLoader()->requestCount())
         return;
 
     // Still waiting for elements that don't go through a FrameLoader?
-    if (m_frame->document()->isDelayingLoadEvent())
+    if (m_frame.document()->isDelayingLoadEvent())
         return;
 
     // Any frame that hasn't completed yet?
@@ -788,25 +788,25 @@ void FrameLoader::checkCompleted()
     // OK, completed.
     m_isComplete = true;
     m_requestedHistoryItem = 0;
-    m_frame->document()->setReadyState(Document::Complete);
+    m_frame.document()->setReadyState(Document::Complete);
 
     checkCallImplicitClose(); // if we didn't do it before
 
-    m_frame->navigationScheduler().startTimer();
+    m_frame.navigationScheduler().startTimer();
 
     completed();
-    if (m_frame->page())
+    if (m_frame.page())
         checkLoadComplete();
 
-    if (m_frame->view())
-        m_frame->view()->handleLoadCompleted();
+    if (m_frame.view())
+        m_frame.view()->handleLoadCompleted();
 }
 
 void FrameLoader::checkTimerFired(Timer<FrameLoader>*)
 {
-    RefPtr<Frame> protect(m_frame);
+    RefPtr<Frame> protect(&m_frame);
 
-    if (Page* page = m_frame->page()) {
+    if (Page* page = m_frame.page()) {
         if (page->defersLoading())
             return;
     }
@@ -839,7 +839,7 @@ void FrameLoader::scheduleCheckLoadComplete()
 
 void FrameLoader::checkCallImplicitClose()
 {
-    if (m_didCallImplicitClose || m_frame->document()->parsing() || m_frame->document()->isDelayingLoadEvent())
+    if (m_didCallImplicitClose || m_frame.document()->parsing() || m_frame.document()->isDelayingLoadEvent())
         return;
 
     if (!allChildrenAreComplete())
@@ -847,7 +847,7 @@ void FrameLoader::checkCallImplicitClose()
 
     m_didCallImplicitClose = true;
     m_wasUnloadEventEmitted = false;
-    m_frame->document()->implicitClose();
+    m_frame.document()->implicitClose();
 }
 
 void FrameLoader::loadURLIntoChildFrame(const KURL& url, const String& referer, Frame* childFrame)
@@ -866,7 +866,7 @@ void FrameLoader::loadURLIntoChildFrame(const KURL& url, const String& referer,
     // If we're moving in the back/forward list, we might want to replace the content
     // of this child frame with whatever was there at that point.
     if (parentItem && parentItem->children().size() && isBackForwardLoadType(loadType()) 
-        && !m_frame->document()->loadEventFinished()) {
+        && !m_frame.document()->loadEventFinished()) {
         HistoryItem* childItem = parentItem->childItemWithTarget(childFrame->tree()->uniqueName());
         if (childItem) {
             childFrame->loader().m_requestedHistoryItem = childItem;
@@ -893,7 +893,7 @@ void FrameLoader::loadArchive(PassRefPtr<Archive> archive)
     request.applyWebArchiveHackForMail();
 #endif
 
-    RefPtr<DocumentLoader> documentLoader = m_client->createDocumentLoader(request, substituteData);
+    RefPtr<DocumentLoader> documentLoader = m_client.createDocumentLoader(request, substituteData);
     documentLoader->setArchive(archive.get());
     load(documentLoader.get());
 }
@@ -938,7 +938,7 @@ String FrameLoader::outgoingReferrer() const
 {
     // See http://www.whatwg.org/specs/web-apps/current-work/#fetching-resources
     // for why we walk the parent chain for srcdoc documents.
-    Frame* frame = m_frame;
+    Frame* frame = &m_frame;
     while (frame->document()->isSrcdocDocument()) {
         frame = frame->tree()->parent();
         // Srcdoc documents cannot be top-level documents, by definition,
@@ -950,7 +950,7 @@ String FrameLoader::outgoingReferrer() const
 
 String FrameLoader::outgoingOrigin() const
 {
-    return m_frame->document()->securityOrigin()->toString();
+    return m_frame.document()->securityOrigin()->toString();
 }
 
 bool FrameLoader::checkIfFormActionAllowedByCSP(const KURL& url) const
@@ -958,7 +958,7 @@ bool FrameLoader::checkIfFormActionAllowedByCSP(const KURL& url) const
     if (m_submittedFormURL.isEmpty())
         return true;
 
-    return m_frame->document()->contentSecurityPolicy()->allowFormAction(url);
+    return m_frame.document()->contentSecurityPolicy()->allowFormAction(url);
 }
 
 Frame* FrameLoader::opener()
@@ -969,22 +969,22 @@ Frame* FrameLoader::opener()
 void FrameLoader::setOpener(Frame* opener)
 {
     if (m_opener && !opener)
-        m_client->didDisownOpener();
+        m_client.didDisownOpener();
 
     if (m_opener)
-        m_opener->loader().m_openedFrames.remove(m_frame);
+        m_opener->loader().m_openedFrames.remove(&m_frame);
     if (opener)
-        opener->loader().m_openedFrames.add(m_frame);
+        opener->loader().m_openedFrames.add(&m_frame);
     m_opener = opener;
 
-    if (m_frame->document())
-        m_frame->document()->initSecurityContext();
+    if (m_frame.document())
+        m_frame.document()->initSecurityContext();
 }
 
 // FIXME: This does not belong in FrameLoader!
 void FrameLoader::handleFallbackContent()
 {
-    HTMLFrameOwnerElement* owner = m_frame->ownerElement();
+    HTMLFrameOwnerElement* owner = m_frame.ownerElement();
     if (!owner || !owner->hasTagName(objectTag))
         return;
     static_cast<HTMLObjectElement*>(owner)->renderFallbackContent();
@@ -994,8 +994,8 @@ void FrameLoader::provisionalLoadStarted()
 {
     if (m_stateMachine.firstLayoutDone())
         m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad);
-    m_frame->navigationScheduler().cancel(true);
-    m_client->provisionalLoadStarted();
+    m_frame.navigationScheduler().cancel(true);
+    m_client.provisionalLoadStarted();
 }
 
 void FrameLoader::resetMultipleFormSubmissionProtection()
@@ -1005,15 +1005,15 @@ void FrameLoader::resetMultipleFormSubmissionProtection()
 
 void FrameLoader::updateFirstPartyForCookies()
 {
-    if (m_frame->tree()->parent())
-        setFirstPartyForCookies(m_frame->tree()->parent()->document()->firstPartyForCookies());
+    if (m_frame.tree()->parent())
+        setFirstPartyForCookies(m_frame.tree()->parent()->document()->firstPartyForCookies());
     else
-        setFirstPartyForCookies(m_frame->document()->url());
+        setFirstPartyForCookies(m_frame.document()->url());
 }
 
 void FrameLoader::setFirstPartyForCookies(const KURL& url)
 {
-    for (Frame* frame = m_frame; frame; frame = frame->tree()->traverseNext(m_frame))
+    for (Frame* frame = &m_frame; frame; frame = frame->tree()->traverseNext(&m_frame))
         frame->document()->setFirstPartyForCookies(url);
 }
 
@@ -1025,8 +1025,8 @@ void FrameLoader::loadInSameDocument(const KURL& url, PassRefPtr<SerializedScrip
     ASSERT(!stateObject || (stateObject && !isNewNavigation));
 
     // Update the data source's request with the new URL to fake the URL change
-    KURL oldURL = m_frame->document()->url();
-    m_frame->document()->setURL(url);
+    KURL oldURL = m_frame.document()->url();
+    m_frame.document()->setURL(url);
     setOutgoingReferrer(url);
     documentLoader()->replaceRequestURLForSameDocumentNavigation(url);
     if (isNewNavigation && !shouldTreatURLAsSameAsCurrent(url) && !stateObject) {
@@ -1050,7 +1050,7 @@ void FrameLoader::loadInSameDocument(const KURL& url, PassRefPtr<SerializedScrip
 
     // If we were in the autoscroll/panScroll mode we want to stop it before following the link to the anchor
     if (hashChange)
-        m_frame->eventHandler().stopAutoscrollTimer();
+        m_frame.eventHandler().stopAutoscrollTimer();
     
     // It's important to model this as a load that starts and immediately finishes.
     // Otherwise, the parent frame may think we never finished loading.
@@ -1070,18 +1070,18 @@ void FrameLoader::loadInSameDocument(const KURL& url, PassRefPtr<SerializedScrip
         checkLoadComplete();
     }
 
-    m_client->dispatchDidNavigateWithinPage();
+    m_client.dispatchDidNavigateWithinPage();
 
-    m_frame->document()->statePopped(stateObject ? stateObject : SerializedScriptValue::nullValue());
-    m_client->dispatchDidPopStateWithinPage();
+    m_frame.document()->statePopped(stateObject ? stateObject : SerializedScriptValue::nullValue());
+    m_client.dispatchDidPopStateWithinPage();
     
     if (hashChange) {
-        m_frame->document()->enqueueHashchangeEvent(oldURL, url);
-        m_client->dispatchDidChangeLocationWithinPage();
+        m_frame.document()->enqueueHashchangeEvent(oldURL, url);
+        m_client.dispatchDidChangeLocationWithinPage();
     }
     
     // FrameLoaderClient::didFinishLoad() tells the internal load delegate the load finished with no error
-    m_client->didFinishLoad();
+    m_client.didFinishLoad();
 }
 
 bool FrameLoader::isComplete() const
@@ -1091,24 +1091,24 @@ bool FrameLoader::isComplete() const
 
 void FrameLoader::completed()
 {
-    RefPtr<Frame> protect(m_frame);
+    RefPtr<Frame> protect(&m_frame);
 
-    for (Frame* descendant = m_frame->tree()->traverseNext(m_frame); descendant; descendant = descendant->tree()->traverseNext(m_frame))
+    for (Frame* descendant = m_frame.tree()->traverseNext(&m_frame); descendant; descendant = descendant->tree()->traverseNext(&m_frame))
         descendant->navigationScheduler().startTimer();
 
-    if (Frame* parent = m_frame->tree()->parent())
+    if (Frame* parent = m_frame.tree()->parent())
         parent->loader().checkCompleted();
 
-    if (m_frame->view())
-        m_frame->view()->maintainScrollPositionAtAnchor(0);
+    if (m_frame.view())
+        m_frame.view()->maintainScrollPositionAtAnchor(0);
     m_activityAssertion.clear();
 }
 
 void FrameLoader::started()
 {
-    if (m_frame && m_frame->page())
-        m_activityAssertion = m_frame->page()->createActivityToken();
-    for (Frame* frame = m_frame; frame; frame = frame->tree()->parent())
+    if (m_frame.page())
+        m_activityAssertion = m_frame.page()->createActivityToken();
+    for (Frame* frame = &m_frame; frame; frame = frame->tree()->parent())
         frame->loader().m_isComplete = false;
 }
 
@@ -1123,7 +1123,7 @@ void FrameLoader::prepareForHistoryNavigation()
         currentItem = HistoryItem::create();
         currentItem->setLastVisitWasFailure(true);
         history()->setCurrentItem(currentItem.get());
-        frame()->page()->backForward()->setCurrentItem(currentItem.get());
+        m_frame.page()->backForward()->setCurrentItem(currentItem.get());
 
         ASSERT(stateMachine()->isDisplayingInitialEmptyDocument());
         stateMachine()->advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocumentPostCommit);
@@ -1134,18 +1134,18 @@ void FrameLoader::prepareForHistoryNavigation()
 void FrameLoader::prepareForLoadStart()
 {
     m_progressTracker->progressStarted();
-    m_client->dispatchDidStartProvisionalLoad();
+    m_client.dispatchDidStartProvisionalLoad();
 
     // Notify accessibility.
-    if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache()) {
+    if (AXObjectCache* cache = m_frame.document()->existingAXObjectCache()) {
         AXObjectCache::AXLoadingEvent loadingEvent = loadType() == FrameLoadTypeReload ? AXObjectCache::AXLoadingReloaded : AXObjectCache::AXLoadingStarted;
-        cache->frameLoadingEventNotification(m_frame, loadingEvent);
+        cache->frameLoadingEventNotification(&m_frame, loadingEvent);
     }
 }
 
 void FrameLoader::setupForReplace()
 {
-    m_client->revertToProvisionalState(m_documentLoader.get());
+    m_client.revertToProvisionalState(m_documentLoader.get());
     setState(FrameStateProvisional);
     m_provisionalDocumentLoader = m_documentLoader;
     m_documentLoader = 0;
@@ -1156,13 +1156,13 @@ void FrameLoader::loadFrameRequest(const FrameLoadRequest& request, bool lockHis
     PassRefPtr<Event> event, PassRefPtr<FormState> formState, ShouldSendReferrer shouldSendReferrer)
 {    
     // Protect frame from getting blown away inside dispatchBeforeLoadEvent in loadWithDocumentLoader.
-    RefPtr<Frame> protect(m_frame);
+    RefPtr<Frame> protect(&m_frame);
 
     KURL url = request.resourceRequest().url();
 
-    ASSERT(m_frame->document());
+    ASSERT(m_frame.document());
     if (!request.requester()->canDisplay(url)) {
-        reportLocalLoadFailed(m_frame, url.stringCenterEllipsizedToLength());
+        reportLocalLoadFailed(&m_frame, url.stringCenterEllipsizedToLength());
         return;
     }
 
@@ -1170,7 +1170,7 @@ void FrameLoader::loadFrameRequest(const FrameLoadRequest& request, bool lockHis
     if (argsReferrer.isEmpty())
         argsReferrer = outgoingReferrer();
 
-    String referrer = SecurityPolicy::generateReferrerHeader(m_frame->document()->referrerPolicy(), url, argsReferrer);
+    String referrer = SecurityPolicy::generateReferrerHeader(m_frame.document()->referrerPolicy(), url, argsReferrer);
     if (shouldSendReferrer == NeverSendReferrer)
         referrer = String();
     
@@ -1189,9 +1189,9 @@ void FrameLoader::loadFrameRequest(const FrameLoadRequest& request, bool lockHis
 
     // FIXME: It's possible this targetFrame will not be the same frame that was targeted by the actual
     // load if frame names have changed.
-    Frame* sourceFrame = formState ? formState->sourceDocument()->frame() : m_frame;
+    Frame* sourceFrame = formState ? formState->sourceDocument()->frame() : &m_frame;
     if (!sourceFrame)
-        sourceFrame = m_frame;
+        sourceFrame = &m_frame;
     Frame* targetFrame = sourceFrame->loader().findFrameForNavigation(request.frameName());
     if (targetFrame && targetFrame != sourceFrame) {
         if (Page* page = targetFrame->page())
@@ -1215,8 +1215,8 @@ void FrameLoader::loadURL(const KURL& newURL, const String& referrer, const Stri
         addHTTPOriginIfNeeded(request, referrerOrigin->toString());
     }
 #if ENABLE(CACHE_PARTITIONING)
-    if (m_frame->tree()->top() != m_frame)
-        request.setCachePartition(m_frame->tree()->top()->document()->securityOrigin()->cachePartition());
+    if (m_frame.tree()->top() != &m_frame)
+        request.setCachePartition(m_frame.tree()->top()->document()->securityOrigin()->cachePartition());
 #endif
     addExtraFieldsToRequest(request, newLoadType, true);
     if (newLoadType == FrameLoadTypeReload || newLoadType == FrameLoadTypeReloadFromOrigin)
@@ -1226,7 +1226,7 @@ void FrameLoader::loadURL(const KURL& newURL, const String& referrer, const Stri
 
     // The search for a target frame is done earlier in the case of form submission.
     Frame* targetFrame = isFormSubmission ? 0 : findFrameForNavigation(frameName);
-    if (targetFrame && targetFrame != m_frame) {
+    if (targetFrame && targetFrame != &m_frame) {
         targetFrame->loader().loadURL(newURL, referrer, "_self", lockHistory, newLoadType, event, formState.release());
         return;
     }
@@ -1276,7 +1276,7 @@ SubstituteData FrameLoader::defaultSubstituteDataForURL(const KURL& url)
 {
     if (!shouldTreatURLAsSrcdocDocument(url))
         return SubstituteData();
-    String srcdoc = m_frame->ownerElement()->fastGetAttribute(srcdocAttr);
+    String srcdoc = m_frame.ownerElement()->fastGetAttribute(srcdocAttr);
     ASSERT(!srcdoc.isNull());
     CString encodedSrcdoc = srcdoc.utf8();
     return SubstituteData(SharedBuffer::create(encodedSrcdoc.data(), encodedSrcdoc.length()), "text/html", "UTF-8", KURL());
@@ -1308,7 +1308,7 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest)
     if (!request.hasSubstituteData())
         request.setSubstituteData(defaultSubstituteDataForURL(request.resourceRequest().url()));
 
-    RefPtr<DocumentLoader> loader = m_client->createDocumentLoader(request.resourceRequest(), request.substituteData());
+    RefPtr<DocumentLoader> loader = m_client.createDocumentLoader(request.resourceRequest(), request.substituteData());
     if (request.lockHistory() && m_documentLoader)
         loader->setClientRedirectSourceForHistory(m_documentLoader->didCreateGlobalHistoryEntry() ? m_documentLoader->urlForHistory().string() : m_documentLoader->clientRedirectSourceForHistory());
     load(loader.get());
@@ -1316,7 +1316,7 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest)
 
 void FrameLoader::loadWithNavigationAction(const ResourceRequest& request, const NavigationAction& action, bool lockHistory, FrameLoadType type, PassRefPtr<FormState> formState)
 {
-    RefPtr<DocumentLoader> loader = m_client->createDocumentLoader(request, defaultSubstituteDataForURL(request.url()));
+    RefPtr<DocumentLoader> loader = m_client.createDocumentLoader(request, defaultSubstituteDataForURL(request.url()));
     if (lockHistory && m_documentLoader)
         loader->setClientRedirectSourceForHistory(m_documentLoader->didCreateGlobalHistoryEntry() ? m_documentLoader->urlForHistory().string() : m_documentLoader->clientRedirectSourceForHistory());
 
@@ -1367,20 +1367,20 @@ void FrameLoader::load(DocumentLoader* newDocumentLoader)
 void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType type, PassRefPtr<FormState> prpFormState)
 {
     // Retain because dispatchBeforeLoadEvent may release the last reference to it.
-    RefPtr<Frame> protect(m_frame);
+    RefPtr<Frame> protect(&m_frame);
 
-    ASSERT(m_client->hasWebView());
+    ASSERT(m_client.hasWebView());
 
     // Unfortunately the view must be non-nil, this is ultimately due
     // to parser requiring a FrameView.  We should fix this dependency.
 
-    ASSERT(m_frame->view());
+    ASSERT(m_frame.view());
 
     if (m_pageDismissalEventBeingDispatched != NoDismissal)
         return;
 
-    if (m_frame->document())
-        m_previousURL = m_frame->document()->url();
+    if (m_frame.document())
+        m_previousURL = m_frame.document()->url();
 
     policyChecker()->setLoadType(type);
     RefPtr<FormState> formState = prpFormState;
@@ -1398,7 +1398,7 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
         policyChecker()->checkNavigationPolicy(loader->request(), oldDocumentLoader.get(), formState,
             callContinueFragmentScrollAfterNavigationPolicy, this);
     } else {
-        if (Frame* parent = m_frame->tree()->parent())
+        if (Frame* parent = m_frame.tree()->parent())
             loader->setOverrideEncoding(parent->loader().documentLoader()->overrideEncoding());
 
         policyChecker()->stopCheck();
@@ -1406,7 +1406,7 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
         if (loader->triggeringAction().isEmpty())
             loader->setTriggeringAction(NavigationAction(loader->request(), policyChecker()->loadType(), isFormSubmission));
 
-        if (Element* ownerElement = m_frame->ownerElement()) {
+        if (Element* ownerElement = m_frame.ownerElement()) {
             // We skip dispatching the beforeload event if we've already
             // committed a real document load because the event would leak
             // subsequent activity by the frame which the parent frame isn't
@@ -1490,7 +1490,7 @@ void FrameLoader::reloadWithOverrideEncoding(const String& encoding)
     // We should ask the user for confirmation in this case.
     request.setCachePolicy(ReturnCacheDataElseLoad);
 
-    RefPtr<DocumentLoader> loader = m_client->createDocumentLoader(request, defaultSubstituteDataForURL(request.url()));
+    RefPtr<DocumentLoader> loader = m_client.createDocumentLoader(request, defaultSubstituteDataForURL(request.url()));
     setPolicyDocumentLoader(loader.get());
 
     loader->setOverrideEncoding(encoding);
@@ -1536,7 +1536,7 @@ void FrameLoader::reloadWithRequest(const ResourceRequest& initialRequest, bool
 
     // Create a new document loader for the reload, this will become m_documentLoader eventually,
     // but first it has to be the "policy" document loader, and then the "provisional" document loader.
-    RefPtr<DocumentLoader> loader = m_client->createDocumentLoader(initialRequest, defaultSubstituteDataForURL(initialRequest.url()));
+    RefPtr<DocumentLoader> loader = m_client.createDocumentLoader(initialRequest, defaultSubstituteDataForURL(initialRequest.url()));
 
     ResourceRequest& request = loader->request();
 
@@ -1554,7 +1554,7 @@ void FrameLoader::reloadWithRequest(const ResourceRequest& initialRequest, bool
 
 void FrameLoader::stopAllLoaders(ClearProvisionalItemPolicy clearProvisionalItemPolicy)
 {
-    ASSERT(!m_frame->document() || !m_frame->document()->inPageCache());
+    ASSERT(!m_frame.document() || !m_frame.document()->inPageCache());
     if (m_pageDismissalEventBeingDispatched != NoDismissal)
         return;
 
@@ -1564,7 +1564,7 @@ void FrameLoader::stopAllLoaders(ClearProvisionalItemPolicy clearProvisionalItem
     
     // Calling stopLoading() on the provisional document loader can blow away
     // the frame from underneath.
-    RefPtr<Frame> protect(m_frame);
+    RefPtr<Frame> protect(&m_frame);
 
     m_inStopAllLoaders = true;
 
@@ -1575,7 +1575,7 @@ void FrameLoader::stopAllLoaders(ClearProvisionalItemPolicy clearProvisionalItem
     if (clearProvisionalItemPolicy == ShouldClearProvisionalItem)
         history()->setProvisionalItem(0);
 
-    for (RefPtr<Frame> child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
+    for (RefPtr<Frame> child = m_frame.tree()->firstChild(); child; child = child->tree()->nextSibling())
         child->loader().stopAllLoaders(clearProvisionalItemPolicy);
     if (m_provisionalDocumentLoader)
         m_provisionalDocumentLoader->stopLoading();
@@ -1595,7 +1595,7 @@ void FrameLoader::stopForUserCancel(bool deferCheckLoadComplete)
     
     if (deferCheckLoadComplete)
         scheduleCheckLoadComplete();
-    else if (m_frame->page())
+    else if (m_frame.page())
         checkLoadComplete();
 }
 
@@ -1627,7 +1627,7 @@ void FrameLoader::setDocumentLoader(DocumentLoader* loader)
     ASSERT(loader != m_documentLoader);
     ASSERT(!loader || loader->frameLoader() == this);
 
-    m_client->prepareForDataSourceReplacement();
+    m_client.prepareForDataSourceReplacement();
     detachChildren();
 
     // detachChildren() can trigger this frame's unload event, and therefore
@@ -1651,9 +1651,8 @@ void FrameLoader::setPolicyDocumentLoader(DocumentLoader* loader)
     if (m_policyDocumentLoader == loader)
         return;
 
-    ASSERT(m_frame);
     if (loader)
-        loader->setFrame(m_frame);
+        loader->setFrame(&m_frame);
     if (m_policyDocumentLoader
             && m_policyDocumentLoader != m_provisionalDocumentLoader
             && m_policyDocumentLoader != m_documentLoader)
@@ -1703,10 +1702,10 @@ void FrameLoader::commitProvisionalLoad()
 {
     RefPtr<CachedPage> cachedPage = m_loadingFromCachedPage ? pageCache()->get(history()->provisionalItem()) : 0;
     RefPtr<DocumentLoader> pdl = m_provisionalDocumentLoader;
-    RefPtr<Frame> protect(m_frame);
+    RefPtr<Frame> protect(&m_frame);
 
-    LOG(PageCache, "WebCoreLoading %s: About to commit provisional load from previous URL '%s' to new URL '%s'", m_frame->tree()->uniqueName().string().utf8().data(),
-        m_frame->document() ? m_frame->document()->url().stringCenterEllipsizedToLength().utf8().data() : "",
+    LOG(PageCache, "WebCoreLoading %s: About to commit provisional load from previous URL '%s' to new URL '%s'", m_frame.tree()->uniqueName().string().utf8().data(),
+        m_frame.document() ? m_frame.document()->url().stringCenterEllipsizedToLength().utf8().data() : "",
         pdl ? pdl->url().stringCenterEllipsizedToLength().utf8().data() : "<no provisional DocumentLoader>");
 
     willTransitionToCommitted();
@@ -1714,14 +1713,14 @@ void FrameLoader::commitProvisionalLoad()
     // Check to see if we need to cache the page we are navigating away from into the back/forward cache.
     // We are doing this here because we know for sure that a new page is about to be loaded.
     HistoryItem* item = history()->currentItem();
-    if (!m_frame->tree()->parent() && pageCache()->canCache(m_frame->page()) && !item->isInPageCache())
-        pageCache()->add(item, m_frame->page());
+    if (!m_frame.tree()->parent() && pageCache()->canCache(m_frame.page()) && !item->isInPageCache())
+        pageCache()->add(item, m_frame.page());
 
     if (m_loadType != FrameLoadTypeReplace)
         closeOldDataSources();
 
     if (!cachedPage && !m_stateMachine.creatingInitialEmptyDocument())
-        m_client->makeRepresentation(pdl.get());
+        m_client.makeRepresentation(pdl.get());
 
     transitionToCommitted(cachedPage);
 
@@ -1740,7 +1739,7 @@ void FrameLoader::commitProvisionalLoad()
     
     if (cachedPage && cachedPage->document()) {
         prepareForCachedPageRestore();
-        cachedPage->restore(m_frame->page());
+        cachedPage->restore(m_frame.page());
 
         // The page should be removed from the cache immediately after a restoration in order for the PageCache to be consistent.
         pageCache()->remove(history()->currentItem());
@@ -1750,7 +1749,7 @@ void FrameLoader::commitProvisionalLoad()
         // If we have a title let the WebView know about it. 
         StringWithDirection title = m_documentLoader->title();
         if (!title.isNull())
-            m_client->dispatchDidReceiveTitle(title);
+            m_client.dispatchDidReceiveTitle(title);
 
         checkCompleted();
     } else {
@@ -1759,17 +1758,17 @@ void FrameLoader::commitProvisionalLoad()
         didOpenURL();
     }
 
-    LOG(Loading, "WebCoreLoading %s: Finished committing provisional load to URL %s", m_frame->tree()->uniqueName().string().utf8().data(),
-        m_frame->document() ? m_frame->document()->url().stringCenterEllipsizedToLength().utf8().data() : "");
+    LOG(Loading, "WebCoreLoading %s: Finished committing provisional load to URL %s", m_frame.tree()->uniqueName().string().utf8().data(),
+        m_frame.document() ? m_frame.document()->url().stringCenterEllipsizedToLength().utf8().data() : "");
 
     if (m_loadType == FrameLoadTypeStandard && m_documentLoader->isClientRedirect())
         history()->updateForClientRedirect();
 
     if (m_loadingFromCachedPage) {
-        m_frame->document()->documentDidResumeFromPageCache();
+        m_frame.document()->documentDidResumeFromPageCache();
         
         // Force a layout to update view size and thereby update scrollbars.
-        m_frame->view()->forceLayout();
+        m_frame.view()->forceLayout();
 
         const ResponseVector& responses = m_documentLoader->responses();
         size_t count = responses.size();
@@ -1793,18 +1792,18 @@ void FrameLoader::commitProvisionalLoad()
 
 void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
 {
-    ASSERT(m_client->hasWebView());
+    ASSERT(m_client.hasWebView());
     ASSERT(m_state == FrameStateProvisional);
 
     if (m_state != FrameStateProvisional)
         return;
 
-    if (FrameView* view = m_frame->view()) {
+    if (FrameView* view = m_frame.view()) {
         if (ScrollAnimator* scrollAnimator = view->existingScrollAnimator())
             scrollAnimator->cancelAnimations();
     }
 
-    m_client->setCopiesOnScroll();
+    m_client.setCopiesOnScroll();
     history()->updateForCommit();
 
     // The call to closeURL() invokes the unload event handler, which can execute arbitrary
@@ -1834,7 +1833,7 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
 
 #if ENABLE(TOUCH_EVENTS)
     if (isLoadingMainFrame())
-        m_frame->page()->chrome().client().needTouchEvents(false);
+        m_frame.page()->chrome().client().needTouchEvents(false);
 #endif
 
     // Handle adding the URL to the back/forward list.
@@ -1844,7 +1843,7 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
         case FrameLoadTypeForward:
         case FrameLoadTypeBack:
         case FrameLoadTypeIndexedBackForward:
-            if (m_frame->page()) {
+            if (m_frame.page()) {
                 // If the first load within a frame is a navigation within a back/forward list that was attached
                 // without any of the items being loaded then we need to update the history in a similar manner as
                 // for a standard load with the exception of updating the back/forward list (<rdar://problem/8091103>).
@@ -1861,10 +1860,10 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
                 if (cachedPage) {
                     DocumentLoader* cachedDocumentLoader = cachedPage->documentLoader();
                     ASSERT(cachedDocumentLoader);
-                    cachedDocumentLoader->setFrame(m_frame);
-                    m_client->transitionToCommittedFromCachedFrame(cachedPage->cachedMainFrame());
+                    cachedDocumentLoader->setFrame(&m_frame);
+                    m_client.transitionToCommittedFromCachedFrame(cachedPage->cachedMainFrame());
                 } else
-                    m_client->transitionToCommittedForNewPage();
+                    m_client.transitionToCommittedForNewPage();
             }
             break;
 
@@ -1873,19 +1872,19 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
         case FrameLoadTypeSame:
         case FrameLoadTypeReplace:
             history()->updateForReload();
-            m_client->transitionToCommittedForNewPage();
+            m_client.transitionToCommittedForNewPage();
             break;
 
         case FrameLoadTypeStandard:
             history()->updateForStandardLoad();
-            if (m_frame->view())
-                m_frame->view()->setScrollbarsSuppressed(true);
-            m_client->transitionToCommittedForNewPage();
+            if (m_frame.view())
+                m_frame.view()->setScrollbarsSuppressed(true);
+            m_client.transitionToCommittedForNewPage();
             break;
 
         case FrameLoadTypeRedirectWithLockedBackForwardList:
             history()->updateForRedirectWithLockedBackForwardList();
-            m_client->transitionToCommittedForNewPage();
+            m_client.transitionToCommittedForNewPage();
             break;
 
         // FIXME Remove this check when dummy ds is removed (whatever "dummy ds" is).
@@ -1897,7 +1896,7 @@ void FrameLoader::transitionToCommitted(PassRefPtr<CachedPage> cachedPage)
     m_documentLoader->writer()->setMIMEType(dl->responseMIMEType());
 
     // Tell the client we've committed this URL.
-    ASSERT(m_frame->view());
+    ASSERT(m_frame.view());
 
     if (m_stateMachine.creatingInitialEmptyDocument())
         return;
@@ -1911,7 +1910,7 @@ void FrameLoader::clientRedirectCancelledOrFinished(bool cancelWithLoadInProgres
     // Note that -webView:didCancelClientRedirectForFrame: is called on the frame load delegate even if
     // the redirect succeeded.  We should either rename this API, or add a new method, like
     // -webView:didFinishClientRedirectForFrame:
-    m_client->dispatchDidCancelClientRedirect();
+    m_client.dispatchDidCancelClientRedirect();
 
     if (!cancelWithLoadInProgress)
         m_quickRedirectComing = false;
@@ -1921,7 +1920,7 @@ void FrameLoader::clientRedirectCancelledOrFinished(bool cancelWithLoadInProgres
 
 void FrameLoader::clientRedirected(const KURL& url, double seconds, double fireDate, bool lockBackForwardList)
 {
-    m_client->dispatchWillPerformClientRedirect(url, seconds, fireDate);
+    m_client.dispatchWillPerformClientRedirect(url, seconds, fireDate);
     
     // Remember that we sent a redirect notification to the frame load delegate so that when we commit
     // the next provisional load, we can send a corresponding -webView:didCancelClientRedirectForFrame:
@@ -1949,29 +1948,29 @@ void FrameLoader::closeOldDataSources()
     // FIXME: Is it important for this traversal to be postorder instead of preorder?
     // If so, add helpers for postorder traversal, and use them. If not, then lets not
     // use a recursive algorithm here.
-    for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
+    for (Frame* child = m_frame.tree()->firstChild(); child; child = child->tree()->nextSibling())
         child->loader().closeOldDataSources();
     
     if (m_documentLoader)
-        m_client->dispatchWillClose();
+        m_client.dispatchWillClose();
 
-    m_client->setMainFrameDocumentReady(false); // stop giving out the actual DOMDocument to observers
+    m_client.setMainFrameDocumentReady(false); // stop giving out the actual DOMDocument to observers
 }
 
 void FrameLoader::prepareForCachedPageRestore()
 {
-    ASSERT(!m_frame->tree()->parent());
-    ASSERT(m_frame->page());
-    ASSERT(m_frame->page()->mainFrame() == m_frame);
+    ASSERT(!m_frame.tree()->parent());
+    ASSERT(m_frame.page());
+    ASSERT(m_frame.page()->mainFrame() == &m_frame);
 
-    m_frame->navigationScheduler().cancel();
+    m_frame.navigationScheduler().cancel();
 
     // We still have to close the previous part page.
     closeURL();
     
     // Delete old status bar messages (if it _was_ activated on last URL).
-    if (m_frame->script().canExecuteScripts(NotAboutToExecuteScript)) {
-        DOMWindow* window = m_frame->document()->domWindow();
+    if (m_frame.script().canExecuteScripts(NotAboutToExecuteScript)) {
+        DOMWindow* window = m_frame.document()->domWindow();
         window->setStatus(String());
         window->setDefaultStatus(String());
     }
@@ -2011,11 +2010,11 @@ void FrameLoader::open(CachedFrameBase& cachedFrame)
     view->setWasScrolledByUser(false);
 
     // Use the current ScrollView's frame rect.
-    if (m_frame->view())
-        view->setFrameRect(m_frame->view()->frameRect());
-    m_frame->setView(view);
+    if (m_frame.view())
+        view->setFrameRect(m_frame.view()->frameRect());
+    m_frame.setView(view);
     
-    m_frame->setDocument(document);
+    m_frame.setDocument(document);
     document->domWindow()->resumeFromPageCache();
 
     updateFirstPartyForCookies();
@@ -2025,14 +2024,13 @@ void FrameLoader::open(CachedFrameBase& cachedFrame)
 
 bool FrameLoader::isHostedByObjectElement() const
 {
-    HTMLFrameOwnerElement* owner = m_frame->ownerElement();
+    HTMLFrameOwnerElement* owner = m_frame.ownerElement();
     return owner && owner->hasTagName(objectTag);
 }
 
 bool FrameLoader::isLoadingMainFrame() const
 {
-    Page* page = m_frame->page();
-    return page && m_frame == page->mainFrame();
+    return m_frame.page() && m_frame.page()->mainFrame() == &m_frame;
 }
 
 bool FrameLoader::isReplacing() const
@@ -2048,7 +2046,7 @@ void FrameLoader::setReplacing()
 bool FrameLoader::subframeIsLoading() const
 {
     // It's most likely that the last added frame is the last to load so we walk backwards.
-    for (Frame* child = m_frame->tree()->lastChild(); child; child = child->tree()->previousSibling()) {
+    for (Frame* child = m_frame.tree()->lastChild(); child; child = child->tree()->previousSibling()) {
         FrameLoader& childLoader = child->loader();
         DocumentLoader* documentLoader = childLoader.documentLoader();
         if (documentLoader && documentLoader->isLoadingInAPISense())
@@ -2065,7 +2063,7 @@ bool FrameLoader::subframeIsLoading() const
 
 void FrameLoader::willChangeTitle(DocumentLoader* loader)
 {
-    m_client->willChangeTitle(loader);
+    m_client.willChangeTitle(loader);
 }
 
 FrameLoadType FrameLoader::loadType() const
@@ -2081,7 +2079,7 @@ CachePolicy FrameLoader::subresourceCachePolicy() const
     if (m_loadType == FrameLoadTypeReloadFromOrigin)
         return CachePolicyReload;
 
-    if (Frame* parentFrame = m_frame->tree()->parent()) {
+    if (Frame* parentFrame = m_frame.tree()->parent()) {
         CachePolicy parentCachePolicy = parentFrame->loader().subresourceCachePolicy();
         if (parentCachePolicy != CachePolicyVerify)
             return parentCachePolicy;
@@ -2104,7 +2102,7 @@ CachePolicy FrameLoader::subresourceCachePolicy() const
 
 void FrameLoader::checkLoadCompleteForThisFrame()
 {
-    ASSERT(m_client->hasWebView());
+    ASSERT(m_client.hasWebView());
 
     switch (m_state) {
         case FrameStateProvisional: {
@@ -2122,7 +2120,7 @@ void FrameLoader::checkLoadCompleteForThisFrame()
 
             // Check all children first.
             RefPtr<HistoryItem> item;
-            if (Page* page = m_frame->page())
+            if (Page* page = m_frame.page())
                 if (isBackForwardLoadType(loadType()))
                     // Reset the back forward list to the last committed history item at the top level.
                     item = page->mainFrame()->loader().history()->currentItem();
@@ -2131,7 +2129,7 @@ void FrameLoader::checkLoadCompleteForThisFrame()
             bool shouldReset = !history()->provisionalItem();
             if (!pdl->isLoadingInAPISense() || pdl->isStopping()) {
                 m_delegateIsHandlingProvisionalLoadError = true;
-                m_client->dispatchDidFailProvisionalLoad(error);
+                m_client.dispatchDidFailProvisionalLoad(error);
                 m_delegateIsHandlingProvisionalLoadError = false;
 
                 ASSERT(!pdl->isLoading());
@@ -2151,9 +2149,9 @@ void FrameLoader::checkLoadCompleteForThisFrame()
                 }
             }
             if (shouldReset && item)
-                if (Page* page = m_frame->page()) {
+                if (Page* page = m_frame.page()) {
                     page->backForward()->setCurrentItem(item.get());
-                    m_frame->loader().client()->updateGlobalHistoryItemForPage();
+                    m_frame.loader().client().updateGlobalHistoryItemForPage();
                 }
             return;
         }
@@ -2169,10 +2167,10 @@ void FrameLoader::checkLoadCompleteForThisFrame()
             // Maybe there are bugs because of that, or extra work we can skip because
             // the new page is ready.
 
-            m_client->forceLayoutForNonHTML();
+            m_client.forceLayoutForNonHTML();
              
             // If the user had a scroll point, scroll to it, overriding the anchor point if any.
-            if (m_frame->page()) {
+            if (m_frame.page()) {
                 if (isBackForwardLoadType(m_loadType) || m_loadType == FrameLoadTypeReload || m_loadType == FrameLoadTypeReloadFromOrigin)
                     history()->restoreScrollPositionAndViewState();
             }
@@ -2181,8 +2179,8 @@ void FrameLoader::checkLoadCompleteForThisFrame()
                 return;
 
             m_progressTracker->progressCompleted();
-            if (Page* page = m_frame->page()) {
-                if (m_frame == page->mainFrame())
+            if (Page* page = m_frame.page()) {
+                if (&m_frame == page->mainFrame())
                     page->resetRelevantPaintedObjectCounter();
             }
 
@@ -2190,16 +2188,16 @@ void FrameLoader::checkLoadCompleteForThisFrame()
 
             AXObjectCache::AXLoadingEvent loadingEvent;
             if (!error.isNull()) {
-                m_client->dispatchDidFailLoad(error);
+                m_client.dispatchDidFailLoad(error);
                 loadingEvent = AXObjectCache::AXLoadingFailed;
             } else {
-                m_client->dispatchDidFinishLoad();
+                m_client.dispatchDidFinishLoad();
                 loadingEvent = AXObjectCache::AXLoadingFinished;
             }
 
             // Notify accessibility.
-            if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache())
-                cache->frameLoadingEventNotification(m_frame, loadingEvent);
+            if (AXObjectCache* cache = m_frame.document()->existingAXObjectCache())
+                cache->frameLoadingEventNotification(&m_frame, loadingEvent);
 
             return;
         }
@@ -2235,7 +2233,7 @@ void FrameLoader::continueLoadAfterWillSubmitForm()
 
 static KURL originatingURLFromBackForwardList(Page* page)
 {
-    // FIXME: Can this logic be replaced with m_frame->document()->firstPartyForCookies()?
+    // FIXME: Can this logic be replaced with m_frame.document()->firstPartyForCookies()?
     // It has the same meaning of "page a user thinks is the current one".
 
     KURL originalURL;
@@ -2265,7 +2263,7 @@ void FrameLoader::setOriginalURLForDownloadRequest(ResourceRequest& request)
     // Find a better way to decide whether the download was unrelated to current document.
     if (!request.httpReferrer().isNull()) {
         // find the first item in the history that was originated by the user
-        originalURL = originatingURLFromBackForwardList(m_frame->page());
+        originalURL = originatingURLFromBackForwardList(m_frame.page());
     }
 
     if (originalURL.isNull())
@@ -2290,16 +2288,16 @@ void FrameLoader::setOriginalURLForDownloadRequest(ResourceRequest& request)
 void FrameLoader::didLayout(LayoutMilestones milestones)
 {
 #if !ASSERT_DISABLED
-    if (Page* page = m_frame->page())
-        ASSERT(page->mainFrame() == m_frame);
+    if (Page* page = m_frame.page())
+        ASSERT(page->mainFrame() == &m_frame);
 #endif
 
-    m_client->dispatchDidLayout(milestones);
+    m_client.dispatchDidLayout(milestones);
 }
 
 void FrameLoader::didFirstLayout()
 {
-    if (m_frame->page() && isBackForwardLoadType(m_loadType))
+    if (m_frame.page() && isBackForwardLoadType(m_loadType))
         history()->restoreScrollPositionAndViewState();
 
     if (m_stateMachine.committedFirstRealDocumentLoad() && !m_stateMachine.isDisplayingInitialEmptyDocument() && !m_stateMachine.firstLayoutDone())
@@ -2310,7 +2308,7 @@ void FrameLoader::frameLoadCompleted()
 {
     // Note: Can be called multiple times.
 
-    m_client->frameLoadCompleted();
+    m_client.frameLoadCompleted();
 
     history()->updateForFrameLoadCompleted();
 
@@ -2324,8 +2322,8 @@ void FrameLoader::detachChildren()
 {
     typedef Vector<RefPtr<Frame> > FrameVector;
     FrameVector childrenToDetach;
-    childrenToDetach.reserveCapacity(m_frame->tree()->childCount());
-    for (Frame* child = m_frame->tree()->lastChild(); child; child = child->tree()->previousSibling())
+    childrenToDetach.reserveCapacity(m_frame.tree()->childCount());
+    for (Frame* child = m_frame.tree()->lastChild(); child; child = child->tree()->previousSibling())
         childrenToDetach.append(child);
     FrameVector::iterator end = childrenToDetach.end();
     for (FrameVector::iterator it = childrenToDetach.begin(); it != end; ++it)
@@ -2342,19 +2340,19 @@ void FrameLoader::closeAndRemoveChild(Frame* child)
     child->willDetachPage();
     child->detachFromPage();
 
-    m_frame->tree()->removeChild(child);
+    m_frame.tree()->removeChild(child);
 }
 
 // Called every time a resource is completely loaded or an error is received.
 void FrameLoader::checkLoadComplete()
 {
-    ASSERT(m_client->hasWebView());
+    ASSERT(m_client.hasWebView());
     
     m_shouldCallCheckLoadComplete = false;
 
     // FIXME: Always traversing the entire frame tree is a bit inefficient, but 
     // is currently needed in order to null out the previous history item for all frames.
-    if (Page* page = m_frame->page()) {
+    if (Page* page = m_frame.page()) {
         Vector<RefPtr<Frame>, 10> frames;
         for (RefPtr<Frame> frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext())
             frames.append(frame);
@@ -2367,24 +2365,24 @@ void FrameLoader::checkLoadComplete()
 int FrameLoader::numPendingOrLoadingRequests(bool recurse) const
 {
     if (!recurse)
-        return m_frame->document()->cachedResourceLoader()->requestCount();
+        return m_frame.document()->cachedResourceLoader()->requestCount();
 
     int count = 0;
-    for (Frame* frame = m_frame; frame; frame = frame->tree()->traverseNext(m_frame))
+    for (Frame* frame = &m_frame; frame; frame = frame->tree()->traverseNext(&m_frame))
         count += frame->document()->cachedResourceLoader()->requestCount();
     return count;
 }
 
 String FrameLoader::userAgent(const KURL& url) const
 {
-    String userAgent = m_client->userAgent(url);
-    InspectorInstrumentation::applyUserAgentOverride(m_frame, &userAgent);
+    String userAgent = m_client.userAgent(url);
+    InspectorInstrumentation::applyUserAgentOverride(&m_frame, &userAgent);
     return userAgent;
 }
 
 void FrameLoader::handledOnloadEvents()
 {
-    m_client->dispatchDidHandleOnloadEvents();
+    m_client.dispatchDidHandleOnloadEvents();
 
     if (documentLoader())
         documentLoader()->handledOnloadEvents();
@@ -2393,13 +2391,13 @@ void FrameLoader::handledOnloadEvents()
 void FrameLoader::frameDetached()
 {
     stopAllLoaders();
-    m_frame->document()->stopActiveDOMObjects();
+    m_frame.document()->stopActiveDOMObjects();
     detachFromParent();
 }
 
 void FrameLoader::detachFromParent()
 {
-    RefPtr<Frame> protect(m_frame);
+    RefPtr<Frame> protect(&m_frame);
 
     closeURL();
     history()->saveScrollPositionAndViewStateToItem(history()->currentItem());
@@ -2409,27 +2407,27 @@ void FrameLoader::detachFromParent()
     // handlers might start a new subresource load in this frame.
     stopAllLoaders();
 
-    InspectorInstrumentation::frameDetachedFromParent(m_frame);
+    InspectorInstrumentation::frameDetachedFromParent(&m_frame);
 
     detachViewsAndDocumentLoader();
 
     m_progressTracker.clear();
 
-    if (Frame* parent = m_frame->tree()->parent()) {
-        parent->loader().closeAndRemoveChild(m_frame);
+    if (Frame* parent = m_frame.tree()->parent()) {
+        parent->loader().closeAndRemoveChild(&m_frame);
         parent->loader().scheduleCheckCompleted();
     } else {
-        m_frame->setView(0);
-        m_frame->willDetachPage();
-        m_frame->detachFromPage();
+        m_frame.setView(0);
+        m_frame.willDetachPage();
+        m_frame.detachFromPage();
     }
 }
 
 void FrameLoader::detachViewsAndDocumentLoader()
 {
-    m_client->detachedFromParent2();
+    m_client.detachedFromParent2();
     setDocumentLoader(0);
-    m_client->detachedFromParent3();
+    m_client.detachedFromParent3();
 }
     
 void FrameLoader::addExtraFieldsToSubresourceRequest(ResourceRequest& request)
@@ -2451,7 +2449,7 @@ void FrameLoader::addExtraFieldsToRequest(ResourceRequest& request, FrameLoadTyp
     if (request.firstPartyForCookies().isEmpty()) {
         if (mainResource && isLoadingMainFrame())
             request.setFirstPartyForCookies(request.url());
-        else if (Document* document = m_frame->document())
+        else if (Document* document = m_frame.document())
             request.setFirstPartyForCookies(document->firstPartyForCookies());
     }
 
@@ -2503,7 +2501,7 @@ void FrameLoader::addExtraFieldsToRequest(ResourceRequest& request, FrameLoadTyp
     // Only set fallback array if it's still empty (later attempts may be incorrect, see bug 117818).
     if (request.responseContentDispositionEncodingFallbackArray().isEmpty()) {
         // Always try UTF-8. If that fails, try frame encoding (if any) and then the default.
-        request.setResponseContentDispositionEncodingFallbackArray("UTF-8", m_frame->document()->encoding(), m_frame->settings().defaultTextEncodingName());
+        request.setResponseContentDispositionEncodingFallbackArray("UTF-8", m_frame.document()->encoding(), m_frame.settings().defaultTextEncodingName());
     }
 }
 
@@ -2579,8 +2577,8 @@ void FrameLoader::loadPostRequest(const ResourceRequest& inRequest, const String
 
 unsigned long FrameLoader::loadResourceSynchronously(const ResourceRequest& request, StoredCredentials storedCredentials, ClientCredentialPolicy clientCredentialPolicy, ResourceError& error, ResourceResponse& response, Vector<char>& data)
 {
-    ASSERT(m_frame->document());
-    String referrer = SecurityPolicy::generateReferrerHeader(m_frame->document()->referrerPolicy(), request.url(), outgoingReferrer());
+    ASSERT(m_frame.document());
+    String referrer = SecurityPolicy::generateReferrerHeader(m_frame.document()->referrerPolicy(), request.url(), outgoingReferrer());
     
     ResourceRequest initialRequest = request;
     initialRequest.setTimeoutInterval(10);
@@ -2589,7 +2587,7 @@ unsigned long FrameLoader::loadResourceSynchronously(const ResourceRequest& requ
         initialRequest.setHTTPReferrer(referrer);
     addHTTPOriginIfNeeded(initialRequest, outgoingOrigin());
 
-    if (Page* page = m_frame->page())
+    if (Page* page = m_frame.page())
         initialRequest.setFirstPartyForCookies(page->mainFrame()->loader().documentLoader()->request().url());
     
     addExtraFieldsToSubresourceRequest(initialRequest);
@@ -2618,13 +2616,13 @@ const ResourceRequest& FrameLoader::originalRequest() const
 void FrameLoader::receivedMainResourceError(const ResourceError& error)
 {
     // Retain because the stop may release the last reference to it.
-    RefPtr<Frame> protect(m_frame);
+    RefPtr<Frame> protect(&m_frame);
 
     RefPtr<DocumentLoader> loader = activeDocumentLoader();
     // FIXME: Don't want to do this if an entirely new load is going, so should check
     // that both data sources on the frame are either this or nil.
     stop();
-    if (m_client->shouldFallBack(error))
+    if (m_client.shouldFallBack(error))
         handleFallbackContent();
 
     if (m_state == FrameStateProvisional && m_provisionalDocumentLoader) {
@@ -2646,7 +2644,7 @@ void FrameLoader::receivedMainResourceError(const ResourceError& error)
     }
 
     checkCompleted();
-    if (m_frame->page())
+    if (m_frame.page())
         checkLoadComplete();
 }
 
@@ -2686,20 +2684,20 @@ bool FrameLoader::shouldPerformFragmentNavigation(bool isFormSubmission, const S
         && loadType != FrameLoadTypeReload
         && loadType != FrameLoadTypeReloadFromOrigin
         && loadType != FrameLoadTypeSame
-        && !shouldReload(m_frame->document()->url(), url)
+        && !shouldReload(m_frame.document()->url(), url)
         // We don't want to just scroll if a link from within a
         // frameset is trying to reload the frameset into _top.
-        && !m_frame->document()->isFrameSet();
+        && !m_frame.document()->isFrameSet();
 }
 
 void FrameLoader::scrollToFragmentWithParentBoundary(const KURL& url)
 {
-    FrameView* view = m_frame->view();
+    FrameView* view = m_frame.view();
     if (!view)
         return;
 
     // Leaking scroll position to a cross-origin ancestor would permit the so-called "framesniffing" attack.
-    RefPtr<Frame> boundaryFrame(url.hasFragmentIdentifier() ? m_frame->document()->findUnsafeParentScrollPropagationBoundary() : 0);
+    RefPtr<Frame> boundaryFrame(url.hasFragmentIdentifier() ? m_frame.document()->findUnsafeParentScrollPropagationBoundary() : 0);
 
     if (boundaryFrame)
         boundaryFrame->view()->setSafeToPropagateScrollToParent(false);
@@ -2719,7 +2717,7 @@ void FrameLoader::callContinueLoadAfterNavigationPolicy(void* argument,
 
 bool FrameLoader::shouldClose()
 {
-    Page* page = m_frame->page();
+    Page* page = m_frame.page();
     if (!page)
         return true;
     if (!page->chrome().canRunBeforeUnloadConfirmPanel())
@@ -2727,8 +2725,8 @@ bool FrameLoader::shouldClose()
 
     // Store all references to each subframe in advance since beforeunload's event handler may modify frame
     Vector<RefPtr<Frame> > targetFrames;
-    targetFrames.append(m_frame);
-    for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->traverseNext(m_frame))
+    targetFrames.append(&m_frame);
+    for (Frame* child = m_frame.tree()->firstChild(); child; child = child->tree()->traverseNext(&m_frame))
         targetFrames.append(child);
 
     bool shouldClose = false;
@@ -2737,7 +2735,7 @@ bool FrameLoader::shouldClose()
         size_t i;
 
         for (i = 0; i < targetFrames.size(); i++) {
-            if (!targetFrames[i]->tree()->isDescendantOf(m_frame))
+            if (!targetFrames[i]->tree()->isDescendantOf(&m_frame))
                 continue;
             if (!targetFrames[i]->loader().handleBeforeUnloadEvent(page->chrome(), this))
                 break;
@@ -2756,11 +2754,11 @@ bool FrameLoader::shouldClose()
 
 bool FrameLoader::handleBeforeUnloadEvent(Chrome& chrome, FrameLoader* frameLoaderBeingNavigated)
 {
-    DOMWindow* domWindow = m_frame->document()->domWindow();
+    DOMWindow* domWindow = m_frame.document()->domWindow();
     if (!domWindow)
         return true;
 
-    RefPtr<Document> document = m_frame->document();
+    RefPtr<Document> document = m_frame.document();
     if (!document->body())
         return true;
     
@@ -2768,7 +2766,7 @@ bool FrameLoader::handleBeforeUnloadEvent(Chrome& chrome, FrameLoader* frameLoad
     m_pageDismissalEventBeingDispatched = BeforeUnloadDismissal;
 
     // We store the frame's page in a local variable because the frame might get detached inside dispatchEvent.
-    Page* page = m_frame->page();
+    Page* page = m_frame.page();
     page->incrementFrameHandlingBeforeUnloadEventCount();
     domWindow->dispatchEvent(beforeUnloadEvent.get(), domWindow->document());
     page->decrementFrameHandlingBeforeUnloadEventCount();
@@ -2790,12 +2788,12 @@ bool FrameLoader::handleBeforeUnloadEvent(Chrome& chrome, FrameLoader* frameLoad
     // We should only display the beforeunload dialog for an iframe if its SecurityOrigin matches all
     // ancestor frame SecurityOrigins up through the navigating FrameLoader.
     if (frameLoaderBeingNavigated != this) {
-        Frame* parentFrame = m_frame->tree()->parent();
+        Frame* parentFrame = m_frame.tree()->parent();
         while (parentFrame) {
             Document* parentDocument = parentFrame->document();
             if (!parentDocument)
                 return true;
-            if (!m_frame->document() || !m_frame->document()->securityOrigin()->canAccess(parentDocument->securityOrigin())) {
+            if (!m_frame.document() || !m_frame.document()->securityOrigin()->canAccess(parentDocument->securityOrigin())) {
                 document->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Blocked attempt to show beforeunload confirmation dialog on behalf of a frame with different security origin. Protocols, domains, and ports must match.");
                 return true;
             }
@@ -2814,7 +2812,7 @@ bool FrameLoader::handleBeforeUnloadEvent(Chrome& chrome, FrameLoader* frameLoad
     frameLoaderBeingNavigated->m_currentNavigationHasShownBeforeUnloadConfirmPanel = true;
 
     String text = document->displayStringModifiedByEncoding(beforeUnloadEvent->result());
-    return chrome.runBeforeUnloadConfirmPanel(text, m_frame);
+    return chrome.runBeforeUnloadConfirmPanel(text, &m_frame);
 }
 
 void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest&, PassRefPtr<FormState> formState, bool shouldContinue)
@@ -2844,11 +2842,11 @@ void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest&, Pass
         // problem that we have optimistically moved the b/f cursor already, so move it back.  For sanity, 
         // we only do this when punting a navigation for the target frame or top-level frame.  
         if ((isTargetItem || isLoadingMainFrame()) && isBackForwardLoadType(policyChecker()->loadType())) {
-            if (Page* page = m_frame->page()) {
+            if (Page* page = m_frame.page()) {
                 Frame* mainFrame = page->mainFrame();
                 if (HistoryItem* resetItem = mainFrame->loader().history()->currentItem()) {
                     page->backForward()->setCurrentItem(resetItem);
-                    m_frame->loader().client()->updateGlobalHistoryItemForPage();
+                    m_frame.loader().client().updateGlobalHistoryItemForPage();
                 }
             }
         }
@@ -2861,13 +2859,13 @@ void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest&, Pass
     
     // <rdar://problem/6250856> - In certain circumstances on pages with multiple frames, stopAllLoaders()
     // might detach the current FrameLoader, in which case we should bail on this newly defunct load. 
-    if (!m_frame->page())
+    if (!m_frame.page())
         return;
 
 #if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
-    if (Page* page = m_frame->page()) {
-        if (page->mainFrame() == m_frame)
-            m_frame->page()->inspectorController()->resume();
+    if (Page* page = m_frame.page()) {
+        if (page->mainFrame() == &m_frame)
+            page->inspectorController()->resume();
     }
 #endif
 
@@ -2883,7 +2881,7 @@ void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest&, Pass
     }
 
     if (formState)
-        m_client->dispatchWillSubmitForm(&PolicyChecker::continueLoadAfterWillSubmitForm, formState);
+        m_client.dispatchWillSubmitForm(&PolicyChecker::continueLoadAfterWillSubmitForm, formState);
     else
         continueLoadAfterWillSubmitForm();
 }
@@ -2901,8 +2899,8 @@ void FrameLoader::continueLoadAfterNewWindowPolicy(const ResourceRequest& reques
     if (!shouldContinue)
         return;
 
-    RefPtr<Frame> frame = m_frame;
-    RefPtr<Frame> mainFrame = m_client->dispatchCreatePage(action);
+    RefPtr<Frame> frame = &m_frame;
+    RefPtr<Frame> mainFrame = m_client.dispatchCreatePage(action);
     if (!mainFrame)
         return;
 
@@ -2910,7 +2908,7 @@ void FrameLoader::continueLoadAfterNewWindowPolicy(const ResourceRequest& reques
         mainFrame->tree()->setName(frameName);
 
     mainFrame->page()->setOpenedByDOM();
-    mainFrame->loader().m_client->dispatchShow();
+    mainFrame->loader().m_client.dispatchShow();
     if (!m_suppressOpenerInNewFrame) {
         mainFrame->loader().setOpener(frame.get());
         mainFrame->document()->setReferrerPolicy(frame->document()->referrerPolicy());
@@ -2923,7 +2921,7 @@ void FrameLoader::requestFromDelegate(ResourceRequest& request, unsigned long& i
     ASSERT(!request.isNull());
 
     identifier = 0;
-    if (Page* page = m_frame->page()) {
+    if (Page* page = m_frame.page()) {
         identifier = page->progress().createUniqueIdentifier();
         notifier()->assignIdentifierToInitialRequest(identifier, m_documentLoader.get(), request);
     }
@@ -2943,7 +2941,7 @@ void FrameLoader::loadedResourceFromMemoryCache(CachedResource* resource, Resour
 {
     newRequest = ResourceRequest(resource->url());
 
-    Page* page = m_frame->page();
+    Page* page = m_frame.page();
     if (!page)
         return;
 
@@ -2961,7 +2959,7 @@ void FrameLoader::loadedResourceFromMemoryCache(CachedResource* resource, Resour
         return;
     }
 
-    if (m_client->dispatchDidLoadResourceFromMemoryCache(m_documentLoader.get(), newRequest, resource->response(), resource->encodedSize())) {
+    if (m_client.dispatchDidLoadResourceFromMemoryCache(m_documentLoader.get(), newRequest, resource->response(), resource->encodedSize())) {
         InspectorInstrumentation::didLoadResourceFromMemoryCache(page, m_documentLoader.get(), resource);
         m_documentLoader->didTellClientAboutLoad(resource->url());
         return;
@@ -2983,23 +2981,23 @@ void FrameLoader::applyUserAgent(ResourceRequest& request)
 
 bool FrameLoader::shouldInterruptLoadForXFrameOptions(const String& content, const KURL& url, unsigned long requestIdentifier)
 {
-    FeatureObserver::observe(m_frame->document(), FeatureObserver::XFrameOptions);
+    FeatureObserver::observe(m_frame.document(), FeatureObserver::XFrameOptions);
 
-    Frame* topFrame = m_frame->tree()->top();
-    if (m_frame == topFrame)
+    Frame* topFrame = m_frame.tree()->top();
+    if (&m_frame == topFrame)
         return false;
 
     XFrameOptionsDisposition disposition = parseXFrameOptionsHeader(content);
 
     switch (disposition) {
     case XFrameOptionsSameOrigin: {
-        FeatureObserver::observe(m_frame->document(), FeatureObserver::XFrameOptionsSameOrigin);
+        FeatureObserver::observe(m_frame.document(), FeatureObserver::XFrameOptionsSameOrigin);
         RefPtr<SecurityOrigin> origin = SecurityOrigin::create(url);
         if (!origin->isSameSchemeHostPort(topFrame->document()->securityOrigin()))
             return true;
-        for (Frame* frame = m_frame->tree()->parent(); frame; frame = frame->tree()->parent()) {
+        for (Frame* frame = m_frame.tree()->parent(); frame; frame = frame->tree()->parent()) {
             if (!origin->isSameSchemeHostPort(frame->document()->securityOrigin())) {
-                FeatureObserver::observe(m_frame->document(), FeatureObserver::XFrameOptionsSameOriginWithBadAncestorChain);
+                FeatureObserver::observe(m_frame.document(), FeatureObserver::XFrameOptionsSameOriginWithBadAncestorChain);
                 break;
             }
         }
@@ -3010,10 +3008,10 @@ bool FrameLoader::shouldInterruptLoadForXFrameOptions(const String& content, con
     case XFrameOptionsAllowAll:
         return false;
     case XFrameOptionsConflict:
-        m_frame->document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Multiple 'X-Frame-Options' headers with conflicting values ('" + content + "') encountered when loading '" + url.stringCenterEllipsizedToLength() + "'. Falling back to 'DENY'.", requestIdentifier);
+        m_frame.document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Multiple 'X-Frame-Options' headers with conflicting values ('" + content + "') encountered when loading '" + url.stringCenterEllipsizedToLength() + "'. Falling back to 'DENY'.", requestIdentifier);
         return true;
     case XFrameOptionsInvalid:
-        m_frame->document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Invalid 'X-Frame-Options' header encountered when loading '" + url.stringCenterEllipsizedToLength() + "': '" + content + "' is not a recognized directive. The header will be ignored.", requestIdentifier);
+        m_frame.document()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, "Invalid 'X-Frame-Options' header encountered when loading '" + url.stringCenterEllipsizedToLength() + "': '" + content + "' is not a recognized directive. The header will be ignored.", requestIdentifier);
         return false;
     default:
         ASSERT_NOT_REACHED();
@@ -3050,7 +3048,7 @@ bool FrameLoader::shouldTreatURLAsSrcdocDocument(const KURL& url) const
 {
     if (!equalIgnoringCase(url.string(), "about:srcdoc"))
         return false;
-    HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement();
+    HTMLFrameOwnerElement* ownerElement = m_frame.ownerElement();
     if (!ownerElement)
         return false;
     if (!ownerElement->hasTagName(iframeTag))
@@ -3060,19 +3058,19 @@ bool FrameLoader::shouldTreatURLAsSrcdocDocument(const KURL& url) const
 
 void FrameLoader::checkDidPerformFirstNavigation()
 {
-    Page* page = m_frame->page();
+    Page* page = m_frame.page();
     if (!page)
         return;
 
     if (!m_didPerformFirstNavigation && page->backForward()->currentItem() && !page->backForward()->backItem() && !page->backForward()->forwardItem()) {
         m_didPerformFirstNavigation = true;
-        m_client->didPerformFirstNavigation();
+        m_client.didPerformFirstNavigation();
     }
 }
 
 Frame* FrameLoader::findFrameForNavigation(const AtomicString& name, Document* activeDocument)
 {
-    Frame* frame = m_frame->tree()->find(name);
+    Frame* frame = m_frame.tree()->find(name);
 
     // From http://www.whatwg.org/specs/web-apps/current-work/#seamlessLinks:
     //
@@ -3083,19 +3081,19 @@ Frame* FrameLoader::findFrameForNavigation(const AtomicString& name, Document* a
     // nearest ancestor browsing context that does not have its seamless
     // browsing context flag set, and continue these steps as if that
     // browsing context was the one that was going to be navigated instead.
-    if (frame == m_frame && name != "_self" && m_frame->document()->shouldDisplaySeamlesslyWithParent()) {
-        for (Frame* ancestor = m_frame; ancestor; ancestor = ancestor->tree()->parent()) {
+    if (frame == &m_frame && name != "_self" && m_frame.document()->shouldDisplaySeamlesslyWithParent()) {
+        for (Frame* ancestor = &m_frame; ancestor; ancestor = ancestor->tree()->parent()) {
             if (!ancestor->document()->shouldDisplaySeamlesslyWithParent()) {
                 frame = ancestor;
                 break;
             }
         }
-        ASSERT(frame != m_frame);
+        ASSERT(frame != &m_frame);
     }
 
     // FIXME: Eventually all callers should supply the actual activeDocument so we can call canNavigate with the right document.
     if (!activeDocument)
-        activeDocument = m_frame->document();
+        activeDocument = m_frame.document();
 
     if (!activeDocument->canNavigate(frame))
         return 0;
@@ -3110,7 +3108,7 @@ void FrameLoader::loadSameDocumentItem(HistoryItem* item)
     // Save user view state to the current history item here since we don't do a normal load.
     // FIXME: Does form state need to be saved here too?
     history()->saveScrollPositionAndViewStateToItem(history()->currentItem());
-    if (FrameView* view = m_frame->view())
+    if (FrameView* view = m_frame.view())
         view->setWasScrolledByUser(false);
 
     history()->setCurrentItem(item);
@@ -3150,7 +3148,7 @@ void FrameLoader::loadDifferentDocumentItem(HistoryItem* item, FrameLoadType loa
     // If this was a repost that failed the page cache, we might try to repost the form.
     NavigationAction action;
     if (formData) {
-        formData->generateFiles(m_frame->document());
+        formData->generateFiles(m_frame.document());
 
         request.setHTTPMethod("POST");
         request.setHTTPBody(formData);
@@ -3240,7 +3238,7 @@ void FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad()
 
 ResourceError FrameLoader::cancelledError(const ResourceRequest& request) const
 {
-    ResourceError error = m_client->cancelledError(request);
+    ResourceError error = m_client.cancelledError(request);
     error.setIsCancellation(true);
     return error;
 }
@@ -3252,13 +3250,13 @@ String FrameLoader::referrer() const
 
 void FrameLoader::dispatchDocumentElementAvailable()
 {
-    m_frame->injectUserScripts(InjectAtDocumentStart);
-    m_client->documentElementAvailable();
+    m_frame.injectUserScripts(InjectAtDocumentStart);
+    m_client.documentElementAvailable();
 }
 
 void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
 {
-    if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript))
+    if (!m_frame.script().canExecuteScripts(NotAboutToExecuteScript))
         return;
 
     Vector<RefPtr<DOMWrapperWorld> > worlds;
@@ -3269,17 +3267,17 @@ void FrameLoader::dispatchDidClearWindowObjectsInAllWorlds()
 
 void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* world)
 {
-    if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript) || !m_frame->script().existingWindowShell(world))
+    if (!m_frame.script().canExecuteScripts(NotAboutToExecuteScript) || !m_frame.script().existingWindowShell(world))
         return;
 
-    m_client->dispatchDidClearWindowObjectInWorld(world);
+    m_client.dispatchDidClearWindowObjectInWorld(world);
 
 #if ENABLE(INSPECTOR)
-    if (Page* page = m_frame->page())
-        page->inspectorController()->didClearWindowObjectInWorld(m_frame, world);
+    if (Page* page = m_frame.page())
+        page->inspectorController()->didClearWindowObjectInWorld(&m_frame, world);
 #endif
 
-    InspectorInstrumentation::didClearWindowObjectInWorld(m_frame, world);
+    InspectorInstrumentation::didClearWindowObjectInWorld(&m_frame, world);
 }
 
 void FrameLoader::dispatchGlobalObjectAvailableInAllWorlds()
@@ -3287,36 +3285,36 @@ void FrameLoader::dispatchGlobalObjectAvailableInAllWorlds()
     Vector<RefPtr<DOMWrapperWorld> > worlds;
     ScriptController::getAllWorlds(worlds);
     for (size_t i = 0; i < worlds.size(); ++i)
-        m_client->dispatchGlobalObjectAvailable(worlds[i].get());
+        m_client.dispatchGlobalObjectAvailable(worlds[i].get());
 }
 
 SandboxFlags FrameLoader::effectiveSandboxFlags() const
 {
     SandboxFlags flags = m_forcedSandboxFlags;
-    if (Frame* parentFrame = m_frame->tree()->parent())
+    if (Frame* parentFrame = m_frame.tree()->parent())
         flags |= parentFrame->document()->sandboxFlags();
-    if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement())
+    if (HTMLFrameOwnerElement* ownerElement = m_frame.ownerElement())
         flags |= ownerElement->sandboxFlags();
     return flags;
 }
 
 void FrameLoader::didChangeTitle(DocumentLoader* loader)
 {
-    m_client->didChangeTitle(loader);
+    m_client.didChangeTitle(loader);
 
     if (loader == m_documentLoader) {
         // Must update the entries in the back-forward list too.
         history()->setCurrentItemTitle(loader->title());
         // This must go through the WebFrame because it has the right notion of the current b/f item.
-        m_client->setTitle(loader->title(), loader->urlForHistory());
-        m_client->setMainFrameDocumentReady(true); // update observers with new DOMDocument
-        m_client->dispatchDidReceiveTitle(loader->title());
+        m_client.setTitle(loader->title(), loader->urlForHistory());
+        m_client.setMainFrameDocumentReady(true); // update observers with new DOMDocument
+        m_client.dispatchDidReceiveTitle(loader->title());
     }
 }
 
 void FrameLoader::didChangeIcons(IconType type)
 {
-    m_client->dispatchDidChangeIcons(type);
+    m_client.dispatchDidChangeIcons(type);
 }
 
 void FrameLoader::dispatchDidCommitLoad()
@@ -3324,24 +3322,24 @@ void FrameLoader::dispatchDidCommitLoad()
     if (m_stateMachine.creatingInitialEmptyDocument())
         return;
 
-    m_client->dispatchDidCommitLoad();
+    m_client.dispatchDidCommitLoad();
 
     if (isLoadingMainFrame()) {
-        m_frame->page()->resetSeenPlugins();
-        m_frame->page()->resetSeenMediaEngines();
+        m_frame.page()->resetSeenPlugins();
+        m_frame.page()->resetSeenMediaEngines();
     }
 
-    InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get());
+    InspectorInstrumentation::didCommitLoad(&m_frame, m_documentLoader.get());
 
-    if (m_frame->page()->mainFrame() == m_frame)
-        m_frame->page()->featureObserver()->didCommitLoad();
+    if (m_frame.page()->mainFrame() == &m_frame)
+        m_frame.page()->featureObserver()->didCommitLoad();
 
 }
 
 void FrameLoader::tellClientAboutPastMemoryCacheLoads()
 {
-    ASSERT(m_frame->page());
-    ASSERT(m_frame->page()->areMemoryCacheClientCallsEnabled());
+    ASSERT(m_frame.page());
+    ASSERT(m_frame.page()->areMemoryCacheClientCallsEnabled());
 
     if (!m_documentLoader)
         return;
@@ -3361,7 +3359,7 @@ void FrameLoader::tellClientAboutPastMemoryCacheLoads()
             continue;
 
         ResourceRequest request(resource->url());
-        m_client->dispatchDidLoadResourceFromMemoryCache(m_documentLoader.get(), request, resource->response(), resource->encodedSize());
+        m_client.dispatchDidLoadResourceFromMemoryCache(m_documentLoader.get(), request, resource->response(), resource->encodedSize());
     }
 }
 
@@ -3372,14 +3370,14 @@ NetworkingContext* FrameLoader::networkingContext() const
 
 void FrameLoader::loadProgressingStatusChanged()
 {
-    FrameView* view = m_frame->page()->mainFrame()->view();
+    FrameView* view = m_frame.page()->mainFrame()->view();
     view->updateLayerFlushThrottlingInAllFrames();
     view->adjustTiledBackingCoverage();
 }
 
 void FrameLoader::forcePageTransitionIfNeeded()
 {
-    m_client->forcePageTransitionIfNeeded();
+    m_client.forcePageTransitionIfNeeded();
 }
 
 bool FrameLoaderClient::hasHTMLView() const
index 2f53913..64db199 100644 (file)
@@ -84,12 +84,12 @@ bool isBackForwardLoadType(FrameLoadType);
 class FrameLoader {
     WTF_MAKE_NONCOPYABLE(FrameLoader);
 public:
-    FrameLoader(Frame*, FrameLoaderClient*);
+    FrameLoader(Frame&, FrameLoaderClient&);
     ~FrameLoader();
 
     void init();
 
-    Frame* frame() const { return m_frame; }
+    Frame& frame() const { return m_frame; }
 
     PolicyChecker* policyChecker() const { return m_policyChecker.get(); }
     HistoryController* history() const { return m_history.get(); }
@@ -195,7 +195,7 @@ public:
     
     static void addHTTPOriginIfNeeded(ResourceRequest&, const String& origin);
 
-    FrameLoaderClient* client() const { return m_client; }
+    FrameLoaderClient& client() const { return m_client; }
 
     void setDefersLoading(bool);
 
@@ -379,8 +379,8 @@ private:
 
     void dispatchGlobalObjectAvailableInAllWorlds();
 
-    Frame* m_frame;
-    FrameLoaderClient* m_client;
+    Frame& m_frame;
+    FrameLoaderClient& m_client;
 
     // FIXME: These should be OwnPtr<T> to reduce build times and simplify
     // header dependencies unless performance testing proves otherwise.
index db4a9ce..c26588c 100644 (file)
@@ -85,7 +85,7 @@ void HistoryController::saveScrollPositionAndViewStateToItem(HistoryItem* item)
         item->setPageScaleFactor(page->pageScaleFactor());
 
     // FIXME: It would be great to work out a way to put this code in WebCore instead of calling through to the client.
-    m_frame->loader().client()->saveViewStateToItem(item);
+    m_frame->loader().client().saveViewStateToItem(item);
 }
 
 void HistoryController::clearScrollPositionAndViewState()
@@ -125,7 +125,7 @@ void HistoryController::restoreScrollPositionAndViewState()
     
     // FIXME: It would be great to work out a way to put this code in WebCore instead of calling
     // through to the client. It's currently used only for the PDF view on Mac.
-    m_frame->loader().client()->restoreViewState();
+    m_frame->loader().client().restoreViewState();
 
     // FIXME: There is some scrolling related work that needs to happen whenever a page goes into the
     // page cache and similar work that needs to occur when it comes out. This is where we do the work
@@ -250,7 +250,7 @@ bool HistoryController::shouldStopLoadingForHistoryItem(HistoryItem* targetItem)
     if (m_currentItem->shouldDoSameDocumentNavigationTo(targetItem))
         return false;
 
-    return m_frame->loader().client()->shouldStopLoadingForHistoryItem(targetItem);
+    return m_frame->loader().client().shouldStopLoadingForHistoryItem(targetItem);
 }
 
 // Main funnel for navigating to a previous location (back/forward, non-search snap-back)
@@ -266,7 +266,7 @@ void HistoryController::goToItem(HistoryItem* targetItem, FrameLoadType type)
     Page* page = m_frame->page();
     if (!page)
         return;
-    if (!m_frame->loader().client()->shouldGoToHistoryItem(targetItem))
+    if (!m_frame->loader().client().shouldGoToHistoryItem(targetItem))
         return;
     if (m_defersLoading) {
         m_deferredItem = targetItem;
@@ -279,7 +279,7 @@ void HistoryController::goToItem(HistoryItem* targetItem, FrameLoadType type)
     // as opposed to happening for some/one of the page commits that might happen soon
     RefPtr<HistoryItem> currentItem = page->backForward()->currentItem();
     page->backForward()->setCurrentItem(targetItem);
-    m_frame->loader().client()->updateGlobalHistoryItemForPage();
+    m_frame->loader().client().updateGlobalHistoryItemForPage();
 
     // First set the provisional item of any frames that are not actually navigating.
     // This must be done before trying to navigate the desired frame, because some
@@ -354,13 +354,13 @@ void HistoryController::updateForStandardLoad(HistoryUpdateType updateType)
             if (updateType != UpdateAllExceptBackForwardList)
                 updateBackForwardListClippedAtTarget(true);
             if (!needPrivacy) {
-                frameLoader.client()->updateGlobalHistory();
+                frameLoader.client().updateGlobalHistory();
                 frameLoader.documentLoader()->setDidCreateGlobalHistoryEntry(true);
                 if (frameLoader.documentLoader()->unreachableURL().isEmpty())
-                    frameLoader.client()->updateGlobalHistoryRedirectLinks();
+                    frameLoader.client().updateGlobalHistoryRedirectLinks();
             }
 
-            m_frame->loader().client()->updateGlobalHistoryItemForPage();
+            m_frame->loader().client().updateGlobalHistoryItemForPage();
         }
     } else {
         // The client redirect replaces the current history item.
@@ -372,7 +372,7 @@ void HistoryController::updateForStandardLoad(HistoryUpdateType updateType)
             addVisitedLink(page, historyURL);
 
         if (!frameLoader.documentLoader()->didCreateGlobalHistoryEntry() && frameLoader.documentLoader()->unreachableURL().isEmpty() && !m_frame->document()->url().isEmpty())
-            frameLoader.client()->updateGlobalHistoryRedirectLinks();
+            frameLoader.client().updateGlobalHistoryRedirectLinks();
     }
 }
 
@@ -391,13 +391,13 @@ void HistoryController::updateForRedirectWithLockedBackForwardList()
             if (!historyURL.isEmpty()) {
                 updateBackForwardListClippedAtTarget(true);
                 if (!needPrivacy) {
-                    m_frame->loader().client()->updateGlobalHistory();
+                    m_frame->loader().client().updateGlobalHistory();
                     m_frame->loader().documentLoader()->setDidCreateGlobalHistoryEntry(true);
                     if (m_frame->loader().documentLoader()->unreachableURL().isEmpty())
-                        m_frame->loader().client()->updateGlobalHistoryRedirectLinks();
+                        m_frame->loader().client().updateGlobalHistoryRedirectLinks();
                 }
 
-                m_frame->loader().client()->updateGlobalHistoryItemForPage();
+                m_frame->loader().client().updateGlobalHistoryItemForPage();
             }
         }
         // The client redirect replaces the current history item.
@@ -413,7 +413,7 @@ void HistoryController::updateForRedirectWithLockedBackForwardList()
             addVisitedLink(page, historyURL);
 
         if (!m_frame->loader().documentLoader()->didCreateGlobalHistoryEntry() && m_frame->loader().documentLoader()->unreachableURL().isEmpty() && !m_frame->document()->url().isEmpty())
-            m_frame->loader().client()->updateGlobalHistoryRedirectLinks();
+            m_frame->loader().client().updateGlobalHistoryRedirectLinks();
     }
 }
 
@@ -535,7 +535,7 @@ void HistoryController::updateForSameDocumentNavigation()
 
     if (m_currentItem) {
         m_currentItem->setURL(m_frame->document()->url());
-        m_frame->loader().client()->updateGlobalHistory();
+        m_frame->loader().client().updateGlobalHistory();
     }
 }
 
@@ -855,7 +855,7 @@ void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject,
         return;
 
     addVisitedLink(page, KURL(ParsedURLString, urlString));
-    m_frame->loader().client()->updateGlobalHistory();
+    m_frame->loader().client().updateGlobalHistory();
 
 }
 
@@ -876,7 +876,7 @@ void HistoryController::replaceState(PassRefPtr<SerializedScriptValue> stateObje
 
     ASSERT(m_frame->page());
     addVisitedLink(m_frame->page(), KURL(ParsedURLString, urlString));
-    m_frame->loader().client()->updateGlobalHistory();
+    m_frame->loader().client().updateGlobalHistory();
 }
 
 } // namespace WebCore
index 50cfbc3..ce0a8dc 100644 (file)
@@ -48,7 +48,7 @@ MixedContentChecker::MixedContentChecker(Frame* frame)
 {
 }
 
-FrameLoaderClient* MixedContentChecker::client() const
+FrameLoaderClient& MixedContentChecker::client() const
 {
     return m_frame->loader().client();
 }
@@ -68,11 +68,11 @@ bool MixedContentChecker::canDisplayInsecureContent(SecurityOrigin* securityOrig
     if (!isMixedContent(securityOrigin, url))
         return true;
 
-    bool allowed = client()->allowDisplayingInsecureContent(m_frame->settings().allowDisplayOfInsecureContent(), securityOrigin, url);
+    bool allowed = client().allowDisplayingInsecureContent(m_frame->settings().allowDisplayOfInsecureContent(), securityOrigin, url);
     logWarning(allowed, "displayed", url);
 
     if (allowed)
-        client()->didDisplayInsecureContent();
+        client().didDisplayInsecureContent();
 
     return allowed;
 }
@@ -82,11 +82,11 @@ bool MixedContentChecker::canRunInsecureContent(SecurityOrigin* securityOrigin,
     if (!isMixedContent(securityOrigin, url))
         return true;
 
-    bool allowed = client()->allowRunningInsecureContent(m_frame->settings().allowRunningOfInsecureContent(), securityOrigin, url);
+    bool allowed = client().allowRunningInsecureContent(m_frame->settings().allowRunningOfInsecureContent(), securityOrigin, url);
     logWarning(allowed, "ran", url);
 
     if (allowed)
-        client()->didRunInsecureContent(securityOrigin, url);
+        client().didRunInsecureContent(securityOrigin, url);
 
     return allowed;
 }
index b05a0cb..d0d7b1e 100644 (file)
@@ -52,7 +52,7 @@ public:
 
 private:
     // FIXME: This should probably have a separate client from FrameLoader.
-    FrameLoaderClient* client() const;
+    FrameLoaderClient& client() const;
 
     void logWarning(bool allowed, const String& action, const KURL&) const;
 
index cc43ebb..9525bae 100644 (file)
@@ -90,7 +90,7 @@ void NetscapePlugInStreamLoader::didReceiveResponse(const ResourceResponse& resp
 
     // Status code can be null when serving from a Web archive.
     if (response.httpStatusCode() && (response.httpStatusCode() < 100 || response.httpStatusCode() >= 400))
-        cancel(frameLoader()->client()->fileDoesNotExistError(response));
+        cancel(frameLoader()->client().fileDoesNotExistError(response));
 }
 
 void NetscapePlugInStreamLoader::didReceiveData(const char* data, int length, long long encodedDataLength, DataPayloadType dataPayloadType)
index 855b726..310ecaf 100644 (file)
@@ -135,7 +135,7 @@ PingLoader::PingLoader(Frame* frame, ResourceRequest& request)
     // Document in the Frame, but the activeDocumentLoader will be associated
     // with the provisional DocumentLoader if there is a provisional
     // DocumentLoader.
-    m_shouldUseCredentialStorage = frame->loader().client()->shouldUseCredentialStorage(frame->loader().activeDocumentLoader(), identifier);
+    m_shouldUseCredentialStorage = frame->loader().client().shouldUseCredentialStorage(frame->loader().activeDocumentLoader(), identifier);
     m_handle = ResourceHandle::create(frame->loader().networkingContext(), request, this, false, false);
 
     InspectorInstrumentation::continueAfterPingLoader(frame, identifier, frame->loader().activeDocumentLoader(), request, ResourceResponse());
index de01036..b48291f 100644 (file)
@@ -95,7 +95,7 @@ void PolicyChecker::checkNavigationPolicy(const ResourceRequest& request, Docume
     m_callback.set(request, formState.get(), function, argument);
 
     m_delegateIsDecidingNavigationPolicy = true;
-    m_frame->loader().client()->dispatchDecidePolicyForNavigationAction(&PolicyChecker::continueAfterNavigationPolicy,
+    m_frame->loader().client().dispatchDecidePolicyForNavigationAction(&PolicyChecker::continueAfterNavigationPolicy,
         action, request, formState);
     m_delegateIsDecidingNavigationPolicy = false;
 }
@@ -110,26 +110,26 @@ void PolicyChecker::checkNewWindowPolicy(const NavigationAction& action, NewWind
         return continueAfterNavigationPolicy(PolicyIgnore);
 
     m_callback.set(request, formState, frameName, action, function, argument);
-    m_frame->loader().client()->dispatchDecidePolicyForNewWindowAction(&PolicyChecker::continueAfterNewWindowPolicy,
+    m_frame->loader().client().dispatchDecidePolicyForNewWindowAction(&PolicyChecker::continueAfterNewWindowPolicy,
         action, request, formState, frameName);
 }
 
 void PolicyChecker::checkContentPolicy(const ResourceResponse& response, ContentPolicyDecisionFunction function, void* argument)
 {
     m_callback.set(function, argument);
-    m_frame->loader().client()->dispatchDecidePolicyForResponse(&PolicyChecker::continueAfterContentPolicy,
+    m_frame->loader().client().dispatchDecidePolicyForResponse(&PolicyChecker::continueAfterContentPolicy,
         response, m_frame->loader().activeDocumentLoader()->request());
 }
 
 void PolicyChecker::cancelCheck()
 {
-    m_frame->loader().client()->cancelPolicyCheck();
+    m_frame->loader().client().cancelPolicyCheck();
     m_callback.clear();
 }
 
 void PolicyChecker::stopCheck()
 {
-    m_frame->loader().client()->cancelPolicyCheck();
+    m_frame->loader().client().cancelPolicyCheck();
     PolicyCallback callback = m_callback;
     m_callback.clear();
     callback.cancel();
@@ -137,7 +137,7 @@ void PolicyChecker::stopCheck()
 
 void PolicyChecker::cannotShowMIMEType(const ResourceResponse& response)
 {
-    handleUnimplementablePolicy(m_frame->loader().client()->cannotShowMIMETypeError(response));
+    handleUnimplementablePolicy(m_frame->loader().client().cannotShowMIMETypeError(response));
 }
 
 void PolicyChecker::continueLoadAfterWillSubmitForm(PolicyAction)
@@ -161,15 +161,15 @@ void PolicyChecker::continueAfterNavigationPolicy(PolicyAction policy)
         case PolicyDownload: {
             ResourceRequest request = callback.request();
             m_frame->loader().setOriginalURLForDownloadRequest(request);
-            m_frame->loader().client()->startDownload(request);
+            m_frame->loader().client().startDownload(request);
             callback.clearRequest();
             break;
         }
         case PolicyUse: {
             ResourceRequest request(callback.request());
 
-            if (!m_frame->loader().client()->canHandleRequest(request)) {
-                handleUnimplementablePolicy(m_frame->loader().client()->cannotShowURLError(callback.request()));
+            if (!m_frame->loader().client().canHandleRequest(request)) {
+                handleUnimplementablePolicy(m_frame->loader().client().cannotShowURLError(callback.request()));
                 callback.clearRequest();
                 shouldContinue = false;
             }
@@ -190,7 +190,7 @@ void PolicyChecker::continueAfterNewWindowPolicy(PolicyAction policy)
             callback.clearRequest();
             break;
         case PolicyDownload:
-            m_frame->loader().client()->startDownload(callback.request());
+            m_frame->loader().client().startDownload(callback.request());
             callback.clearRequest();
             break;
         case PolicyUse:
@@ -210,7 +210,7 @@ void PolicyChecker::continueAfterContentPolicy(PolicyAction policy)
 void PolicyChecker::handleUnimplementablePolicy(const ResourceError& error)
 {
     m_delegateIsHandlingUnimplementablePolicy = true;
-    m_frame->loader().client()->dispatchUnableToImplementPolicy(error);
+    m_frame->loader().client().dispatchUnableToImplementPolicy(error);
     m_delegateIsHandlingUnimplementablePolicy = false;
 }
 
index 2c8423b..178d52e 100644 (file)
@@ -123,7 +123,7 @@ void ProgressTracker::progressStarted(Frame* frame)
 {
     LOG(Progress, "Progress started (%p) - frame %p(\"%s\"), value %f, tracked frames %d, originating frame %p", this, frame, frame->tree()->uniqueName().string().utf8().data(), m_progressValue, m_numProgressTrackedFrames, m_originatingProgressFrame.get());
 
-    frame->loader().client()->willChangeEstimatedProgress();
+    frame->loader().client().willChangeEstimatedProgress();
     
     if (m_numProgressTrackedFrames == 0 || m_originatingProgressFrame == frame) {
         reset();
@@ -133,11 +133,11 @@ void ProgressTracker::progressStarted(Frame* frame)
         m_progressHeartbeatTimer.startRepeating(progressHeartbeatInterval);
         m_originatingProgressFrame->loader().loadProgressingStatusChanged();
 
-        m_originatingProgressFrame->loader().client()->postProgressStartedNotification();
+        m_originatingProgressFrame->loader().client().postProgressStartedNotification();
     }
     m_numProgressTrackedFrames++;
 
-    frame->loader().client()->didChangeEstimatedProgress();
+    frame->loader().client().didChangeEstimatedProgress();
     InspectorInstrumentation::frameStartedLoading(frame);
 }
 
@@ -148,13 +148,13 @@ void ProgressTracker::progressCompleted(Frame* frame)
     if (m_numProgressTrackedFrames <= 0)
         return;
     
-    frame->loader().client()->willChangeEstimatedProgress();
+    frame->loader().client().willChangeEstimatedProgress();
         
     m_numProgressTrackedFrames--;
     if (!m_numProgressTrackedFrames || m_originatingProgressFrame == frame)
         finalProgressComplete();
     
-    frame->loader().client()->didChangeEstimatedProgress();
+    frame->loader().client().didChangeEstimatedProgress();
 }
 
 void ProgressTracker::finalProgressComplete()
@@ -167,13 +167,13 @@ void ProgressTracker::finalProgressComplete()
     // with final progress value.
     if (!m_finalProgressChangedSent) {
         m_progressValue = 1;
-        frame->loader().client()->postProgressEstimateChangedNotification();
+        frame->loader().client().postProgressEstimateChangedNotification();
     }
 
     reset();
 
-    frame->loader().client()->setMainFrameDocumentReady(true);
-    frame->loader().client()->postProgressFinishedNotification();
+    frame->loader().client().setMainFrameDocumentReady(true);
+    frame->loader().client().postProgressFinishedNotification();
     frame->loader().loadProgressingStatusChanged();
 
     InspectorInstrumentation::frameStoppedLoading(frame.get());
@@ -209,7 +209,7 @@ void ProgressTracker::incrementProgress(unsigned long identifier, const char*, i
 
     RefPtr<Frame> frame = m_originatingProgressFrame;
     
-    frame->loader().client()->willChangeEstimatedProgress();
+    frame->loader().client().willChangeEstimatedProgress();
     
     unsigned bytesReceived = length;
     double increment, percentOfRemainingBytes;
@@ -231,7 +231,7 @@ void ProgressTracker::incrementProgress(unsigned long identifier, const char*, i
     
     // For documents that use WebCore's layout system, treat first layout as the half-way point.
     // FIXME: The hasHTMLView function is a sort of roundabout way of asking "do you use WebCore's layout system".
-    bool useClampedMaxProgress = frame->loader().client()->hasHTMLView()
+    bool useClampedMaxProgress = frame->loader().client().hasHTMLView()
         && !frame->loader().stateMachine()->firstLayoutDone();
     double maxProgressValue = useClampedMaxProgress ? 0.5 : finalProgressValue;
     increment = (maxProgressValue - m_progressValue) * percentOfRemainingBytes;
@@ -253,14 +253,14 @@ void ProgressTracker::incrementProgress(unsigned long identifier, const char*, i
             if (m_progressValue == 1)
                 m_finalProgressChangedSent = true;
             
-            frame->loader().client()->postProgressEstimateChangedNotification();
+            frame->loader().client().postProgressEstimateChangedNotification();
 
             m_lastNotifiedProgressValue = m_progressValue;
             m_lastNotifiedProgressTime = now;
         }
     }
     
-    frame->loader().client()->didChangeEstimatedProgress();
+    frame->loader().client().didChangeEstimatedProgress();
 }
 
 void ProgressTracker::completeProgress(unsigned long identifier)
index f482557..2cc1085 100644 (file)
@@ -49,12 +49,12 @@ ResourceLoadNotifier::ResourceLoadNotifier(Frame* frame)
 
 void ResourceLoadNotifier::didReceiveAuthenticationChallenge(ResourceLoader* loader, const AuthenticationChallenge& currentWebChallenge)
 {
-    m_frame->loader().client()->dispatchDidReceiveAuthenticationChallenge(loader->documentLoader(), loader->identifier(), currentWebChallenge);
+    m_frame->loader().client().dispatchDidReceiveAuthenticationChallenge(loader->documentLoader(), loader->identifier(), currentWebChallenge);
 }
 
 void ResourceLoadNotifier::didCancelAuthenticationChallenge(ResourceLoader* loader, const AuthenticationChallenge& currentWebChallenge)
 {
-    m_frame->loader().client()->dispatchDidCancelAuthenticationChallenge(loader->documentLoader(), loader->identifier(), currentWebChallenge);
+    m_frame->loader().client().dispatchDidCancelAuthenticationChallenge(loader->documentLoader(), loader->identifier(), currentWebChallenge);
 }
 
 void ResourceLoadNotifier::willSendRequest(ResourceLoader* loader, ResourceRequest& clientRequest, const ResourceResponse& redirectResponse)
@@ -95,14 +95,14 @@ void ResourceLoadNotifier::didFailToLoad(ResourceLoader* loader, const ResourceE
         page->progress().completeProgress(loader->identifier());
 
     if (!error.isNull())
-        m_frame->loader().client()->dispatchDidFailLoading(loader->documentLoader(), loader->identifier(), error);
+        m_frame->loader().client().dispatchDidFailLoading(loader->documentLoader(), loader->identifier(), error);
 
     InspectorInstrumentation::didFailLoading(m_frame, loader->documentLoader(), loader->identifier(), error);
 }
 
 void ResourceLoadNotifier::assignIdentifierToInitialRequest(unsigned long identifier, DocumentLoader* loader, const ResourceRequest& request)
 {
-    m_frame->loader().client()->assignIdentifierToInitialRequest(identifier, loader, request);
+    m_frame->loader().client().assignIdentifierToInitialRequest(identifier, loader, request);
 }
 
 void ResourceLoadNotifier::dispatchWillSendRequest(DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse)
@@ -110,7 +110,7 @@ void ResourceLoadNotifier::dispatchWillSendRequest(DocumentLoader* loader, unsig
     String oldRequestURL = request.url().string();
     m_frame->loader().documentLoader()->didTellClientAboutLoad(request.url());
 
-    m_frame->loader().client()->dispatchWillSendRequest(loader, identifier, request, redirectResponse);
+    m_frame->loader().client().dispatchWillSendRequest(loader, identifier, request, redirectResponse);
 
     // If the URL changed, then we want to put that new URL in the "did tell client" set too.
     if (!request.isNull() && oldRequestURL != request.url().string())
@@ -130,27 +130,27 @@ void ResourceLoadNotifier::dispatchWillSendRequest(DocumentLoader* loader, unsig
 void ResourceLoadNotifier::dispatchDidReceiveResponse(DocumentLoader* loader, unsigned long identifier, const ResourceResponse& r, ResourceLoader* resourceLoader)
 {
     InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceResponse(m_frame, identifier, r);
-    m_frame->loader().client()->dispatchDidReceiveResponse(loader, identifier, r);
+    m_frame->loader().client().dispatchDidReceiveResponse(loader, identifier, r);
     InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loader, r, resourceLoader);
 }
 
 void ResourceLoadNotifier::dispatchDidReceiveData(DocumentLoader* loader, unsigned long identifier, const char* data, int dataLength, int encodedDataLength)
 {
-    m_frame->loader().client()->dispatchDidReceiveContentLength(loader, identifier, dataLength);
+    m_frame->loader().client().dispatchDidReceiveContentLength(loader, identifier, dataLength);
 
     InspectorInstrumentation::didReceiveData(m_frame, identifier, data, dataLength, encodedDataLength);
 }
 
 void ResourceLoadNotifier::dispatchDidFinishLoading(DocumentLoader* loader, unsigned long identifier, double finishTime)
 {
-    m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier);
+    m_frame->loader().client().dispatchDidFinishLoading(loader, identifier);
 
     InspectorInstrumentation::didFinishLoading(m_frame, loader, identifier, finishTime);
 }
 
 void ResourceLoadNotifier::dispatchDidFailLoading(DocumentLoader* loader, unsigned long identifier, const ResourceError& error)
 {
-    m_frame->loader().client()->dispatchDidFailLoading(loader, identifier, error);
+    m_frame->loader().client().dispatchDidFailLoading(loader, identifier, error);
 
     InspectorInstrumentation::didFailLoading(m_frame, loader, identifier, error);
 }
index 6c29571..1ed6bf7 100644 (file)
@@ -147,7 +147,7 @@ void ResourceLoadScheduler::scheduleLoad(ResourceLoader* resourceLoader, Resourc
 
 void ResourceLoadScheduler::notifyDidScheduleResourceRequest(ResourceLoader* loader)
 {
-    InspectorInstrumentation::didScheduleResourceRequest(loader->frameLoader() ? loader->frameLoader()->frame()->document() : 0, loader->url());
+    InspectorInstrumentation::didScheduleResourceRequest(loader->frameLoader() ? loader->frameLoader()->frame().document() : 0, loader->url());
 }
 
 void ResourceLoadScheduler::remove(ResourceLoader* resourceLoader)
@@ -212,7 +212,7 @@ void ResourceLoadScheduler::servePendingRequests(HostInformation* host, Resource
             // For named hosts - which are only http(s) hosts - we should always enforce the connection limit.
             // For non-named hosts - everything but http(s) - we should only enforce the limit if the document isn't done parsing 
             // and we don't know all stylesheets yet.
-            Document* document = resourceLoader->frameLoader() ? resourceLoader->frameLoader()->frame()->document() : 0;
+            Document* document = resourceLoader->frameLoader() ? resourceLoader->frameLoader()->frame().document() : 0;
             bool shouldLimitRequests = !host->name().isNull() || (document && (document->parsing() || !document->haveStylesheetsLoaded()));
             if (shouldLimitRequests && host->limitRequests(ResourceLoadPriority(priority)))
                 return;
index 772b388..7916375 100644 (file)
@@ -252,7 +252,7 @@ void ResourceLoader::willSendRequest(ResourceRequest& request, const ResourceRes
     m_request = request;
 
     if (!redirectResponse.isNull() && !m_documentLoader->isCommitted())
-        frameLoader()->client()->dispatchDidReceiveServerRedirectForProvisionalLoad();
+        frameLoader()->client().dispatchDidReceiveServerRedirectForProvisionalLoad();
 }
 
 void ResourceLoader::didSendData(unsigned long long, unsigned long long)
@@ -375,7 +375,7 @@ void ResourceLoader::cleanupForError(const ResourceError& error)
 void ResourceLoader::didChangePriority(ResourceLoadPriority loadPriority)
 {
     if (handle()) {
-        frameLoader()->client()->dispatchDidChangeResourcePriority(identifier(), loadPriority);
+        frameLoader()->client().dispatchDidChangeResourcePriority(identifier(), loadPriority);
         handle()->didChangePriority(loadPriority);
     }
 }
@@ -442,12 +442,12 @@ ResourceError ResourceLoader::cancelledError()
 
 ResourceError ResourceLoader::blockedError()
 {
-    return frameLoader()->client()->blockedError(m_request);
+    return frameLoader()->client().blockedError(m_request);
 }
 
 ResourceError ResourceLoader::cannotShowURLError()
 {
-    return frameLoader()->client()->cannotShowURLError(m_request);
+    return frameLoader()->client().cannotShowURLError(m_request);
 }
 
 void ResourceLoader::willSendRequest(ResourceHandle*, ResourceRequest& request, const ResourceResponse& redirectResponse)
@@ -511,7 +511,7 @@ bool ResourceLoader::shouldUseCredentialStorage()
         return false;
     
     RefPtr<ResourceLoader> protector(this);
-    return frameLoader()->client()->shouldUseCredentialStorage(documentLoader(), identifier());
+    return frameLoader()->client().shouldUseCredentialStorage(documentLoader(), identifier());
 }
 
 void ResourceLoader::didReceiveAuthenticationChallenge(const AuthenticationChallenge& challenge)
@@ -550,7 +550,7 @@ void ResourceLoader::didCancelAuthenticationChallenge(const AuthenticationChalle
 bool ResourceLoader::canAuthenticateAgainstProtectionSpace(const ProtectionSpace& protectionSpace)
 {
     RefPtr<ResourceLoader> protector(this);
-    return frameLoader()->client()->canAuthenticateAgainstProtectionSpace(documentLoader(), identifier(), protectionSpace);
+    return frameLoader()->client().canAuthenticateAgainstProtectionSpace(documentLoader(), identifier(), protectionSpace);
 }
 #endif
 
index b78aa4f..2a0683c 100644 (file)
@@ -269,7 +269,7 @@ PassRefPtr<Widget> SubframeLoader::loadMediaPlayerProxyPlugin(Node* node, const
     if (!m_frame->loader().mixedContentChecker()->canRunInsecureContent(m_frame->document()->securityOrigin(), completedURL))
         return 0;
 
-    RefPtr<Widget> widget = m_frame->loader().client()->createMediaPlayerProxyPlugin(size, mediaElement, completedURL,
+    RefPtr<Widget> widget = m_frame->loader().client().createMediaPlayerProxyPlugin(size, mediaElement, completedURL,
                                          paramNames, paramValues, "application/x-media-element-proxy-plugin");
 
     if (widget && renderer) {
@@ -313,7 +313,7 @@ PassRefPtr<Widget> SubframeLoader::createJavaAppletWidget(const IntSize& size, H
 
     RefPtr<Widget> widget;
     if (allowPlugins(AboutToInstantiatePlugin))
-        widget = m_frame->loader().client()->createJavaAppletWidget(size, element, baseURL, paramNames, paramValues);
+        widget = m_frame->loader().client().createJavaAppletWidget(size, element, baseURL, paramNames, paramValues);
 
     logPluginRequest(document()->page(), element->serviceType(), String(), widget);
 
@@ -361,7 +361,7 @@ Frame* SubframeLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const K
     }
 
     String referrerToUse = SecurityPolicy::generateReferrerHeader(ownerElement->document()->referrerPolicy(), url, referrer);
-    RefPtr<Frame> frame = m_frame->loader().client()->createFrame(url, name, ownerElement, referrerToUse, allowsScrolling, marginWidth, marginHeight);
+    RefPtr<Frame> frame = m_frame->loader().client().createFrame(url, name, ownerElement, referrerToUse, allowsScrolling, marginWidth, marginHeight);
 
     if (!frame)  {
         m_frame->loader().checkCallImplicitClose();
@@ -400,15 +400,15 @@ Frame* SubframeLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const K
 
 bool SubframeLoader::allowPlugins(ReasonForCallingAllowPlugins reason)
 {
-    bool allowed = m_frame->loader().client()->allowPlugins(m_frame->settings().arePluginsEnabled());
+    bool allowed = m_frame->loader().client().allowPlugins(m_frame->settings().arePluginsEnabled());
     if (!allowed && reason == AboutToInstantiatePlugin)
-        m_frame->loader().client()->didNotAllowPlugins();
+        m_frame->loader().client().didNotAllowPlugins();
     return allowed;
 }
 
 bool SubframeLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bool shouldPreferPlugInsForImages, bool hasFallback, bool& useFallback)
 {
-    if (m_frame->loader().client()->shouldAlwaysUsePluginDocument(mimeType)) {
+    if (m_frame->loader().client().shouldAlwaysUsePluginDocument(mimeType)) {
         useFallback = false;
         return true;
     }
@@ -422,7 +422,7 @@ bool SubframeLoader::shouldUsePlugin(const KURL& url, const String& mimeType, bo
             return true;
     }
         
-    ObjectContentType objectType = m_frame->loader().client()->objectContentType(url, mimeType, shouldPreferPlugInsForImages);
+    ObjectContentType objectType = m_frame->loader().client().objectContentType(url, mimeType, shouldPreferPlugInsForImages);
     // If an object's content can't be handled and it has no fallback, let
     // it be handled as a plugin to show the broken plugin icon.
     useFallback = objectType == ObjectContentNone && hasFallback;
@@ -447,7 +447,7 @@ bool SubframeLoader::loadPlugin(HTMLPlugInImageElement* pluginElement, const KUR
 
     IntSize contentSize = roundedIntSize(LayoutSize(renderer->contentWidth(), renderer->contentHeight()));
     bool loadManually = document()->isPluginDocument() && !m_containsPlugins && toPluginDocument(document())->shouldLoadPluginManually();
-    RefPtr<Widget> widget = m_frame->loader().client()->createPlugin(contentSize,
+    RefPtr<Widget> widget = m_frame->loader().client().createPlugin(contentSize,
         pluginElement, url, paramNames, paramValues, mimeType, loadManually);
 
     if (!widget) {
index 5fd5900..164aec3 100644 (file)
@@ -207,7 +207,7 @@ bool ApplicationCacheHost::maybeLoadSynchronously(ResourceRequest& request, Reso
             response = resource->response();
             data.append(resource->data()->data(), resource->data()->size());
         } else {
-            error = documentLoader()->frameLoader()->client()->cannotShowURLError(request);
+            error = documentLoader()->frameLoader()->client().cannotShowURLError(request);
         }
         return true;
     }
index a6f9adf..948e604 100644 (file)
@@ -295,7 +295,7 @@ void CachedImage::checkShouldPaintBrokenImage()
     if (!m_loader || m_loader->reachedTerminalState())
         return;
 
-    m_shouldPaintBrokenImage = m_loader->frameLoader()->client()->shouldPaintBrokenImage(m_resourceRequest.url());
+    m_shouldPaintBrokenImage = m_loader->frameLoader()->client().shouldPaintBrokenImage(m_resourceRequest.url());
 }
 
 void CachedImage::clear()
@@ -353,7 +353,7 @@ bool CachedImage::canBeDrawn() const
         return true;
 
     size_t estimatedDecodedImageSize = m_image->width() * m_image->height() * 4; // no overflow check
-    return estimatedDecodedImageSize <= m_loader->frameLoader()->frame()->settings().maximumDecodedImageSize();
+    return estimatedDecodedImageSize <= m_loader->frameLoader()->frame().settings().maximumDecodedImageSize();
 }
 
 void CachedImage::addIncrementalDataBuffer(ResourceBuffer* data)
index 3c3712f..c4c5770 100644 (file)
@@ -365,8 +365,8 @@ bool CachedResourceLoader::canRequest(CachedResource::Type type, const KURL& url
             return false;
 
         if (frame()) {
-            if (!frame()->loader().client()->allowScriptFromSource(frame()->settings().isScriptEnabled(), url)) {
-                frame()->loader().client()->didNotAllowScript();
+            if (!frame()->loader().client().allowScriptFromSource(frame()->settings().isScriptEnabled(), url)) {
+                frame()->loader().client().didNotAllowScript();
                 return false;
             }
         }
@@ -448,7 +448,7 @@ CachedResourceHandle<CachedResource> CachedResourceLoader::requestResource(Cache
         return 0;
 
     if (Frame* f = frame())
-        f->loader().client()->dispatchWillRequestResource(&request);
+        f->loader().client().dispatchWillRequestResource(&request);
 
     if (memoryCache()->disabled()) {
         DocumentResourceMap::iterator it = m_documentResources.find(url.string());
@@ -704,7 +704,7 @@ void CachedResourceLoader::setImagesEnabled(bool enable)
 
 bool CachedResourceLoader::clientDefersImage(const KURL& url) const
 {
-    return frame() && !frame()->loader().client()->allowImage(m_imagesEnabled, url);
+    return frame() && !frame()->loader().client().allowImage(m_imagesEnabled, url);
 }
 
 bool CachedResourceLoader::shouldDeferImageLoad(const KURL& url) const
index c745c17..4ba9e05 100644 (file)
@@ -42,7 +42,7 @@ bool ResourceLoader::shouldCacheResponse(ResourceHandle*, CFCachedURLResponseRef
 
     CFURLResponseRef response = CFCachedURLResponseGetWrappedResponse(cachedResponse);
     CFDataRef data = CFCachedURLResponseGetReceiverData(cachedResponse);
-    return frameLoader()->client()->shouldCacheResponse(documentLoader(), identifier(), response, CFDataGetBytePtr(data), CFDataGetLength(data));
+    return frameLoader()->client().shouldCacheResponse(documentLoader(), identifier(), response, CFDataGetBytePtr(data), CFDataGetLength(data));
 }
 
 #endif
index 743a08d..42f80bc 100644 (file)
@@ -173,7 +173,7 @@ void IconController::startLoader()
         // icon is later read in from disk
         LOG(IconDatabase, "IconController %p might load icon %s later", this, urlString.ascii().data());
         m_waitingForLoadDecision = true;    
-        m_frame->loader().client()->registerForIconNotification();
+        m_frame->loader().client().registerForIconNotification();
         commitToDatabase(iconURL);
         return;
     }
@@ -225,11 +225,11 @@ void IconController::continueLoadWithDecision(IconLoadDecision iconLoadDecision)
         // Otherwise if the icon data *is* available, notify the delegate
         if (!iconDatabase().synchronousIconDataKnownForIconURL(urlString)) {
             LOG(IconDatabase, "Told not to load icon %s but icon data is not yet available - registering for notification and requesting load from disk", urlString.ascii().data());
-            m_frame->loader().client()->registerForIconNotification();
+            m_frame->loader().client().registerForIconNotification();
             iconDatabase().synchronousIconForPageURL(m_frame->document()->url().string(), IntSize(0, 0));
             iconDatabase().synchronousIconForPageURL(m_frame->loader().initialRequest().url().string(), IntSize(0, 0));
         } else
-            m_frame->loader().client()->dispatchDidReceiveIcon();
+            m_frame->loader().client().dispatchDidReceiveIcon();
 
         return;
     } 
index 757c3ab..c30e287 100644 (file)
@@ -109,7 +109,7 @@ void IconLoader::notifyFinished(CachedResource* resource)
     // kept in memory (so it does not have to be read from the database asynchronously), since
     // there is a page URL referencing it.
     iconDatabase().setIconDataForIconURL(data ? data->sharedBuffer() : 0, resource->url().string());
-    m_frame->loader().client()->dispatchDidReceiveIcon();
+    m_frame->loader().client().dispatchDidReceiveIcon();
     stopLoading();
 }
 
index 5f60345..84478a8 100644 (file)
@@ -54,7 +54,7 @@ CFCachedURLResponseRef ResourceLoader::willCacheResponse(ResourceHandle*, CFCach
         return 0;
 
     RetainPtr<NSCachedURLResponse> nsCachedResponse = adoptNS([[NSCachedURLResponse alloc] _initWithCFCachedURLResponse:cachedResponse]);
-    return [frameLoader()->client()->willCacheResponse(documentLoader(), identifier(), nsCachedResponse.get()) _CFCachedURLResponse];
+    return [frameLoader()->client().willCacheResponse(documentLoader(), identifier(), nsCachedResponse.get()) _CFCachedURLResponse];
 }
 
 #else
@@ -63,7 +63,7 @@ NSCachedURLResponse* ResourceLoader::willCacheResponse(ResourceHandle*, NSCached
 {
     if (m_options.sendLoadCallbacks == DoNotSendCallbacks)
         return 0;
-    return frameLoader()->client()->willCacheResponse(documentLoader(), identifier(), response);
+    return frameLoader()->client().willCacheResponse(documentLoader(), identifier(), response);
 }
 
 #endif
index 7dc8e13..602665e 100644 (file)
@@ -828,7 +828,7 @@ void ContextMenuController::populate()
         FrameLoader& loader = frame->loader();
         KURL linkURL = m_hitTestResult.absoluteLinkURL();
         if (!linkURL.isEmpty()) {
-            if (loader.client()->canHandleRequest(ResourceRequest(linkURL))) {
+            if (loader.client().canHandleRequest(ResourceRequest(linkURL))) {
                 appendItem(OpenLinkItem, m_contextMenu.get());
                 appendItem(OpenLinkInNewWindowItem, m_contextMenu.get());
                 appendItem(DownloadFileItem, m_contextMenu.get());
@@ -871,7 +871,7 @@ void ContextMenuController::populate()
             appendItem(*separatorItem(), m_contextMenu.get());
             appendItem(CopyMediaLinkItem, m_contextMenu.get());
             appendItem(OpenMediaInNewWindowItem, m_contextMenu.get());
-            if (loader.client()->canHandleRequest(ResourceRequest(mediaURL)))
+            if (loader.client().canHandleRequest(ResourceRequest(mediaURL)))
                 appendItem(DownloadMediaItem, m_contextMenu.get());
         }
 
@@ -999,7 +999,7 @@ void ContextMenuController::populate()
         FrameLoader& loader = frame->loader();
         KURL linkURL = m_hitTestResult.absoluteLinkURL();
         if (!linkURL.isEmpty()) {
-            if (loader.client()->canHandleRequest(ResourceRequest(linkURL))) {
+            if (loader.client().canHandleRequest(ResourceRequest(linkURL))) {
                 appendItem(OpenLinkItem, m_contextMenu.get());
                 appendItem(OpenLinkInNewWindowItem, m_contextMenu.get());
                 appendItem(DownloadFileItem, m_contextMenu.get());
index 81fe0db..8f5aa7c 100644 (file)
@@ -876,7 +876,7 @@ void DOMWindow::postMessageTimerFired(PassOwnPtr<PostMessageTimer> t)
     // Give the embedder a chance to intercept this postMessage because this
     // DOMWindow might be a proxy for another in browsers that support
     // postMessage calls across WebKit instances.
-    if (m_frame->loader().client()->willCheckAndDispatchMessageEvent(timer->targetOrigin(), event.get()))
+    if (m_frame->loader().client().willCheckAndDispatchMessageEvent(timer->targetOrigin(), event.get()))
         return;
 
     dispatchMessageEventWithOriginCheck(timer->targetOrigin(), event, timer->stackTrace());
@@ -1270,7 +1270,7 @@ void DOMWindow::setName(const String& string)
         return;
 
     m_frame->tree()->setName(string);
-    m_frame->loader().client()->didChangeName(string);
+    m_frame->loader().client().didChangeName(string);
 }
 
 void DOMWindow::setStatus(const String& string) 
index c0d15eb..c25be8c 100644 (file)
@@ -50,7 +50,7 @@ void DOMWindowExtension::disconnectFrameForPageCache()
     RefPtr<DOMWindowExtension> protector = this;
     
     Frame* frame = this->frame();
-    frame->loader().client()->dispatchWillDisconnectDOMWindowExtensionFromGlobalObject(this);
+    frame->loader().client().dispatchWillDisconnectDOMWindowExtensionFromGlobalObject(this);
 
     m_disconnectedFrame = frame;
 
@@ -64,7 +64,7 @@ void DOMWindowExtension::reconnectFrameFromPageCache(Frame* frame)
     DOMWindowProperty::reconnectFrameFromPageCache(frame);
     m_disconnectedFrame = 0;
 
-    this->frame()->loader().client()->dispatchDidReconnectDOMWindowExtensionToGlobalObject(this);
+    this->frame()->loader().client().dispatchDidReconnectDOMWindowExtensionToGlobalObject(this);
 }
 
 void DOMWindowExtension::willDestroyGlobalObjectInCachedFrame()
@@ -75,7 +75,7 @@ void DOMWindowExtension::willDestroyGlobalObjectInCachedFrame()
     // while there is still work to do.
     RefPtr<DOMWindowExtension> protector = this;
     
-    m_disconnectedFrame->loader().client()->dispatchWillDestroyGlobalObjectForDOMWindowExtension(this);
+    m_disconnectedFrame->loader().client().dispatchWillDestroyGlobalObjectForDOMWindowExtension(this);
     m_disconnectedFrame = 0;
 
     DOMWindowProperty::willDestroyGlobalObjectInCachedFrame();
@@ -92,7 +92,7 @@ void DOMWindowExtension::willDestroyGlobalObjectInFrame()
     if (!m_wasDetached) {
         Frame* frame = this->frame();
         ASSERT(frame);
-        frame->loader().client()->dispatchWillDestroyGlobalObjectForDOMWindowExtension(this);
+        frame->loader().client().dispatchWillDestroyGlobalObjectForDOMWindowExtension(this);
     }
 
     DOMWindowProperty::willDestroyGlobalObjectInFrame();
@@ -109,7 +109,7 @@ void DOMWindowExtension::willDetachGlobalObjectFromFrame()
 
     Frame* frame = this->frame();
     ASSERT(frame);
-    frame->loader().client()->dispatchWillDestroyGlobalObjectForDOMWindowExtension(this);
+    frame->loader().client().dispatchWillDestroyGlobalObjectForDOMWindowExtension(this);
 
     m_wasDetached = true;
     DOMWindowProperty::willDetachGlobalObjectFromFrame();
index 711bc56..301574a 100644 (file)
@@ -154,7 +154,7 @@ inline Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoader
     : m_page(page)
     , m_settings(&page->settings())
     , m_treeNode(this, parentFromOwnerElement(ownerElement))
-    , m_loader(this, frameLoaderClient)
+    , m_loader(*this, *frameLoaderClient)
     , m_navigationScheduler(this)
     , m_ownerElement(ownerElement)
     , m_script(adoptPtr(new ScriptController(this)))
index dfc58f2..3744957 100644 (file)
@@ -1434,7 +1434,7 @@ void FrameView::setMediaType(const String& mediaType)
 String FrameView::mediaType() const
 {
     // See if we have an override type.
-    String overrideType = frame().loader().client()->overrideMediaType();
+    String overrideType = frame().loader().client().overrideMediaType();
     InspectorInstrumentation::applyEmulatedMedia(&frame(), &overrideType);
     if (!overrideType.isNull())
         return overrideType;
@@ -1955,7 +1955,7 @@ void FrameView::setFixedVisibleContentRect(const IntRect& visibleContentRect)
         // Update the scroll-bars to calculate new page-step size.
         updateScrollbars(scrollOffset());
     }
-    frame().loader().client()->didChangeScrollOffset();
+    frame().loader().client().didChangeScrollOffset();
 }
 
 void FrameView::setViewportConstrainedObjectsNeedLayout()
@@ -2753,7 +2753,7 @@ void FrameView::performPostLayoutTasks()
     
     // FIXME: We should consider adding DidLayout as a LayoutMilestone. That would let us merge this
     // with didLayout(LayoutMilestones).
-    frame().loader().client()->dispatchDidLayout();
+    frame().loader().client().dispatchDidLayout();
 
     if (RenderView* renderView = this->renderView())
         renderView->updateWidgetPositions();
@@ -3052,7 +3052,7 @@ void FrameView::scrollTo(const IntSize& newOffset)
     ScrollView::scrollTo(newOffset);
     if (offset != scrollOffset())
         scrollPositionChanged();
-    frame().loader().client()->didChangeScrollOffset();
+    frame().loader().client().didChangeScrollOffset();
 }
 
 void FrameView::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect)
@@ -4102,7 +4102,7 @@ bool FrameView::wheelEvent(const PlatformWheelEvent& wheelEvent)
         if (offset != newOffset) {
             ScrollView::scrollTo(newOffset);
             scrollPositionChanged();
-            frame().loader().client()->didChangeScrollOffset();
+            frame().loader().client().didChangeScrollOffset();
         }
         return true;
     }
index 850caf0..71da3d9 100644 (file)
@@ -156,9 +156,9 @@ void History::stateObjectAdded(PassRefPtr<SerializedScriptValue> data, const Str
         m_frame->document()->updateURLForPushOrReplaceState(fullURL);
 
     if (stateObjectType == StateObjectPush)
-        m_frame->loader().client()->dispatchDidPushStateWithinPage();
+        m_frame->loader().client().dispatchDidPushStateWithinPage();
     else if (stateObjectType == StateObjectReplace)
-        m_frame->loader().client()->dispatchDidReplaceStateWithinPage();
+        m_frame->loader().client().dispatchDidReplaceStateWithinPage();
 }
 
 } // namespace WebCore
index b557c88..406d782 100644 (file)
@@ -349,7 +349,7 @@ PassRefPtr<DocumentFragment> Pasteboard::documentFragmentForPasteboardItemAtInde
                 RefPtr<ArchiveResource> mainResource = coreArchive->mainResource();
                 if (mainResource) {
                     NSString *MIMEType = mainResource->mimeType();
-                    if (frame->loader().client()->canShowMIMETypeAsHTML(MIMEType)) {
+                    if (frame->loader().client().canShowMIMETypeAsHTML(MIMEType)) {
                         RetainPtr<NSString> markupString = adoptNS([[NSString alloc] initWithData:[mainResource->data()->createNSData() autorelease] encoding:NSUTF8StringEncoding]);
                         if (DocumentLoader* loader = frame->loader().documentLoader())
                             loader->addAllArchiveResources(coreArchive.get());
index c3e627e..1795166 100644 (file)
@@ -495,7 +495,7 @@ static PassRefPtr<DocumentFragment> fragmentFromWebArchive(Frame* frame, PassRef
     if (!frame || !frame->document())
         return 0;
 
-    if (frame->loader().client()->canShowMIMETypeAsHTML(MIMEType)) {
+    if (frame->loader().client().canShowMIMETypeAsHTML(MIMEType)) {
         RetainPtr<NSString> markupString = adoptNS([[NSString alloc] initWithData:[mainResource->data()->createNSData() autorelease] encoding:NSUTF8StringEncoding]);
         // FIXME: seems poor form to do this as a side effect of getting a document fragment
         if (DocumentLoader* loader = frame->loader().documentLoader())
index 06c31ff..55be2a2 100644 (file)
@@ -284,7 +284,7 @@ void PluginView::mediaCanStart()
 {
     ASSERT(!m_isStarted);
     if (!start())
-        parentFrame()->loader().client()->dispatchDidFailToStartPlugin(this);
+        parentFrame()->loader().client().dispatchDidFailToStartPlugin(this);
 }
 
 PluginView::~PluginView()
index bd0858a..7b5c106 100644 (file)
@@ -2283,7 +2283,7 @@ void RenderLayer::scrollTo(int x, int y)
 
     InspectorInstrumentation::didScrollLayer(frame);
     if (scrollsOverflow())
-        frame->loader().client()->didChangeScrollOffset(); 
+        frame->loader().client().didChangeScrollOffset();
 }
 
 static inline bool frameElementAndViewPermitScroll(HTMLFrameElementBase* frameElementBase, FrameView* frameView) 
index b793272..d906a77 100644 (file)
@@ -115,6 +115,8 @@ void RenderWidget::willBeDestroyed()
 
 void RenderWidget::destroy()
 {
+    RenderObject::destroy();
+#if 0
     willBeDestroyed();
 
     // Grab the arena from node()->document()->renderArena() before clearing the node pointer.
@@ -122,6 +124,7 @@ void RenderWidget::destroy()
     RenderArena* arena = renderArena();
     clearNode();
     deref(arena);
+#endif
 }
 
 RenderWidget::~RenderWidget()
index 8c6d251..4d12faf 100644 (file)
@@ -86,8 +86,8 @@ static inline Evas_Object* kit(Frame* frame)
     if (!frame)
         return 0;
 
-    FrameLoaderClientEfl* client = static_cast<FrameLoaderClientEfl*>(frame->loader().client());
-    return client ? client->webFrame() : 0;
+    FrameLoaderClientEfl& client = static_cast<FrameLoaderClientEfl&>(frame->loader().client());
+    return &client;
 }
 
 namespace WebCore {
index c90ce5c..4414a87 100644 (file)
@@ -137,12 +137,9 @@ Eina_List* DumpRenderTreeSupportEfl::frameChildren(const Evas_Object* ewkFrame)
 
     for (unsigned index = 0; index < frame->tree()->childCount(); index++) {
         WebCore::Frame *childFrame = frame->tree()->child(index);
-        WebCore::FrameLoaderClientEfl *client = static_cast<WebCore::FrameLoaderClientEfl*>(childFrame->loader().client());
+        WebCore::FrameLoaderClientEfl& client = static_cast<WebCore::FrameLoaderClientEfl&>(childFrame->loader().client());
 
-        if (!client)
-            continue;
-
-        childFrames = eina_list_append(childFrames, client->webFrame());
+        childFrames = eina_list_append(childFrames, client.webFrame());
     }
 
     return childFrames;
index adca34c..1139131 100644 (file)
@@ -153,7 +153,7 @@ static inline void _ewk_frame_debug(Evas_Object* ewkFrame)
 
 static WebCore::FrameLoaderClientEfl* _ewk_frame_loader_efl_get(const WebCore::Frame* frame)
 {
-    return static_cast<WebCore::FrameLoaderClientEfl*>(frame->loader().client());
+    return &static_cast<WebCore::FrameLoaderClientEfl&>(frame->loader().client());
 }
 
 static Eina_Bool _ewk_frame_children_iterator_next(Eina_Iterator_Ewk_Frame* iterator, Evas_Object** data)
index ffc1ace..add5d0d 100644 (file)
@@ -1397,10 +1397,8 @@ Evas_Object* ewk_view_frame_focused_get(const Evas_Object* ewkView)
     if (!core)
         return 0;
 
-    WebCore::FrameLoaderClientEfl* client = static_cast<WebCore::FrameLoaderClientEfl*>(core->loader().client());
-    if (!client)
-        return 0;
-    return client->webFrame();
+    WebCore::FrameLoaderClientEfl& client = static_cast<WebCore::FrameLoaderClientEfl&>(core->loader().client());
+    return client.webFrame();
 }
 
 Eina_Bool ewk_view_uri_set(Evas_Object* ewkView, const char* uri)
@@ -2044,8 +2042,8 @@ Eina_Bool ewk_view_setting_user_agent_set(Evas_Object* ewkView, const char* user
     EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, false);
     EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv, false);
     if (eina_stringshare_replace(&priv->settings.userAgent, userAgent)) {
-        WebCore::FrameLoaderClientEfl* client = static_cast<WebCore::FrameLoaderClientEfl*>(priv->mainFrame->loader().client());
-        client->setCustomUserAgent(String::fromUTF8(userAgent));
+        WebCore::FrameLoaderClientEfl& client = static_cast<WebCore::FrameLoaderClientEfl&>(priv->mainFrame->loader().client());
+        client.setCustomUserAgent(String::fromUTF8(userAgent));
     }
     return true;
 }
index c8ddedc..e2b02bf 100644 (file)
@@ -166,7 +166,7 @@ void FrameLoaderClient::committedLoad(WebCore::DocumentLoader* loader, const cha
 
         Frame* coreFrame = loader->frame();
         if (coreFrame && coreFrame->document()->isMediaDocument())
-            loader->cancelMainResourceLoad(coreFrame->loader().client()->pluginWillHandleLoadError(loader->response()));
+            loader->cancelMainResourceLoad(coreFrame->loader().client().pluginWillHandleLoadError(loader->response()));
     }
 
     if (m_pluginView) {
index b6fdc47..07922b0 100644 (file)
@@ -207,7 +207,7 @@ WebKitWebFrame* webkit_web_data_source_get_web_frame(WebKitWebDataSource* webDat
     if (!frameLoader)
         return NULL;
 
-    return static_cast<WebKit::FrameLoaderClient*>(frameLoader->client())->webFrame();
+    return static_cast<WebKit::FrameLoaderClient&>(frameLoader->client()).webFrame();
 }
 
 /**
index 261c636..acd7a69 100644 (file)
@@ -1210,8 +1210,7 @@ WebKitWebFrame* kit(WebCore::Frame* coreFrame)
     if (!coreFrame)
         return 0;
 
-    WebKit::FrameLoaderClient* client = static_cast<WebKit::FrameLoaderClient*>(coreFrame->loader().client());
-    return client ? client->webFrame() : 0;
+    return static_cast<WebKit::FrameLoaderClient&>(coreFrame->loader().client()).webFrame();
 }
 
 }
index db4439f..c49a648 100644 (file)
@@ -4692,7 +4692,7 @@ gboolean webkit_web_view_can_show_mime_type(WebKitWebView* webView, const gchar*
     g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), FALSE);
 
     Frame* frame = core(webkit_web_view_get_main_frame(webView));
-    return frame->loader().client()->canShowMIMEType(String::fromUTF8(mimeType));
+    return frame->loader().client().canShowMIMEType(String::fromUTF8(mimeType));
 }
 
 /**
index ad53eec..4ad77c6 100644 (file)
@@ -86,7 +86,7 @@ RetainPtr<CFDataRef> WebFrameNetworkingContext::sourceApplicationAuditData() con
 
 ResourceError WebFrameNetworkingContext::blockedError(const ResourceRequest& request) const
 {
-    return frame()->loader().client()->blockedError(request);
+    return frame()->loader().client().blockedError(request);
 }
 
 NetworkStorageSession& WebFrameNetworkingContext::storageSession() const
index 8db95ba..45e4e46 100644 (file)
@@ -228,11 +228,11 @@ WebFrame *kit(Frame* frame)
     if (!frame)
         return nil;
 
-    FrameLoaderClient* frameLoaderClient = frame->loader().client();
-    if (frameLoaderClient->isEmptyFrameLoaderClient())
+    FrameLoaderClient& frameLoaderClient = frame->loader().client();
+    if (frameLoaderClient.isEmptyFrameLoaderClient())
         return nil;
 
-    return static_cast<WebFrameLoaderClient*>(frameLoaderClient)->webFrame();
+    return static_cast<WebFrameLoaderClient&>(frameLoaderClient).webFrame();
 }
 
 Page* core(WebView *webView)
index f5534fc..daddbd3 100644 (file)
@@ -188,7 +188,7 @@ static NSMutableArray *newArrayByConcatenatingArrays(NSArray *first, NSArray *se
     // If the document is a stand-alone media document, now is the right time to cancel the WebKit load
     Frame* coreFrame = core(webFrame);
     if (coreFrame->document()->isMediaDocument())
-        coreFrame->loader().documentLoader()->cancelMainResourceLoad(coreFrame->loader().client()->pluginWillHandleLoadError(coreFrame->loader().documentLoader()->response()));
+        coreFrame->loader().documentLoader()->cancelMainResourceLoad(coreFrame->loader().client().pluginWillHandleLoadError(coreFrame->loader().documentLoader()->response()));
 
     if (_private->pluginView) {
         if (!_private->hasSentResponseToPlugin) {
index e7353c1..99dc4b1 100644 (file)
@@ -135,7 +135,7 @@ using namespace WebCore;
     self = [super init];
     
     Frame* frame = core(webFrame);
-    if (!frame->loader().client()->hasHTMLView()) {
+    if (!frame->loader().client().hasHTMLView()) {
         [self release];
         return nil;
     }
index 12636ef..2d88d93 100644 (file)
@@ -47,7 +47,7 @@ static WebRenderNode *copyRenderNode(RenderObject*);
 {
     [self release];
     
-    if (!frame->loader().client()->hasHTMLView())
+    if (!frame->loader().client().hasHTMLView())
         return nil;
     
     RenderObject* renderer = frame->contentRenderer();
index 7756e53..7877be8 100644 (file)
@@ -364,7 +364,7 @@ void QWebFrameAdapter::init(QWebPageAdapter* pageAdapter, QWebFrameData* frameDa
 
 QWebFrameAdapter* QWebFrameAdapter::kit(const Frame* frame)
 {
-    return static_cast<FrameLoaderClientQt*>(frame->loader().client())->webFrame();
+    return static_cast<FrameLoaderClientQt&>(frame->loader().client()).webFrame();
 }
 
 QUrl QWebFrameAdapter::ensureAbsoluteUrl(const QUrl& url)
index 09d9927..f016a5e 100644 (file)
@@ -1091,10 +1091,10 @@ void QWebPageAdapter::triggerAction(QWebPageAdapter::MenuAction action, QWebHitT
         openNewWindow(hitTestResult->imageUrl, frame);
         break;
     case DownloadImageToDisk:
-        frame->loader().client()->startDownload(WebCore::ResourceRequest(hitTestResult->imageUrl, frame->loader().outgoingReferrer()));
+        frame->loader().client().startDownload(WebCore::ResourceRequest(hitTestResult->imageUrl, frame->loader().outgoingReferrer()));
         break;
     case DownloadLinkToDisk:
-        frame->loader().client()->startDownload(WebCore::ResourceRequest(hitTestResult->linkUrl, frame->loader().outgoingReferrer()));
+        frame->loader().client().startDownload(WebCore::ResourceRequest(hitTestResult->linkUrl, frame->loader().outgoingReferrer()));
         break;
     case Back:
         page->goBack();
index 6a959c8..5ee4706 100644 (file)
@@ -95,7 +95,7 @@ void WebFrameNetworkingContext::destroyPrivateBrowsingSession()
 
 ResourceError WebFrameNetworkingContext::blockedError(const ResourceRequest& request) const
 {
-    return frame()->loader().client()->blockedError(request);
+    return frame()->loader().client().blockedError(request);
 }
 
 String WebFrameNetworkingContext::referrer() const
index 08bf838..3ae24c2 100644 (file)
@@ -154,10 +154,9 @@ WebFrame* kit(Frame* frame)
     if (!frame)
         return 0;
 
-    FrameLoaderClient* frameLoaderClient = frame->loader().client();
-    if (frameLoaderClient)
-        return static_cast<WebFrame*>(frameLoaderClient);  // eek, is there a better way than static cast?
-    return 0;
+    // FIXME: Doesn't this need to be aware of EmptyFrameLoaderClient?
+    FrameLoaderClient& frameLoaderClient = frame->loader().client();
+    return static_cast<WebFrame*>(&frameLoaderClient);
 }
 
 Frame* core(WebFrame* webFrame)
index 33280b9..bb134b1 100644 (file)
@@ -46,7 +46,7 @@ PassRefPtr<WebRenderLayer> WebRenderLayer::create(WebPage* page)
     if (!mainFrame)
         return 0;
 
-    if (!mainFrame->loader().client()->hasHTMLView())
+    if (!mainFrame->loader().client().hasHTMLView())
         return 0;
 
     RenderView* contentRenderer = mainFrame->contentRenderer();
index 6cd2a35..6a0da93 100644 (file)
@@ -45,7 +45,7 @@ PassRefPtr<WebRenderObject> WebRenderObject::create(WebPage* page)
     if (!mainFrame)
         return 0;
 
-    if (!mainFrame->loader().client()->hasHTMLView())
+    if (!mainFrame->loader().client().hasHTMLView())
         return 0;
 
     RenderView* contentRenderer = mainFrame->contentRenderer();
index 3eecdac..ae44b8d 100644 (file)
@@ -103,7 +103,7 @@ void WebResourceLoadScheduler::scheduleLoad(ResourceLoader* resourceLoader, Cach
 
     ContentSniffingPolicy contentSniffingPolicy = resourceLoader->shouldSniffContent() ? SniffContent : DoNotSniffContent;
     StoredCredentials allowStoredCredentials = resourceLoader->shouldUseCredentialStorage() ? AllowStoredCredentials : DoNotAllowStoredCredentials;
-    bool privateBrowsingEnabled = resourceLoader->frameLoader()->frame()->settings().privateBrowsingEnabled();
+    bool privateBrowsingEnabled = resourceLoader->frameLoader()->frame().settings().privateBrowsingEnabled();
 
     // FIXME: Some entities in WebCore use WebCore's "EmptyFrameLoaderClient" instead of having a proper WebFrameLoaderClient.
     // EmptyFrameLoaderClient shouldn't exist and everything should be using a WebFrameLoaderClient,
index 0782ac2..e6466ba 100644 (file)
@@ -1307,7 +1307,7 @@ String PluginView::userAgent()
     if (!frame)
         return String();
     
-    return frame->loader().client()->userAgent(KURL());
+    return frame->loader().client().userAgent(KURL());
 }
 
 void PluginView::loadURL(uint64_t requestID, const String& method, const String& urlString, const String& target, 
index e00d3ff..0ba5d80 100644 (file)
@@ -232,9 +232,9 @@ private:
 };
 
 // As long as EmptyFrameLoaderClient exists in WebCore, this can return 0.
-inline WebFrameLoaderClient* toWebFrameLoaderClient(WebCore::FrameLoaderClient* client)
+inline WebFrameLoaderClient* toWebFrameLoaderClient(WebCore::FrameLoaderClient& client)
 {
-    return client->isEmptyFrameLoaderClient() ? 0 : static_cast<WebFrameLoaderClient*>(client);
+    return client.isEmptyFrameLoaderClient() ? 0 : static_cast<WebFrameLoaderClient*>(&client);
 }
 
 } // namespace WebKit
index 10affdc..a2577d8 100644 (file)
@@ -110,7 +110,7 @@ RetainPtr<CFDataRef> WebFrameNetworkingContext::sourceApplicationAuditData() con
 
 ResourceError WebFrameNetworkingContext::blockedError(const ResourceRequest& request) const
 {
-    return frame()->loader().client()->blockedError(request);
+    return frame()->loader().client().blockedError(request);
 }
 
 NetworkStorageSession& WebFrameNetworkingContext::storageSession() const