<https://webkit.org/b/119859> Frame::loader() should return a reference
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Aug 2013 22:17:17 +0000 (22:17 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Aug 2013 22:17:17 +0000 (22:17 +0000)
Reviewed by Andreas Kling.

Source/WebCore:

* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::willOpenSocketStream):
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::canExecuteScripts):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::initScript):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::beginLoadTimerFired):
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setVisualUpdatesAllowed):
(WebCore::Document::updateTitle):
(WebCore::Document::open):
(WebCore::Document::explicitClose):
(WebCore::Document::implicitClose):
(WebCore::Document::userAgent):
(WebCore::Document::canNavigate):
(WebCore::Document::processHttpEquiv):
(WebCore::Document::referrer):
(WebCore::Document::documentDidResumeFromPageCache):
(WebCore::Document::openSearchDescriptionURL):
(WebCore::Document::finishedParsing):
(WebCore::Document::addIconURL):
(WebCore::Document::initSecurityContext):
(WebCore::Document::updateURLForPushOrReplaceState):
(WebCore::Document::loadEventDelayTimerFired):
(WebCore::Document::loader):
(WebCore::Document::decrementActiveParserCount):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::CachedFrameBase):
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
(WebCore::CachedFrame::open):
(WebCore::CachedFrame::destroy):
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::logCanCachePageDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
(WebCore::PageCache::canCache):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::handleClick):
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::updateWidget):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::rendererIsNeeded):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::updateWidget):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::prepareForSubmission):
(WebCore::HTMLFormElement::submit):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::openURL):
* html/HTMLFrameOwnerElement.cpp:
(WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
* html/HTMLFrameSetElement.cpp:
(WebCore::HTMLFrameSetElement::insertedInto):
(WebCore::HTMLFrameSetElement::removedFrom):
* html/HTMLHtmlElement.cpp:
(WebCore::HTMLHtmlElement::insertedByParser):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createRenderer):
(WebCore::HTMLMediaElement::attach):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::getPluginProxyParams):
(WebCore::HTMLMediaElement::createMediaPlayerProxy):
(WebCore::HTMLMediaElement::updateWidget):
(WebCore::HTMLMediaElement::mediaPlayerReferrer):
(WebCore::HTMLMediaElement::mediaPlayerUserAgent):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parametersForPlugin):
(WebCore::HTMLObjectElement::updateWidget):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::isImageType):
(WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::setDisplayMode):
* html/ImageDocument.cpp:
(WebCore::ImageDocumentParser::appendBytes):
(WebCore::ImageDocumentParser::finish):
(WebCore::ImageDocument::createDocumentStructure):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
(WebCore::PluginDocumentParser::appendBytes):
(WebCore::PluginDocument::detach):
(WebCore::PluginDocument::cancelManualPluginLoad):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
(WebCore::WebGLRenderingContext::loseContextImpl):
(WebCore::WebGLRenderingContext::maybeRestoreContext):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded):
(WebCore::HTMLConstructionSite::insertHTMLBodyElement):
* html/parser/HTMLParserOptions.cpp:
(WebCore::HTMLParserOptions::HTMLParserOptions):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init):
* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::generateViolationReport):
(WebCore::XSSAuditorDelegate::didBlockScript):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::openInNewTab):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::loadResourceSynchronously):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::mainResourceContent):
(WebCore::InspectorPageAgent::reload):
(WebCore::InspectorPageAgent::navigate):
(WebCore::allResourcesURLsForFrame):
(WebCore::InspectorPageAgent::searchInResource):
(WebCore::InspectorPageAgent::assertDocumentLoader):
(WebCore::InspectorPageAgent::buildObjectForFrame):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didFailLoading):
* loader/CookieJar.cpp:
(WebCore::networkingContext):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::frameLoader):
(WebCore::DocumentLoader::document):
(WebCore::DocumentLoader::stopLoading):
(WebCore::DocumentLoader::removeSubresourceLoader):
(WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
(WebCore::DocumentLoader::iconLoadDecisionAvailable):
(WebCore::DocumentLoader::continueIconLoadWithDecision):
* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::didReceiveResponse):
(WebCore::DocumentThreadableLoader::didFinishLoading):
(WebCore::DocumentThreadableLoader::didFail):
(WebCore::DocumentThreadableLoader::preflightFailure):
(WebCore::DocumentThreadableLoader::loadRequest):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::replaceDocument):
(WebCore::DocumentWriter::createDocument):
(WebCore::DocumentWriter::begin):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::~FrameLoader):
(WebCore::FrameLoader::allChildrenAreComplete):
(WebCore::FrameLoader::allAncestorsAreComplete):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::outgoingReferrer):
(WebCore::FrameLoader::setOpener):
(WebCore::FrameLoader::completed):
(WebCore::FrameLoader::started):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::closeOldDataSources):
(WebCore::FrameLoader::subframeIsLoading):
(WebCore::FrameLoader::subresourceCachePolicy):
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):
(WebCore::FrameLoader::detachChildren):
(WebCore::FrameLoader::checkLoadComplete):
(WebCore::FrameLoader::detachFromParent):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::loadResourceSynchronously):
(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::handleBeforeUnloadEvent):
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::createWindow):
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
(WebCore::HistoryController::restoreScrollPositionAndViewState):
(WebCore::HistoryController::saveDocumentState):
(WebCore::HistoryController::saveDocumentAndScrollState):
(WebCore::isAssociatedToRequestedHistoryItem):
(WebCore::HistoryController::restoreDocumentState):
(WebCore::HistoryController::shouldStopLoadingForHistoryItem):
(WebCore::HistoryController::goToItem):
(WebCore::HistoryController::updateForBackForwardNavigation):
(WebCore::HistoryController::updateForReload):
(WebCore::HistoryController::updateForStandardLoad):
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
(WebCore::HistoryController::updateForClientRedirect):
(WebCore::HistoryController::updateForCommit):
(WebCore::HistoryController::recursiveUpdateForCommit):
(WebCore::HistoryController::updateForSameDocumentNavigation):
(WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
(WebCore::HistoryController::initializeItem):
(WebCore::HistoryController::createItemTree):
(WebCore::HistoryController::recursiveSetProvisionalItem):
(WebCore::HistoryController::recursiveGoToItem):
(WebCore::HistoryController::updateBackForwardListClippedAtTarget):
(WebCore::HistoryController::updateCurrentItem):
(WebCore::HistoryController::pushState):
(WebCore::HistoryController::replaceState):
* loader/ImageLoader.cpp:
(WebCore::pageIsBeingDismissed):
* loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::client):
* loader/NavigationScheduler.cpp:
(WebCore::ScheduledURLNavigation::fire):
(WebCore::ScheduledURLNavigation::didStartTimer):
(WebCore::ScheduledURLNavigation::didStopTimer):
(WebCore::ScheduledRedirect::shouldStartTimer):
(WebCore::ScheduledRedirect::fire):
(WebCore::ScheduledRefresh::fire):
(WebCore::ScheduledHistoryNavigation::fire):
(WebCore::ScheduledFormSubmission::fire):
(WebCore::ScheduledFormSubmission::didStartTimer):
(WebCore::ScheduledFormSubmission::didStopTimer):
(WebCore::NavigationScheduler::mustLockBackForwardList):
(WebCore::NavigationScheduler::scheduleLocationChange):
(WebCore::NavigationScheduler::scheduleFormSubmission):
(WebCore::NavigationScheduler::scheduleRefresh):
(WebCore::NavigationScheduler::schedule):
* loader/PingLoader.cpp:
(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):
(WebCore::PingLoader::sendViolationReport):
(WebCore::PingLoader::PingLoader):
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):
(WebCore::PolicyChecker::checkContentPolicy):
(WebCore::PolicyChecker::cancelCheck):
(WebCore::PolicyChecker::stopCheck):
(WebCore::PolicyChecker::cannotShowMIMEType):
(WebCore::PolicyChecker::continueLoadAfterWillSubmitForm):
(WebCore::PolicyChecker::continueAfterNavigationPolicy):
(WebCore::PolicyChecker::continueAfterNewWindowPolicy):
(WebCore::PolicyChecker::handleUnimplementablePolicy):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::progressCompleted):
(WebCore::ProgressTracker::finalProgressComplete):
(WebCore::ProgressTracker::incrementProgress):
(WebCore::ProgressTracker::progressHeartbeatTimerFired):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
(WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
(WebCore::ResourceLoadNotifier::willSendRequest):
(WebCore::ResourceLoadNotifier::didFailToLoad):
(WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
(WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
(WebCore::ResourceLoadNotifier::dispatchDidReceiveData):
(WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
(WebCore::ResourceLoadNotifier::dispatchDidFailLoading):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::ResourceLoader):
(WebCore::ResourceLoader::start):
(WebCore::ResourceLoader::frameLoader):
(WebCore::ResourceLoader::willSendRequest):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::pluginIsLoadable):
(WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
(WebCore::SubframeLoader::createJavaAppletWidget):
(WebCore::SubframeLoader::loadOrRedirectSubframe):
(WebCore::SubframeLoader::loadSubframe):
(WebCore::SubframeLoader::allowPlugins):
(WebCore::SubframeLoader::shouldUsePlugin):
(WebCore::SubframeLoader::loadPlugin):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
(WebCore::ApplicationCacheGroup::update):
(WebCore::ApplicationCacheGroup::createResourceHandle):
(WebCore::ApplicationCacheGroup::didReceiveResponse):
(WebCore::ApplicationCacheGroup::didFinishLoading):
(WebCore::ApplicationCacheGroup::didFail):
(WebCore::ApplicationCacheGroup::addEntry):
(WebCore::CallCacheListenerTask::performTask):
(WebCore::ApplicationCacheGroup::postListenerTask):
* loader/appcache/DOMApplicationCache.cpp:
(WebCore::DOMApplicationCache::applicationCacheHost):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
(WebCore::LegacyWebArchive::createFromSelection):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::addAdditionalRequestHeaders):
(WebCore::CachedResource::load):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::checkInsecureContent):
(WebCore::CachedResourceLoader::canRequest):
(WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::clientDefersImage):
(WebCore::CachedResourceLoader::cachePolicy):
(WebCore::CachedResourceLoader::loadDone):
* loader/icon/IconController.cpp:
(WebCore::IconController::commitToDatabase):
(WebCore::IconController::startLoader):
(WebCore::IconController::continueLoadWithDecision):
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading):
(WebCore::IconLoader::notifyFinished):
* page/Chrome.cpp:
(WebCore::canRunModalIfDuringPageDismissal):
* page/ContextMenuController.cpp:
(WebCore::openNewWindow):
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
(WebCore::DOMWindow::postMessageTimerFired):
(WebCore::DOMWindow::close):
(WebCore::DOMWindow::print):
(WebCore::DOMWindow::stop):
(WebCore::DOMWindow::setName):
(WebCore::DOMWindow::opener):
(WebCore::DOMWindow::dispatchLoadEvent):
(WebCore::DOMWindow::setLocation):
(WebCore::DOMWindow::createWindow):
(WebCore::DOMWindow::open):
* page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::disconnectFrameForPageCache):
(WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
(WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
(WebCore::DOMWindowExtension::willDestroyGlobalObjectInFrame):
(WebCore::DOMWindowExtension::willDetachGlobalObjectFromFrame):
* page/DragController.cpp:
(WebCore::DragController::performDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::keyEvent):
* page/Frame.cpp:
(WebCore::Frame::~Frame):
(WebCore::Frame::setView):
(WebCore::Frame::injectUserScripts):
(WebCore::Frame::willDetachPage):
* page/Frame.h:
(WebCore::Frame::loader):
* page/FrameView.cpp:
(WebCore::FrameView::mediaType):
(WebCore::FrameView::setFixedVisibleContentRect):
(WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::autoSizeIfEnabled):
(WebCore::FrameView::scrollTo):
(WebCore::FrameView::shouldSuspendScrollAnimations):
(WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
(WebCore::FrameView::wheelEvent):
(WebCore::FrameView::firePaintRelatedMilestones):
* page/History.cpp:
(WebCore::History::stateInternal):
(WebCore::History::stateObjectAdded):
* page/Location.cpp:
(WebCore::Location::setLocation):
* page/Navigator.cpp:
(WebCore::Navigator::userAgent):
* page/Page.cpp:
(WebCore::Page::goToItem):
(WebCore::Page::refreshPlugins):
(WebCore::Page::setDefersLoading):
(WebCore::Page::setMemoryCacheClientCallsEnabled):
(WebCore::Page::addRelevantRepaintedObject):
* page/Performance.cpp:
(WebCore::Performance::now):
* page/PerformanceNavigation.cpp:
(WebCore::PerformanceNavigation::type):
(WebCore::PerformanceNavigation::redirectCount):
* page/PerformanceResourceTiming.cpp:
(WebCore::monotonicTimeToDocumentMilliseconds):
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):
* platform/ios/PasteboardIOS.mm:
(WebCore::documentFragmentWithImageResource):
(WebCore::documentFragmentWithRTF):
(WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
* platform/mac/HTMLConverter.mm:
(-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
(-[WebHTMLConverter _loadFromDOMRange]):
* platform/mac/PasteboardMac.mm:
(WebCore::documentFragmentWithImageResource):
(WebCore::documentFragmentWithRTF):
(WebCore::fragmentFromWebArchive):
* plugins/DOMMimeType.cpp:
(WebCore::DOMMimeType::enabledPlugin):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
* svg/SVGAElement.cpp:
(WebCore::SVGAElement::defaultEventHandler):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::~SVGImage):
(WebCore::SVGImage::dataChanged):
* testing/Internals.cpp:
(WebCore::Internals::formControlStateOfPreviousHistoryItem):
(WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
(WebCore::Internals::getReferencedFilePaths):
(WebCore::Internals::forceReload):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::docLoaderFunc):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::openFunc):
(WebCore::XMLDocumentParser::startElementNs):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::load):
(BlackBerry::WebKit::WebPagePrivate::loadString):
(BlackBerry::WebKit::WebPagePrivate::stopCurrentLoad):
(BlackBerry::WebKit::closeURLRecursively):
(BlackBerry::WebKit::WebPage::dispatchBeforeUnloadEvent):
(BlackBerry::WebKit::WebPagePrivate::shouldSendResizeEvent):
(BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
(BlackBerry::WebKit::WebPage::reload):
(BlackBerry::WebKit::WebPage::reloadFromCache):
(BlackBerry::WebKit::WebPage::textEncoding):
(BlackBerry::WebKit::WebPage::forcedTextEncoding):
(BlackBerry::WebKit::WebPage::setForcedTextEncoding):
(BlackBerry::WebKit::WebPage::title):
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::createWindow):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDidChangeLocationWithinPage):
(WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForResponse):
(WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
(WebCore::FrameLoaderClientBlackBerry::delayPolicyCheckUntilFragmentExists):
(WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
(WebCore::FrameLoaderClientBlackBerry::createPlugin):
(WebCore::FrameLoaderClientBlackBerry::receivedData):
(WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):
(WebCore::FrameLoaderClientBlackBerry::dispatchDidCommitLoad):
(WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
(WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
(WebCore::FrameLoaderClientBlackBerry::createFrame):
(WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout):
(WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
(WebCore::FrameLoaderClientBlackBerry::restoreViewState):
(WebCore::FrameLoaderClientBlackBerry::startDownload):
(WebCore::FrameLoaderClientBlackBerry::canCachePage):
(WebCore::FrameLoaderClientBlackBerry::didRestoreFromPageCache):
* WebKitSupport/PagePopup.cpp:
(BlackBerry::WebKit::PagePopup::initialize):

Source/WebKit/efl:

* WebCoreSupport/ChromeClientEfl.cpp:
(kit):
* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::callShouldCloseOnWebView):
(DumpRenderTreeSupportEfl::clearOpener):
(DumpRenderTreeSupportEfl::frameChildren):
(DumpRenderTreeSupportEfl::responseMimeType):
(DumpRenderTreeSupportEfl::provisionalURL):
* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::callPolicyFunction):
(WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNewWindowAction):
(WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction):
(WebCore::FrameLoaderClientEfl::updateGlobalHistoryRedirectLinks):
(WebCore::FrameLoaderClientEfl::updateGlobalHistory):
* ewk/ewk_frame.cpp:
(_ewk_frame_loader_efl_get):
(_ewk_frame_smart_del):
(_ewk_frame_contents_set_internal):
(ewk_frame_stop):
(ewk_frame_reload):
(ewk_frame_reload_full):
(ewk_frame_child_add):
* ewk/ewk_view.cpp:
(ewk_view_frame_focused_get):
(ewk_view_setting_user_agent_set):
(ewk_view_setting_encoding_custom_get):
(ewk_view_setting_encoding_custom_set):

Source/WebKit/gtk:

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::clearOpener):
(DumpRenderTreeSupportGtk::shouldClose):
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchWillSubmitForm):
(WebKit::FrameLoaderClient::committedLoad):
(WebKit::FrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::FrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::FrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::FrameLoaderClient::createFrame):
(WebKit::FrameLoaderClient::dispatchDidCommitLoad):
* webkit/webkitwebframe.cpp:
(webkit_web_frame_finalize):
(webkit_web_frame_load_uri):
(webkit_web_frame_load_data):
(webkit_web_frame_load_request):
(webkit_web_frame_stop_loading):
(webkit_web_frame_reload):
(webkit_web_frame_get_data_source):
(webkit_web_frame_get_provisional_data_source):
(webkit_web_frame_get_response_mime_type):
(webkit_web_frame_get_network_response):
(WebKit::kit):
* webkit/webkitwebpolicydecision.cpp:
(webkit_web_policy_decision_use):
(webkit_web_policy_decision_ignore):
(webkit_web_policy_decision_download):
* webkit/webkitwebview.cpp:
(webkit_web_view_dispose):
(webkit_web_view_reload):
(webkit_web_view_reload_bypass_cache):
(webkit_web_view_stop_loading):
(webkit_web_view_can_show_mime_type):
(webkit_web_view_set_custom_encoding):
(webkit_web_view_get_custom_encoding):
(webkit_web_view_get_subresources):

Source/WebKit/mac:

* Plugins/Hosted/HostedNetscapePluginStream.mm:
(WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::performRequest):
(WebKit::NetscapePluginInstanceProxy::loadRequest):
* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView pluginView:receivedResponse:]):
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView requestWithURLCString:]):
* Plugins/WebNetscapePluginStream.mm:
(WebNetscapePluginStream::WebNetscapePluginStream):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView loadStream]):
(-[WebNetscapePluginView pluginView:receivedResponse:]):
(-[WebNetscapePluginView loadPluginRequest:]):
(-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
* Plugins/WebPluginController.mm:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
(WebFrameLoaderClient::dispatchWillSubmitForm):
(WebFrameLoaderClient::updateGlobalHistory):
(WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
(WebFrameLoaderClient::restoreViewState):
(WebFrameLoaderClient::transitionToCommittedForNewPage):
(WebFrameLoaderClient::createFrame):
* WebCoreSupport/WebFrameNetworkingContext.mm:
(WebFrameNetworkingContext::blockedError):
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::getPluginInfo):
* WebView/WebFrame.mm:
(kit):
(-[WebFrame _dataSource]):
(-[WebFrame _canProvideDocumentSource]):
(-[WebFrame _commitData:]):
(-[WebFrame _firstLayoutDone]):
(-[WebFrame _loadType]):
(-[WebFrame _cacheabilityDictionary]):
(-[WebFrame _clearOpener]):
(-[WebFrame provisionalDataSource]):
(-[WebFrame dataSource]):
(-[WebFrame loadRequest:]):
(-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
(-[WebFrame loadArchive:]):
(-[WebFrame stopLoading]):
(-[WebFrame reload]):
(-[WebFrame reloadFromOrigin]):
* WebView/WebHTMLRepresentation.mm:
(-[WebHTMLRepresentation receivedData:withDataSource:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
* WebView/WebPDFView.mm:
(-[WebPDFView PDFViewWillClickOnLink:withURL:]):
* WebView/WebRenderLayer.mm:
(-[WebRenderLayer initWithWebFrame:]):
* WebView/WebRenderNode.mm:
(-[WebRenderNode _initWithCoreFrame:]):
* WebView/WebView.mm:
(-[WebView _close]):
(-[WebView _loadBackForwardListFromOtherView:]):
(-[WebView _cachedResponseForURL:]):
(-[WebView setCustomTextEncodingName:]):
(-[WebView shouldClose]):

Source/WebKit/qt:

* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::closeWindowSoon):
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::shouldClose):
(DumpRenderTreeSupportQt::responseMimeType):
(DumpRenderTreeSupportQt::clearOpener):
(DumpRenderTreeSupportQt::thirdPartyCookiePolicyAllows):
(DumpRenderTreeSupportQt::setAlternateHtml):
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::callPolicyFunction):
(WebCore::FrameLoaderClientQt::dispatchDidStartProvisionalLoad):
(WebCore::FrameLoaderClientQt::updateGlobalHistory):
(WebCore::FrameLoaderClientQt::updateGlobalHistoryRedirectLinks):
(WebCore::FrameLoaderClientQt::callErrorPageExtension):
(WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction):
(WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction):
(WebCore::FrameLoaderClientQt::startDownload):
(WebCore::FrameLoaderClientQt::createFrame):
(WebCore::FrameLoaderClientQt::objectContentType):
* WebCoreSupport/QWebFrameAdapter.cpp:
(QWebFrameAdapter::load):
(QWebFrameAdapter::setContent):
(QWebFrameAdapter::setHtml):
(QWebFrameAdapter::kit):
(QWebFrameAdapter::title):
(QWebFrameAdapter::clearCoreFrame):
* WebCoreSupport/QWebPageAdapter.cpp:
(frameLoadRequest):
(openNewWindow):
(QWebPageAdapter::triggerAction):
(QWebPageAdapter::currentFrame):

Source/WebKit/win:

* WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::searchWithGoogle):
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::updateGlobalHistory):
(WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
(WebFrameLoaderClient::savePlatformDataToCachedFrame):
(WebFrameLoaderClient::createFrame):
(WebFrameLoaderClient::dispatchDidFailToStartPlugin):
* WebCoreSupport/WebFrameNetworkingContext.cpp:
(WebFrameNetworkingContext::blockedError):
(WebFrameNetworkingContext::referrer):
* WebElementPropertyBag.cpp:
(WebElementPropertyBag::Read):
* WebFrame.cpp:
(kit):
(WebFrame::reloadFromOrigin):
(WebFrame::loadRequest):
(WebFrame::loadData):
(WebFrame::dataSource):
(WebFrame::provisionalDataSource):
(WebFrame::stopLoading):
(WebFrame::reload):
(WebFrame::firstLayoutDone):
(WebFrame::loadType):
(WebFrame::clearOpener):
(WebFrame::dispatchWillSubmitForm):
(WebFrame::receivedPolicyDecision):
(WebFrame::dispatchDecidePolicyForResponse):
(WebFrame::dispatchDecidePolicyForNewWindowAction):
(WebFrame::dispatchDecidePolicyForNavigationAction):
(WebFrame::createJavaAppletWidget):
* WebFramePolicyListener.cpp:
(WebFramePolicyListener::receivedPolicyDecision):
* WebView.cpp:
(WebView::close):
(WebView::canShowMIMEType):
(WebView::setCustomTextEncodingName):
(WebView::loadBackForwardListFromOtherView):
(WebView::shouldClose):

Source/WebKit/wince:

* WebCoreSupport/FrameLoaderClientWinCE.cpp:
(WebKit::FrameLoaderClientWinCE::dispatchDecidePolicyForResponse):
(WebKit::FrameLoaderClientWinCE::dispatchDecidePolicyForNewWindowAction):
(WebKit::FrameLoaderClientWinCE::dispatchDecidePolicyForNavigationAction):
(WebKit::FrameLoaderClientWinCE::dispatchWillSubmitForm):
* WebCoreSupport/FrameNetworkingContextWinCE.cpp:
(WebKit::FrameNetworkingContextWinCE::referrer):
* WebView.cpp:
(WebView::createFrame):
(WebView::load):
(WebView::reload):
(WebView::stop):

Source/WebKit2:

* Shared/WebRenderLayer.cpp:
(WebKit::WebRenderLayer::create):
* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::create):
* WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
(WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetFrameLoadState):
(WKBundleFrameClearOpener):
(WKBundleFrameCallShouldCloseOnWebView):
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::documentFrame):
(WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
(WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
(WebKit::InjectedBundleDOMWindowExtension::frame):
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::frame):
(WebKit::InjectedBundleHitTestResult::targetFrame):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::clickedLink):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::webPage):
(WebKit::PluginView::didFailToInitializePlugin):
(WebKit::PluginView::performFrameLoadURLRequest):
(WebKit::PluginView::userAgent):
(WebKit::PluginView::loadURL):
(WebKit::PluginView::cancelManualStreamLoad):
(WebKit::PluginView::proxiesForURL):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedElementChanged):
(WebKit::WebChromeClient::focusedFrameChanged):
(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
(WebKit::WebChromeClient::closeWindowSoon):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
(WebKit::WebChromeClient::unavailablePluginButtonClicked):
(WebKit::WebChromeClient::print):
(WebKit::WebChromeClient::exceededDatabaseQuota):
(WebKit::WebChromeClient::runOpenPanel):
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::searchWithGoogle):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::textFieldDidBeginEditing):
(WebKit::WebEditorClient::textFieldDidEndEditing):
(WebKit::WebEditorClient::textDidChangeInTextField):
(WebKit::WebEditorClient::textDidChangeInTextArea):
(WebKit::WebEditorClient::doTextFieldCommandFromEvent):
(WebKit::WebEditorClient::textWillBeDeletedInTextField):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
(WebKit::WebFrameLoaderClient::updateGlobalHistory):
(WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
(WebKit::WebFrameLoaderClient::restoreViewState):
(WebKit::WebFrameLoaderClient::createFrame):
(WebKit::WebFrameLoaderClient::createJavaAppletWidget):
(WebKit::WebFrameLoaderClient::objectContentType):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getPluginInfo):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::blockedError):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::didReceivePolicyDecision):
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::source):
(WebKit::WebFrame::contentsAsString):
(WebKit::WebFrame::url):
(WebKit::WebFrame::parentFrame):
(WebKit::WebFrame::childFrames):
(WebKit::WebFrame::stopLoading):
(WebKit::WebFrame::frameForContext):
(WebKit::WebFrame::provisionalURL):
(WebKit::WebFrame::suggestedFilenameForResourceWithURL):
(WebKit::WebFrame::mimeTypeForResourceWithURL):
(WebKit::WebFrameFilter::shouldIncludeSubframe):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
(WebKit::WebPage::close):
(WebKit::WebPage::tryClose):
(WebKit::WebPage::loadURLRequest):
(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::linkClicked):
(WebKit::WebPage::stopLoadingFrame):
(WebKit::WebPage::stopLoading):
(WebKit::WebPage::reload):
(WebKit::WebPage::tryRestoreScrollPosition):
(WebKit::WebPage::getMainResourceDataOfFrame):
(WebKit::resourceDataForFrame):
(WebKit::shouldReuseCommittedSandboxExtension):
(WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
(WebKit::WebPage::hasLocalDataForURL):
(WebKit::WebPage::setCustomTextEncodingName):
(WebKit::WebPage::canPluginHandleResponse):
(WebKit::WebPage::canShowMIMEType):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformHasLocalDataForURL):
(WebKit::cachedResponseForURL):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::downloadRequest):

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

165 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/websockets/WebSocketChannel.cpp
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Source/WebCore/bindings/ScriptControllerBase.cpp
Source/WebCore/bindings/js/ScriptController.cpp
Source/WebCore/css/CSSFontSelector.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/HTMLAppletElement.cpp
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLEmbedElement.cpp
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLFrameElementBase.cpp
Source/WebCore/html/HTMLFrameOwnerElement.cpp
Source/WebCore/html/HTMLFrameSetElement.cpp
Source/WebCore/html/HTMLHtmlElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLObjectElement.cpp
Source/WebCore/html/HTMLPlugInImageElement.cpp
Source/WebCore/html/HTMLVideoElement.cpp
Source/WebCore/html/ImageDocument.cpp
Source/WebCore/html/MediaDocument.cpp
Source/WebCore/html/PluginDocument.cpp
Source/WebCore/html/canvas/WebGLRenderingContext.cpp
Source/WebCore/html/parser/HTMLConstructionSite.cpp
Source/WebCore/html/parser/HTMLParserOptions.cpp
Source/WebCore/html/parser/XSSAuditor.cpp
Source/WebCore/html/parser/XSSAuditorDelegate.cpp
Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp
Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
Source/WebCore/inspector/InspectorFrontendHost.cpp
Source/WebCore/inspector/InspectorOverlay.cpp
Source/WebCore/inspector/InspectorPageAgent.cpp
Source/WebCore/inspector/InspectorResourceAgent.cpp
Source/WebCore/loader/CookieJar.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/DocumentThreadableLoader.cpp
Source/WebCore/loader/DocumentWriter.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/HistoryController.cpp
Source/WebCore/loader/ImageLoader.cpp
Source/WebCore/loader/MixedContentChecker.cpp
Source/WebCore/loader/NavigationScheduler.cpp
Source/WebCore/loader/PingLoader.cpp
Source/WebCore/loader/PolicyChecker.cpp
Source/WebCore/loader/ProgressTracker.cpp
Source/WebCore/loader/ResourceLoadNotifier.cpp
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
Source/WebCore/loader/appcache/DOMApplicationCache.cpp
Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/icon/IconController.cpp
Source/WebCore/loader/icon/IconLoader.cpp
Source/WebCore/page/Chrome.cpp
Source/WebCore/page/ContextMenuController.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/DOMWindowExtension.cpp
Source/WebCore/page/DragController.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/Frame.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/History.cpp
Source/WebCore/page/Location.cpp
Source/WebCore/page/Navigator.cpp
Source/WebCore/page/Page.cpp
Source/WebCore/page/PerformanceNavigation.cpp
Source/WebCore/page/PerformanceTiming.cpp
Source/WebCore/page/mac/PageMac.cpp
Source/WebCore/platform/gtk/ErrorsGtk.cpp
Source/WebCore/platform/ios/PasteboardIOS.mm
Source/WebCore/platform/mac/HTMLConverter.mm
Source/WebCore/platform/mac/PasteboardMac.mm
Source/WebCore/plugins/DOMMimeType.cpp
Source/WebCore/plugins/PluginStream.cpp
Source/WebCore/plugins/PluginView.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/svg/SVGAElement.cpp
Source/WebCore/svg/graphics/SVGImage.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/xml/XSLTProcessorLibxslt.cpp
Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp
Source/WebKit/blackberry/Api/WebPage.cpp
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp
Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
Source/WebKit/blackberry/WebKitSupport/PagePopup.cpp
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
Source/WebKit/efl/ewk/ewk_frame.cpp
Source/WebKit/efl/ewk/ewk_view.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
Source/WebKit/gtk/webkit/webkitwebframe.cpp
Source/WebKit/gtk/webkit/webkitwebpolicydecision.cpp
Source/WebKit/gtk/webkit/webkitwebview.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
Source/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm
Source/WebKit/mac/Plugins/WebNetscapePluginView.mm
Source/WebKit/mac/Plugins/WebPluginController.mm
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKit/mac/WebCoreSupport/WebFrameNetworkingContext.mm
Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
Source/WebKit/mac/WebView/WebFrame.mm
Source/WebKit/mac/WebView/WebHTMLRepresentation.mm
Source/WebKit/mac/WebView/WebHTMLView.mm
Source/WebKit/mac/WebView/WebPDFView.mm
Source/WebKit/mac/WebView/WebRenderLayer.mm
Source/WebKit/mac/WebView/WebRenderNode.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit/win/WebCoreSupport/WebFrameNetworkingContext.cpp
Source/WebKit/win/WebElementPropertyBag.cpp
Source/WebKit/win/WebFrame.cpp
Source/WebKit/win/WebFramePolicyListener.cpp
Source/WebKit/win/WebView.cpp
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp
Source/WebKit/wince/WebCoreSupport/FrameNetworkingContextWinCE.cpp
Source/WebKit/wince/WebView.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebRenderLayer.cpp
Source/WebKit2/Shared/WebRenderObject.cpp
Source/WebKit2/WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp
Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp
Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm
Source/WebKit2/WebProcess/Plugins/PluginView.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
Source/WebKit2/WebProcess/WebProcess.cpp

index 8a0dacc..6622f5c 100644 (file)
@@ -1,3 +1,415 @@
+2013-08-15  Anders Carlsson  <andersca@apple.com>
+
+        <https://webkit.org/b/119859> Frame::loader() should return a reference
+
+        Reviewed by Andreas Kling.
+
+        * Modules/websockets/WebSocketChannel.cpp:
+        (WebCore::WebSocketChannel::willOpenSocketStream):
+        * WebCore.xcodeproj/project.pbxproj:
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::press):
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
+        * bindings/ScriptControllerBase.cpp:
+        (WebCore::ScriptController::canExecuteScripts):
+        * bindings/js/ScriptController.cpp:
+        (WebCore::ScriptController::initScript):
+        * css/CSSFontSelector.cpp:
+        (WebCore::CSSFontSelector::beginLoadTimerFired):
+        * dom/DOMImplementation.cpp:
+        (WebCore::DOMImplementation::createDocument):
+        * dom/Document.cpp:
+        (WebCore::Document::Document):
+        (WebCore::Document::setVisualUpdatesAllowed):
+        (WebCore::Document::updateTitle):
+        (WebCore::Document::open):
+        (WebCore::Document::explicitClose):
+        (WebCore::Document::implicitClose):
+        (WebCore::Document::userAgent):
+        (WebCore::Document::canNavigate):
+        (WebCore::Document::processHttpEquiv):
+        (WebCore::Document::referrer):
+        (WebCore::Document::documentDidResumeFromPageCache):
+        (WebCore::Document::openSearchDescriptionURL):
+        (WebCore::Document::finishedParsing):
+        (WebCore::Document::addIconURL):
+        (WebCore::Document::initSecurityContext):
+        (WebCore::Document::updateURLForPushOrReplaceState):
+        (WebCore::Document::loadEventDelayTimerFired):
+        (WebCore::Document::loader):
+        (WebCore::Document::decrementActiveParserCount):
+        * history/CachedFrame.cpp:
+        (WebCore::CachedFrameBase::CachedFrameBase):
+        (WebCore::CachedFrameBase::restore):
+        (WebCore::CachedFrame::CachedFrame):
+        (WebCore::CachedFrame::open):
+        (WebCore::CachedFrame::destroy):
+        * history/PageCache.cpp:
+        (WebCore::logCanCacheFrameDecision):
+        (WebCore::logCanCachePageDecision):
+        (WebCore::PageCache::canCachePageContainingThisFrame):
+        (WebCore::PageCache::canCache):
+        * html/HTMLAnchorElement.cpp:
+        (WebCore::HTMLAnchorElement::handleClick):
+        * html/HTMLAppletElement.cpp:
+        (WebCore::HTMLAppletElement::updateWidget):
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::rendererIsNeeded):
+        * html/HTMLEmbedElement.cpp:
+        (WebCore::HTMLEmbedElement::updateWidget):
+        * html/HTMLFormElement.cpp:
+        (WebCore::HTMLFormElement::prepareForSubmission):
+        (WebCore::HTMLFormElement::submit):
+        * html/HTMLFrameElementBase.cpp:
+        (WebCore::HTMLFrameElementBase::openURL):
+        * html/HTMLFrameOwnerElement.cpp:
+        (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
+        * html/HTMLFrameSetElement.cpp:
+        (WebCore::HTMLFrameSetElement::insertedInto):
+        (WebCore::HTMLFrameSetElement::removedFrom):
+        * html/HTMLHtmlElement.cpp:
+        (WebCore::HTMLHtmlElement::insertedByParser):
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::createRenderer):
+        (WebCore::HTMLMediaElement::attach):
+        (WebCore::HTMLMediaElement::loadResource):
+        (WebCore::HTMLMediaElement::getPluginProxyParams):
+        (WebCore::HTMLMediaElement::createMediaPlayerProxy):
+        (WebCore::HTMLMediaElement::updateWidget):
+        (WebCore::HTMLMediaElement::mediaPlayerReferrer):
+        (WebCore::HTMLMediaElement::mediaPlayerUserAgent):
+        * html/HTMLObjectElement.cpp:
+        (WebCore::HTMLObjectElement::parametersForPlugin):
+        (WebCore::HTMLObjectElement::updateWidget):
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::HTMLPlugInImageElement::isImageType):
+        (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
+        (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
+        * html/HTMLVideoElement.cpp:
+        (WebCore::HTMLVideoElement::setDisplayMode):
+        * html/ImageDocument.cpp:
+        (WebCore::ImageDocumentParser::appendBytes):
+        (WebCore::ImageDocumentParser::finish):
+        (WebCore::ImageDocument::createDocumentStructure):
+        * html/MediaDocument.cpp:
+        (WebCore::MediaDocumentParser::createDocumentStructure):
+        * html/PluginDocument.cpp:
+        (WebCore::PluginDocumentParser::createDocumentStructure):
+        (WebCore::PluginDocumentParser::appendBytes):
+        (WebCore::PluginDocument::detach):
+        (WebCore::PluginDocument::cancelManualPluginLoad):
+        * html/canvas/WebGLRenderingContext.cpp:
+        (WebCore::WebGLRenderingContext::create):
+        (WebCore::WebGLRenderingContext::loseContextImpl):
+        (WebCore::WebGLRenderingContext::maybeRestoreContext):
+        * html/parser/HTMLConstructionSite.cpp:
+        (WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded):
+        (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
+        * html/parser/HTMLParserOptions.cpp:
+        (WebCore::HTMLParserOptions::HTMLParserOptions):
+        * html/parser/XSSAuditor.cpp:
+        (WebCore::XSSAuditor::init):
+        * html/parser/XSSAuditorDelegate.cpp:
+        (WebCore::XSSAuditorDelegate::generateViolationReport):
+        (WebCore::XSSAuditorDelegate::didBlockScript):
+        * inspector/InspectorApplicationCacheAgent.cpp:
+        (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
+        (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
+        * inspector/InspectorFrontendClientLocal.cpp:
+        (WebCore::InspectorFrontendClientLocal::openInNewTab):
+        * inspector/InspectorFrontendHost.cpp:
+        (WebCore::InspectorFrontendHost::loadResourceSynchronously):
+        * inspector/InspectorOverlay.cpp:
+        (WebCore::InspectorOverlay::overlayPage):
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::mainResourceContent):
+        (WebCore::InspectorPageAgent::reload):
+        (WebCore::InspectorPageAgent::navigate):
+        (WebCore::allResourcesURLsForFrame):
+        (WebCore::InspectorPageAgent::searchInResource):
+        (WebCore::InspectorPageAgent::assertDocumentLoader):
+        (WebCore::InspectorPageAgent::buildObjectForFrame):
+        * inspector/InspectorResourceAgent.cpp:
+        (WebCore::InspectorResourceAgent::didFailLoading):
+        * loader/CookieJar.cpp:
+        (WebCore::networkingContext):
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::frameLoader):
+        (WebCore::DocumentLoader::document):
+        (WebCore::DocumentLoader::stopLoading):
+        (WebCore::DocumentLoader::removeSubresourceLoader):
+        (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
+        (WebCore::DocumentLoader::iconLoadDecisionAvailable):
+        (WebCore::DocumentLoader::continueIconLoadWithDecision):
+        * loader/DocumentThreadableLoader.cpp:
+        (WebCore::DocumentThreadableLoader::didReceiveResponse):
+        (WebCore::DocumentThreadableLoader::didFinishLoading):
+        (WebCore::DocumentThreadableLoader::didFail):
+        (WebCore::DocumentThreadableLoader::preflightFailure):
+        (WebCore::DocumentThreadableLoader::loadRequest):
+        * loader/DocumentWriter.cpp:
+        (WebCore::DocumentWriter::replaceDocument):
+        (WebCore::DocumentWriter::createDocument):
+        (WebCore::DocumentWriter::begin):
+        * loader/FrameLoader.cpp:
+        (WebCore::FrameLoader::~FrameLoader):
+        (WebCore::FrameLoader::allChildrenAreComplete):
+        (WebCore::FrameLoader::allAncestorsAreComplete):
+        (WebCore::FrameLoader::loadURLIntoChildFrame):
+        (WebCore::FrameLoader::outgoingReferrer):
+        (WebCore::FrameLoader::setOpener):
+        (WebCore::FrameLoader::completed):
+        (WebCore::FrameLoader::started):
+        (WebCore::FrameLoader::loadFrameRequest):
+        (WebCore::FrameLoader::loadURL):
+        (WebCore::FrameLoader::load):
+        (WebCore::FrameLoader::loadWithDocumentLoader):
+        (WebCore::FrameLoader::stopAllLoaders):
+        (WebCore::FrameLoader::closeOldDataSources):
+        (WebCore::FrameLoader::subframeIsLoading):
+        (WebCore::FrameLoader::subresourceCachePolicy):
+        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
+        (WebCore::FrameLoader::detachChildren):
+        (WebCore::FrameLoader::checkLoadComplete):
+        (WebCore::FrameLoader::detachFromParent):
+        (WebCore::FrameLoader::loadPostRequest):
+        (WebCore::FrameLoader::loadResourceSynchronously):
+        (WebCore::FrameLoader::shouldClose):
+        (WebCore::FrameLoader::handleBeforeUnloadEvent):
+        (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
+        (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
+        (WebCore::createWindow):
+        * loader/HistoryController.cpp:
+        (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
+        (WebCore::HistoryController::restoreScrollPositionAndViewState):
+        (WebCore::HistoryController::saveDocumentState):
+        (WebCore::HistoryController::saveDocumentAndScrollState):
+        (WebCore::isAssociatedToRequestedHistoryItem):
+        (WebCore::HistoryController::restoreDocumentState):
+        (WebCore::HistoryController::shouldStopLoadingForHistoryItem):
+        (WebCore::HistoryController::goToItem):
+        (WebCore::HistoryController::updateForBackForwardNavigation):
+        (WebCore::HistoryController::updateForReload):
+        (WebCore::HistoryController::updateForStandardLoad):
+        (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
+        (WebCore::HistoryController::updateForClientRedirect):
+        (WebCore::HistoryController::updateForCommit):
+        (WebCore::HistoryController::recursiveUpdateForCommit):
+        (WebCore::HistoryController::updateForSameDocumentNavigation):
+        (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
+        (WebCore::HistoryController::initializeItem):
+        (WebCore::HistoryController::createItemTree):
+        (WebCore::HistoryController::recursiveSetProvisionalItem):
+        (WebCore::HistoryController::recursiveGoToItem):
+        (WebCore::HistoryController::updateBackForwardListClippedAtTarget):
+        (WebCore::HistoryController::updateCurrentItem):
+        (WebCore::HistoryController::pushState):
+        (WebCore::HistoryController::replaceState):
+        * loader/ImageLoader.cpp:
+        (WebCore::pageIsBeingDismissed):
+        * loader/MixedContentChecker.cpp:
+        (WebCore::MixedContentChecker::client):
+        * loader/NavigationScheduler.cpp:
+        (WebCore::ScheduledURLNavigation::fire):
+        (WebCore::ScheduledURLNavigation::didStartTimer):
+        (WebCore::ScheduledURLNavigation::didStopTimer):
+        (WebCore::ScheduledRedirect::shouldStartTimer):
+        (WebCore::ScheduledRedirect::fire):
+        (WebCore::ScheduledRefresh::fire):
+        (WebCore::ScheduledHistoryNavigation::fire):
+        (WebCore::ScheduledFormSubmission::fire):
+        (WebCore::ScheduledFormSubmission::didStartTimer):
+        (WebCore::ScheduledFormSubmission::didStopTimer):
+        (WebCore::NavigationScheduler::mustLockBackForwardList):
+        (WebCore::NavigationScheduler::scheduleLocationChange):
+        (WebCore::NavigationScheduler::scheduleFormSubmission):
+        (WebCore::NavigationScheduler::scheduleRefresh):
+        (WebCore::NavigationScheduler::schedule):
+        * loader/PingLoader.cpp:
+        (WebCore::PingLoader::loadImage):
+        (WebCore::PingLoader::sendPing):
+        (WebCore::PingLoader::sendViolationReport):
+        (WebCore::PingLoader::PingLoader):
+        * loader/PolicyChecker.cpp:
+        (WebCore::PolicyChecker::checkNavigationPolicy):
+        (WebCore::PolicyChecker::checkNewWindowPolicy):
+        (WebCore::PolicyChecker::checkContentPolicy):
+        (WebCore::PolicyChecker::cancelCheck):
+        (WebCore::PolicyChecker::stopCheck):
+        (WebCore::PolicyChecker::cannotShowMIMEType):
+        (WebCore::PolicyChecker::continueLoadAfterWillSubmitForm):
+        (WebCore::PolicyChecker::continueAfterNavigationPolicy):
+        (WebCore::PolicyChecker::continueAfterNewWindowPolicy):
+        (WebCore::PolicyChecker::handleUnimplementablePolicy):
+        * loader/ProgressTracker.cpp:
+        (WebCore::ProgressTracker::progressStarted):
+        (WebCore::ProgressTracker::progressCompleted):
+        (WebCore::ProgressTracker::finalProgressComplete):
+        (WebCore::ProgressTracker::incrementProgress):
+        (WebCore::ProgressTracker::progressHeartbeatTimerFired):
+        * loader/ResourceLoadNotifier.cpp:
+        (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
+        (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
+        (WebCore::ResourceLoadNotifier::willSendRequest):
+        (WebCore::ResourceLoadNotifier::didFailToLoad):
+        (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
+        (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
+        (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
+        (WebCore::ResourceLoadNotifier::dispatchDidReceiveData):
+        (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
+        (WebCore::ResourceLoadNotifier::dispatchDidFailLoading):
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::ResourceLoader):
+        (WebCore::ResourceLoader::start):
+        (WebCore::ResourceLoader::frameLoader):
+        (WebCore::ResourceLoader::willSendRequest):
+        * loader/SubframeLoader.cpp:
+        (WebCore::SubframeLoader::pluginIsLoadable):
+        (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
+        (WebCore::SubframeLoader::createJavaAppletWidget):
+        (WebCore::SubframeLoader::loadOrRedirectSubframe):
+        (WebCore::SubframeLoader::loadSubframe):
+        (WebCore::SubframeLoader::allowPlugins):
+        (WebCore::SubframeLoader::shouldUsePlugin):
+        (WebCore::SubframeLoader::loadPlugin):
+        * loader/appcache/ApplicationCacheGroup.cpp:
+        (WebCore::ApplicationCacheGroup::selectCache):
+        (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
+        (WebCore::ApplicationCacheGroup::update):
+        (WebCore::ApplicationCacheGroup::createResourceHandle):
+        (WebCore::ApplicationCacheGroup::didReceiveResponse):
+        (WebCore::ApplicationCacheGroup::didFinishLoading):
+        (WebCore::ApplicationCacheGroup::didFail):
+        (WebCore::ApplicationCacheGroup::addEntry):
+        (WebCore::CallCacheListenerTask::performTask):
+        (WebCore::ApplicationCacheGroup::postListenerTask):
+        * loader/appcache/DOMApplicationCache.cpp:
+        (WebCore::DOMApplicationCache::applicationCacheHost):
+        * loader/archive/cf/LegacyWebArchive.cpp:
+        (WebCore::LegacyWebArchive::create):
+        (WebCore::LegacyWebArchive::createFromSelection):
+        * loader/cache/CachedResource.cpp:
+        (WebCore::CachedResource::addAdditionalRequestHeaders):
+        (WebCore::CachedResource::load):
+        * loader/cache/CachedResourceLoader.cpp:
+        (WebCore::CachedResourceLoader::requestImage):
+        (WebCore::CachedResourceLoader::checkInsecureContent):
+        (WebCore::CachedResourceLoader::canRequest):
+        (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
+        (WebCore::CachedResourceLoader::requestResource):
+        (WebCore::CachedResourceLoader::clientDefersImage):
+        (WebCore::CachedResourceLoader::cachePolicy):
+        (WebCore::CachedResourceLoader::loadDone):
+        * loader/icon/IconController.cpp:
+        (WebCore::IconController::commitToDatabase):
+        (WebCore::IconController::startLoader):
+        (WebCore::IconController::continueLoadWithDecision):
+        * loader/icon/IconLoader.cpp:
+        (WebCore::IconLoader::startLoading):
+        (WebCore::IconLoader::notifyFinished):
+        * page/Chrome.cpp:
+        (WebCore::canRunModalIfDuringPageDismissal):
+        * page/ContextMenuController.cpp:
+        (WebCore::openNewWindow):
+        (WebCore::ContextMenuController::contextMenuItemSelected):
+        (WebCore::ContextMenuController::populate):
+        (WebCore::ContextMenuController::checkOrEnableIfNeeded):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
+        (WebCore::DOMWindow::postMessageTimerFired):
+        (WebCore::DOMWindow::close):
+        (WebCore::DOMWindow::print):
+        (WebCore::DOMWindow::stop):
+        (WebCore::DOMWindow::setName):
+        (WebCore::DOMWindow::opener):
+        (WebCore::DOMWindow::dispatchLoadEvent):
+        (WebCore::DOMWindow::setLocation):
+        (WebCore::DOMWindow::createWindow):
+        (WebCore::DOMWindow::open):
+        * page/DOMWindowExtension.cpp:
+        (WebCore::DOMWindowExtension::disconnectFrameForPageCache):
+        (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
+        (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
+        (WebCore::DOMWindowExtension::willDestroyGlobalObjectInFrame):
+        (WebCore::DOMWindowExtension::willDetachGlobalObjectFromFrame):
+        * page/DragController.cpp:
+        (WebCore::DragController::performDrag):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::handleMousePressEvent):
+        (WebCore::EventHandler::keyEvent):
+        * page/Frame.cpp:
+        (WebCore::Frame::~Frame):
+        (WebCore::Frame::setView):
+        (WebCore::Frame::injectUserScripts):
+        (WebCore::Frame::willDetachPage):
+        * page/Frame.h:
+        (WebCore::Frame::loader):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::mediaType):
+        (WebCore::FrameView::setFixedVisibleContentRect):
+        (WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
+        (WebCore::FrameView::performPostLayoutTasks):
+        (WebCore::FrameView::autoSizeIfEnabled):
+        (WebCore::FrameView::scrollTo):
+        (WebCore::FrameView::shouldSuspendScrollAnimations):
+        (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
+        (WebCore::FrameView::wheelEvent):
+        (WebCore::FrameView::firePaintRelatedMilestones):
+        * page/History.cpp:
+        (WebCore::History::stateInternal):
+        (WebCore::History::stateObjectAdded):
+        * page/Location.cpp:
+        (WebCore::Location::setLocation):
+        * page/Navigator.cpp:
+        (WebCore::Navigator::userAgent):
+        * page/Page.cpp:
+        (WebCore::Page::goToItem):
+        (WebCore::Page::refreshPlugins):
+        (WebCore::Page::setDefersLoading):
+        (WebCore::Page::setMemoryCacheClientCallsEnabled):
+        (WebCore::Page::addRelevantRepaintedObject):
+        * page/Performance.cpp:
+        (WebCore::Performance::now):
+        * page/PerformanceNavigation.cpp:
+        (WebCore::PerformanceNavigation::type):
+        (WebCore::PerformanceNavigation::redirectCount):
+        * page/PerformanceResourceTiming.cpp:
+        (WebCore::monotonicTimeToDocumentMilliseconds):
+        * page/mac/PageMac.cpp:
+        (WebCore::Page::addSchedulePair):
+        (WebCore::Page::removeSchedulePair):
+        * platform/ios/PasteboardIOS.mm:
+        (WebCore::documentFragmentWithImageResource):
+        (WebCore::documentFragmentWithRTF):
+        (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
+        * platform/mac/HTMLConverter.mm:
+        (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
+        (-[WebHTMLConverter _loadFromDOMRange]):
+        * platform/mac/PasteboardMac.mm:
+        (WebCore::documentFragmentWithImageResource):
+        (WebCore::documentFragmentWithRTF):
+        (WebCore::fragmentFromWebArchive):
+        * plugins/DOMMimeType.cpp:
+        (WebCore::DOMMimeType::enabledPlugin):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::scrollTo):
+        * svg/SVGAElement.cpp:
+        (WebCore::SVGAElement::defaultEventHandler):
+        * svg/graphics/SVGImage.cpp:
+        (WebCore::SVGImage::~SVGImage):
+        (WebCore::SVGImage::dataChanged):
+        * testing/Internals.cpp:
+        (WebCore::Internals::formControlStateOfPreviousHistoryItem):
+        (WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
+        (WebCore::Internals::getReferencedFilePaths):
+        (WebCore::Internals::forceReload):
+        * xml/XSLTProcessorLibxslt.cpp:
+        (WebCore::docLoaderFunc):
+        * xml/parser/XMLDocumentParserLibxml2.cpp:
+        (WebCore::openFunc):
+        (WebCore::XMLDocumentParser::startElementNs):
+
 2013-08-15  Daniel Bates  <dabates@apple.com>
 
         <https://webkit.org/b/119863> [iOS] Upstream WebCore/editing/ios
index 34f4abe..5c8ab72 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 6d107cc..b1636b2 100644 (file)
                06027CB20B1CC03D00884B2D /* ContextMenuItemMac.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ContextMenuItemMac.mm; sourceTree = "<group>"; };
                062287830B4DB322000C34DF /* FocusDirection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FocusDirection.h; sourceTree = "<group>"; };
                065AD4F20B0C2EDA005A2B1D /* ContextMenuClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ContextMenuClient.h; sourceTree = "<group>"; };
-               065AD4F30B0C2EDA005A2B1D /* ContextMenuController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ContextMenuController.cpp; sourceTree = "<group>"; };
+               065AD4F30B0C2EDA005A2B1D /* ContextMenuController.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = ContextMenuController.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
                065AD4F40B0C2EDA005A2B1D /* ContextMenuController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ContextMenuController.h; sourceTree = "<group>"; };
                0668E1890ADD9624004128E0 /* PopupMenu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PopupMenu.h; sourceTree = "<group>"; };
                066C772A0AB603B700238CC4 /* FileChooser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FileChooser.h; sourceTree = "<group>"; };
                14D64B5A134A5B6B00E58FDA /* TreeScope.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TreeScope.cpp; sourceTree = "<group>"; };
                14D64B5B134A5B6B00E58FDA /* TreeScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TreeScope.h; sourceTree = "<group>"; };
                14D823500AF92A790004F057 /* Chrome.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Chrome.h; sourceTree = "<group>"; };
-               14D8238A0AF92DF60004F057 /* Chrome.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Chrome.cpp; sourceTree = "<group>"; };
+               14D8238A0AF92DF60004F057 /* Chrome.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = Chrome.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
                14D824060AF93AEB0004F057 /* ChromeClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChromeClient.h; sourceTree = "<group>"; };
                14DC0D0B09FECFA4007B0235 /* Node.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Node.idl; sourceTree = "<group>"; };
                14DC0D3509FED073007B0235 /* JSNode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNode.cpp; sourceTree = "<group>"; };
                1A8F6B010DB53006001DB794 /* SubstituteResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubstituteResource.h; sourceTree = "<group>"; };
                1A8F6BB10DB55CDC001DB794 /* ApplicationCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ApplicationCache.cpp; sourceTree = "<group>"; };
                1A8F6BB20DB55CDC001DB794 /* ApplicationCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicationCache.h; sourceTree = "<group>"; };
-               1A8F6BB30DB55CDC001DB794 /* ApplicationCacheGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ApplicationCacheGroup.cpp; sourceTree = "<group>"; };
+               1A8F6BB30DB55CDC001DB794 /* ApplicationCacheGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = ApplicationCacheGroup.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
                1A8F6BB40DB55CDC001DB794 /* ApplicationCacheGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicationCacheGroup.h; sourceTree = "<group>"; };
                1A8F6BB50DB55CDC001DB794 /* ApplicationCacheResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ApplicationCacheResource.cpp; sourceTree = "<group>"; };
                1A8F6BB60DB55CDC001DB794 /* ApplicationCacheResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicationCacheResource.h; sourceTree = "<group>"; };
                2981CAA2131822EC00D12F2A /* AccessibilityListBox.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityListBox.cpp; sourceTree = "<group>"; };
                2981CAA3131822EC00D12F2A /* AccessibilityListBoxOption.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityListBoxOption.cpp; sourceTree = "<group>"; };
                2981CAA4131822EC00D12F2A /* AccessibilityMediaControls.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityMediaControls.cpp; sourceTree = "<group>"; };
-               2981CAA5131822EC00D12F2A /* AccessibilityObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityObject.cpp; sourceTree = "<group>"; };
+               2981CAA5131822EC00D12F2A /* AccessibilityObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = AccessibilityObject.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
                2981CAA6131822EC00D12F2A /* AccessibilityRenderObject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityRenderObject.cpp; sourceTree = "<group>"; };
                2981CAA7131822EC00D12F2A /* AccessibilityScrollbar.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityScrollbar.cpp; sourceTree = "<group>"; };
                2981CAA8131822EC00D12F2A /* AccessibilityScrollView.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityScrollView.cpp; sourceTree = "<group>"; };
                51B2417A0D931F3F00E83F5C /* LegacyWebArchiveMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LegacyWebArchiveMac.mm; sourceTree = "<group>"; };
                51BE37DE0DAEE00E001085FC /* StorageArea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageArea.h; sourceTree = "<group>"; };
                51C0AA380F2AA10A001648C2 /* CachedFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedFrame.h; sourceTree = "<group>"; };
-               51C0AA400F2AA15E001648C2 /* CachedFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedFrame.cpp; sourceTree = "<group>"; };
+               51C0AA400F2AA15E001648C2 /* CachedFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CachedFrame.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
                51C81B870C4422F70019ECE3 /* FTPDirectoryParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FTPDirectoryParser.cpp; sourceTree = "<group>"; };
                51C81B880C4422F70019ECE3 /* FTPDirectoryParser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FTPDirectoryParser.h; sourceTree = "<group>"; };
                51CBFC980D10E483002DBF51 /* CachedFramePlatformData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedFramePlatformData.h; sourceTree = "<group>"; };
                BCB16C0B0979C3BD00467741 /* CachedScript.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CachedScript.h; sourceTree = "<group>"; };
                BCB16C0E0979C3BD00467741 /* CachedXSLStyleSheet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CachedXSLStyleSheet.cpp; sourceTree = "<group>"; };
                BCB16C0F0979C3BD00467741 /* CachedXSLStyleSheet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CachedXSLStyleSheet.h; sourceTree = "<group>"; };
-               BCB16C100979C3BD00467741 /* CachedResourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CachedResourceLoader.cpp; sourceTree = "<group>"; };
+               BCB16C100979C3BD00467741 /* CachedResourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = CachedResourceLoader.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
                BCB16C110979C3BD00467741 /* CachedResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CachedResourceLoader.h; sourceTree = "<group>"; };
                BCB7735E0C17853D00132BA4 /* JSNodeFilterCondition.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCondition.cpp; sourceTree = "<group>"; };
                BCB7735F0C17853D00132BA4 /* JSNodeFilterCondition.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSNodeFilterCondition.h; sourceTree = "<group>"; };
index ff473e6..6fbf115 100644 (file)
@@ -578,7 +578,7 @@ bool AccessibilityObject::press() const
     if (!actionElem)
         return false;
     if (Frame* f = actionElem->document()->frame())
-        f->loader()->resetMultipleFormSubmissionProtection();
+        f->loader().resetMultipleFormSubmissionProtection();
     
     UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
     actionElem->accessKeyAction(true);
index 6b98c31..a418c6f 100644 (file)
@@ -1467,7 +1467,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 6482a2d..9020c1e 100644 (file)
@@ -52,9 +52,9 @@ bool ScriptController::canExecuteScripts(ReasonForCallingCanExecuteScripts reaso
     }
 
     Settings* settings = m_frame->settings();
-    const bool allowed = m_frame->loader()->client()->allowScript(settings && settings->isScriptEnabled());
+    const bool allowed = m_frame->loader().client()->allowScript(settings && settings->isScriptEnabled());
     if (!allowed && reason == AboutToExecuteScript)
-        m_frame->loader()->client()->didNotAllowScript();
+        m_frame->loader().client()->didNotAllowScript();
     return allowed;
 }
 
index 5666331..61caf4e 100644 (file)
@@ -222,7 +222,7 @@ JSDOMWindowShell* ScriptController::initScript(DOMWrapperWorld* world)
         windowShell->window()->setProfileGroup(page->group().identifier());
     }
 
-    m_frame->loader()->dispatchDidClearWindowObjectInWorld(world);
+    m_frame->loader().dispatchDidClearWindowObjectInWorld(world);
 
     return windowShell;
 }
index d217df5..400bd9a 100644 (file)
@@ -613,7 +613,7 @@ void CSSFontSelector::beginLoadTimerFired(Timer<WebCore::CSSFontSelector>*)
     // New font loads may be triggered by layout after the document load is complete but before we have dispatched
     // didFinishLoading for the frame. Make sure the delegate is always dispatched by checking explicitly.
     if (m_document && m_document->frame())
-        m_document->frame()->loader()->checkLoadComplete();
+        m_document->frame()->loader().checkLoadComplete();
 }
 
 bool CSSFontSelector::resolvesFamilyFor(const FontDescription& description) const
index 4b42836..2b5aa70 100644 (file)
@@ -351,7 +351,7 @@ PassRefPtr<Document> DOMImplementation::createDocument(const String& type, Frame
     PluginData* pluginData = 0;
     PluginData::AllowedPluginTypes allowedPluginTypes = PluginData::OnlyApplicationPlugins;
     if (frame && frame->page()) {
-        if (frame->loader()->subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
+        if (frame->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
             allowedPluginTypes = PluginData::AllPlugins;
 
         pluginData = frame->page()->pluginData();
@@ -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 9b3e00f..0dd324f 100644 (file)
@@ -493,7 +493,7 @@ Document::Document(Frame* frame, const KURL& url, unsigned documentClasses)
     m_markers = adoptPtr(new DocumentMarkerController);
 
     if (m_frame)
-        m_cachedResourceLoader = m_frame->loader()->activeDocumentLoader()->cachedResourceLoader();
+        m_cachedResourceLoader = m_frame->loader().activeDocumentLoader()->cachedResourceLoader();
     if (!m_cachedResourceLoader)
         m_cachedResourceLoader = CachedResourceLoader::create(0);
     m_cachedResourceLoader->setDocument(this);
@@ -1266,7 +1266,7 @@ void Document::setVisualUpdatesAllowed(bool visualUpdatesAllowed)
         if (frame() == page->mainFrame()) {
             frameView->addPaintPendingMilestones(DidFirstPaintAfterSuppressedIncrementalRendering);
             if (page->requestedLayoutMilestones() & DidFirstLayoutAfterSuppressedIncrementalRendering)
-                frame()->loader()->didLayout(DidFirstLayoutAfterSuppressedIncrementalRendering);
+                frame()->loader().didLayout(DidFirstLayoutAfterSuppressedIncrementalRendering);
         }
     }
 
@@ -1279,7 +1279,7 @@ void Document::setVisualUpdatesAllowed(bool visualUpdatesAllowed)
         renderView->repaintViewAndCompositedLayers();
 
     if (Frame* frame = this->frame())
-        frame->loader()->forcePageTransitionIfNeeded();
+        frame->loader().forcePageTransitionIfNeeded();
 }
 
 void Document::visualUpdatesSuppressionTimerFired(Timer<Document>*)
@@ -1510,7 +1510,7 @@ void Document::updateTitle(const StringWithDirection& title)
             m_title = canonicalizedTitle<UChar>(this, m_rawTitle);
     }
     if (Frame* f = frame())
-        f->loader()->setTitle(m_title);
+        f->loader().setTitle(m_title);
 }
 
 void Document::setTitle(const String& title)
@@ -2193,8 +2193,8 @@ void Document::open(Document* ownerDocument)
             }
         }
 
-        if (m_frame->loader()->state() == FrameStateProvisional)
-            m_frame->loader()->stopAllLoaders();
+        if (m_frame->loader().state() == FrameStateProvisional)
+            m_frame->loader().stopAllLoaders();
     }
 
     removeAllEventListeners();
@@ -2203,7 +2203,7 @@ void Document::open(Document* ownerDocument)
         parser->setWasCreatedByScript(true);
 
     if (m_frame)
-        m_frame->loader()->didExplicitOpen();
+        m_frame->loader().didExplicitOpen();
 }
 
 void Document::detachParser()
@@ -2326,7 +2326,7 @@ void Document::explicitClose()
         return;
     }
 
-    m_frame->loader()->checkCompleted();
+    m_frame->loader().checkCompleted();
 }
 
 void Document::implicitClose()
@@ -2363,7 +2363,7 @@ void Document::implicitClose()
     // ramifications, and we need to decide what is the Right Thing To Do(tm)
     Frame* f = frame();
     if (f) {
-        f->loader()->icon()->startLoader();
+        f->loader().icon()->startLoader();
         f->animation()->startAnimationsIfNotSuspended(this);
     }
 
@@ -2387,7 +2387,7 @@ void Document::implicitClose()
     enqueuePopstateEvent(m_pendingStateObject ? m_pendingStateObject.release() : SerializedScriptValue::nullValue());
     
     if (f)
-        f->loader()->handledOnloadEvents();
+        f->loader().handledOnloadEvents();
 #ifdef INSTRUMENT_LAYOUT_SCHEDULING
     if (!ownerElement())
         printf("onload fired at %d\n", elapsedTime());
@@ -2411,7 +2411,7 @@ void Document::implicitClose()
         return;
     }
 
-    frame()->loader()->checkCallImplicitClose();
+    frame()->loader().checkCallImplicitClose();
     
     // We used to force a synchronous display and flush here.  This really isn't
     // necessary and can in fact be actively harmful if pages are loading at a rate of > 60fps
@@ -2675,7 +2675,7 @@ void Document::processBaseElement()
 
 String Document::userAgent(const KURL& url) const
 {
-    return frame() ? frame()->loader()->userAgent(url) : String();
+    return frame() ? frame()->loader().userAgent(url) : String();
 }
 
 void Document::disableEval(const String& errorMessage)
@@ -2735,10 +2735,10 @@ bool Document::canNavigate(Frame* targetFrame)
     // and/or "parent" relation). Requiring some sort of relation prevents a
     // document from navigating arbitrary, unrelated top-level frames.
     if (!targetFrame->tree()->parent()) {
-        if (targetFrame == m_frame->loader()->opener())
+        if (targetFrame == m_frame->loader().opener())
             return true;
 
-        if (canAccessAncestor(securityOrigin(), targetFrame->loader()->opener()))
+        if (canAccessAncestor(securityOrigin(), targetFrame->loader().opener()))
             return true;
     }
 
@@ -2827,13 +2827,13 @@ void Document::processHttpEquiv(const String& equiv, const String& content)
         parseDNSPrefetchControlHeader(content);
     else if (equalIgnoringCase(equiv, "x-frame-options")) {
         if (frame) {
-            FrameLoader* frameLoader = frame->loader();
+            FrameLoader& frameLoader = frame->loader();
             unsigned long requestIdentifier = 0;
-            if (frameLoader->activeDocumentLoader() && frameLoader->activeDocumentLoader()->mainResourceLoader())
-                requestIdentifier = frameLoader->activeDocumentLoader()->mainResourceLoader()->identifier();
-            if (frameLoader->shouldInterruptLoadForXFrameOptions(content, url(), requestIdentifier)) {
+            if (frameLoader.activeDocumentLoader() && frameLoader.activeDocumentLoader()->mainResourceLoader())
+                requestIdentifier = frameLoader.activeDocumentLoader()->mainResourceLoader()->identifier();
+            if (frameLoader.shouldInterruptLoadForXFrameOptions(content, url(), requestIdentifier)) {
                 String message = "Refused to display '" + url().stringCenterEllipsizedToLength() + "' in a frame because it set 'X-Frame-Options' to '" + content + "'.";
-                frameLoader->stopAllLoaders();
+                frameLoader.stopAllLoaders();
                 // Stopping the loader isn't enough, as we're already parsing the document; to honor the header's
                 // intent, we must navigate away from the possibly partially-rendered document to a location that
                 // doesn't inherit the parent's SecurityOrigin.
@@ -3723,7 +3723,7 @@ void Document::setCookie(const String& value, ExceptionCode& ec)
 String Document::referrer() const
 {
     if (frame())
-        return frame()->loader()->referrer();
+        return frame()->loader().referrer();
     return String();
 }
 
@@ -4036,7 +4036,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)
@@ -4175,7 +4175,7 @@ KURL Document::openSearchDescriptionURL()
         return KURL();
 
     // FIXME: Why do we need to wait for FrameStateComplete?
-    if (frame()->loader()->state() != FrameStateComplete)
+    if (frame()->loader().state() != FrameStateComplete)
         return KURL();
 
     if (!head())
@@ -4395,7 +4395,7 @@ void Document::finishedParsing()
         // See https://bugs.webkit.org/show_bug.cgi?id=36864 starting around comment 35.
         updateStyleIfNeeded();
 
-        f->loader()->finishedParsing();
+        f->loader().finishedParsing();
 
         InspectorInstrumentation::domContentLoadedEventFired(f.get());
     }
@@ -4498,7 +4498,7 @@ void Document::addIconURL(const String& url, const String&, const String&, IconT
     if (!f)
         return;
 
-    f->loader()->didChangeIcons(iconType);
+    f->loader().didChangeIcons(iconType);
 }
 
 static bool isEligibleForSeamless(Document* parent, Document* child)
@@ -4534,7 +4534,7 @@ void Document::initSecurityContext()
     // In the common case, create the security context from the currently
     // loading URL with a fresh content security policy.
     m_cookieURL = m_url;
-    enforceSandboxFlags(m_frame->loader()->effectiveSandboxFlags());
+    enforceSandboxFlags(m_frame->loader().effectiveSandboxFlags());
     setSecurityOrigin(isSandboxed(SandboxOrigin) ? SecurityOrigin::createUnique() : SecurityOrigin::create(m_url));
     setContentSecurityPolicy(ContentSecurityPolicy::create(this));
 
@@ -4544,7 +4544,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()) {
@@ -4558,7 +4558,7 @@ void Document::initSecurityContext()
     }
 
     Document* parentDocument = ownerElement() ? ownerElement()->document() : 0;
-    if (parentDocument && m_frame->loader()->shouldTreatURLAsSrcdocDocument(url())) {
+    if (parentDocument && m_frame->loader().shouldTreatURLAsSrcdocDocument(url())) {
         m_isSrcdocDocument = true;
         setBaseURLOverride(parentDocument->baseURL());
     }
@@ -4575,7 +4575,7 @@ void Document::initSecurityContext()
 
     Frame* ownerFrame = m_frame->tree()->parent();
     if (!ownerFrame)
-        ownerFrame = m_frame->loader()->opener();
+        ownerFrame = m_frame->loader().opener();
 
     if (!ownerFrame) {
         didFailToInitializeSecurityOrigin();
@@ -4618,7 +4618,7 @@ void Document::updateURLForPushOrReplaceState(const KURL& url)
         return;
 
     setURL(url);
-    f->loader()->setOutgoingReferrer(url);
+    f->loader().setOutgoingReferrer(url);
 
     if (DocumentLoader* documentLoader = loader())
         documentLoader->replaceRequestURLForSameDocumentNavigation(url);
@@ -5453,7 +5453,7 @@ void Document::decrementLoadEventDelayCount()
 void Document::loadEventDelayTimerFired(Timer<Document>*)
 {
     if (frame())
-        frame()->loader()->checkCompleted();
+        frame()->loader().checkCompleted();
 }
 
 #if ENABLE(REQUEST_ANIMATION_FRAME)
@@ -5645,7 +5645,7 @@ DocumentLoader* Document::loader() const
     if (!m_frame)
         return 0;
     
-    DocumentLoader* loader = m_frame->loader()->documentLoader();
+    DocumentLoader* loader = m_frame->loader().documentLoader();
     if (!loader)
         return 0;
     
@@ -5737,7 +5737,7 @@ void Document::decrementActiveParserCount()
 #if ENABLE(THREADED_HTML_PARSER)
     loader()->checkLoadComplete();
 #endif
-    frame()->loader()->checkLoadComplete();
+    frame()->loader().checkLoadComplete();
 }
 
 void Document::setContextFeatures(PassRefPtr<ContextFeatures> features)
index 2062719..04ea318 100644 (file)
@@ -74,7 +74,7 @@ static WTF::RefCountedLeakCounter& cachedFrameCounter()
 
 CachedFrameBase::CachedFrameBase(Frame* frame)
     : m_document(frame->document())
-    , m_documentLoader(frame->loader()->documentLoader())
+    , m_documentLoader(frame->loader().documentLoader())
     , m_view(frame->view())
     , m_mousePressNode(frame->eventHandler()->mousePressNode())
     , m_url(frame->document()->url())
@@ -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)
@@ -138,7 +138,7 @@ void CachedFrameBase::restore()
 
     m_document->enqueuePageshowEvent(PageshowEventPersisted);
     
-    HistoryItem* historyItem = frame->loader()->history()->currentItem();
+    HistoryItem* historyItem = frame->loader().history()->currentItem();
     m_document->enqueuePopstateEvent(historyItem && historyItem->stateObject() ? historyItem->stateObject() : SerializedScriptValue::nullValue());
     
 #if ENABLE(TOUCH_EVENTS)
@@ -166,7 +166,7 @@ CachedFrame::CachedFrame(Frame* frame)
     m_view->detachCustomScrollbars();
 
     m_document->setInPageCache(true);
-    frame->loader()->stopLoading(UnloadEventPolicyUnloadAndPageHide);
+    frame->loader().stopLoading(UnloadEventPolicyUnloadAndPageHide);
 
     // Create the CachedFrames for all Frames in the FrameTree.
     for (Frame* child = frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
@@ -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)
@@ -217,7 +217,7 @@ CachedFrame::CachedFrame(Frame* frame)
 void CachedFrame::open()
 {
     ASSERT(m_view);
-    m_view->frame()->loader()->open(*this);
+    m_view->frame()->loader().open(*this);
 
     if (!m_isMainFrame)
         m_view->frame()->page()->incrementSubframeCount();
@@ -262,7 +262,7 @@ void CachedFrame::destroy()
 
     if (!m_isMainFrame) {
         m_view->frame()->detachFromPage();
-        m_view->frame()->loader()->detachViewsAndDocumentLoader();
+        m_view->frame()->loader().detachViewsAndDocumentLoader();
     }
     
     for (int i = m_childFrames.size() - 1; i >= 0; --i)
index 3ebd05b..c0a1edb 100644 (file)
@@ -89,34 +89,34 @@ COMPILE_ASSERT(NumberOfReasonsFramesCannotBeInPageCache <= sizeof(unsigned)*8, R
 static unsigned logCanCacheFrameDecision(Frame* frame, int indentLevel)
 {
     PCLOG("+---");
-    if (!frame->loader()->documentLoader()) {
+    if (!frame->loader().documentLoader()) {
         PCLOG("   -There is no DocumentLoader object");
         return 1 << NoDocumentLoader;
     }
 
-    KURL currentURL = frame->loader()->documentLoader()->url();
-    KURL newURL = frame->loader()->provisionalDocumentLoader() ? frame->loader()->provisionalDocumentLoader()->url() : KURL();
+    KURL currentURL = frame->loader().documentLoader()->url();
+    KURL newURL = frame->loader().provisionalDocumentLoader() ? frame->loader().provisionalDocumentLoader()->url() : KURL();
     if (!newURL.isEmpty())
         PCLOG(" Determining if frame can be cached navigating from (", currentURL.string(), ") to (", newURL.string(), "):");
     else
         PCLOG(" Determining if subframe with URL (", currentURL.string(), ") can be cached:");
      
     unsigned rejectReasons = 0;
-    if (!frame->loader()->documentLoader()->mainDocumentError().isNull()) {
+    if (!frame->loader().documentLoader()->mainDocumentError().isNull()) {
         PCLOG("   -Main document has an error");
         rejectReasons |= 1 << MainDocumentError;
     }
-    if (frame->loader()->documentLoader()->substituteData().isValid() && frame->loader()->documentLoader()->substituteData().failingURL().isEmpty()) {
+    if (frame->loader().documentLoader()->substituteData().isValid() && frame->loader().documentLoader()->substituteData().failingURL().isEmpty()) {
         PCLOG("   -Frame is an error page");
         rejectReasons |= 1 << IsErrorPage;
     }
-    if (frame->loader()->subframeLoader()->containsPlugins() && !frame->page()->settings().pageCacheSupportsPlugins()) {
+    if (frame->loader().subframeLoader()->containsPlugins() && !frame->page()->settings().pageCacheSupportsPlugins()) {
         PCLOG("   -Frame contains plugins");
         rejectReasons |= 1 << HasPlugins;
     }
     if (frame->document()->url().protocolIs("https")
-        && (frame->loader()->documentLoader()->response().cacheControlContainsNoCache()
-            || frame->loader()->documentLoader()->response().cacheControlContainsNoStore())) {
+        && (frame->loader().documentLoader()->response().cacheControlContainsNoCache()
+            || frame->loader().documentLoader()->response().cacheControlContainsNoStore())) {
         PCLOG("   -Frame is HTTPS, and cache control prohibits caching or storing");
         rejectReasons |= 1 << IsHttpsAndCacheControlled;
     }
@@ -136,19 +136,19 @@ static unsigned logCanCacheFrameDecision(Frame* frame, int indentLevel)
         rejectReasons |= 1 << HasSharedWorkers;
     }
 #endif
-    if (!frame->loader()->history()->currentItem()) {
+    if (!frame->loader().history()->currentItem()) {
         PCLOG("   -No current history item");
         rejectReasons |= 1 << NoHistoryItem;
     }
-    if (frame->loader()->quickRedirectComing()) {
+    if (frame->loader().quickRedirectComing()) {
         PCLOG("   -Quick redirect is coming");
         rejectReasons |= 1 << QuickRedirectComing;
     }
-    if (frame->loader()->documentLoader()->isLoadingInAPISense()) {
+    if (frame->loader().documentLoader()->isLoadingInAPISense()) {
         PCLOG("   -DocumentLoader is still loading in API sense");
         rejectReasons |= 1 << IsLoadingInAPISense;
     }
-    if (frame->loader()->documentLoader()->isStopping()) {
+    if (frame->loader().documentLoader()->isStopping()) {
         PCLOG("   -DocumentLoader is in the middle of stopping");
         rejectReasons |= 1 << IsStopping;
     }
@@ -156,11 +156,11 @@ static unsigned logCanCacheFrameDecision(Frame* frame, int indentLevel)
         PCLOG("   -The document cannot suspect its active DOM Objects");
         rejectReasons |= 1 << CannotSuspendActiveDOMObjects;
     }
-    if (!frame->loader()->documentLoader()->applicationCacheHost()->canCacheInPageCache()) {
+    if (!frame->loader().documentLoader()->applicationCacheHost()->canCacheInPageCache()) {
         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;
     }
@@ -202,9 +202,9 @@ COMPILE_ASSERT(NumberOfReasonsPagesCannotBeInPageCache <= sizeof(unsigned)*8, Re
 static void logCanCachePageDecision(Page* page)
 {
     // Only bother logging for main frames that have actually loaded and have content.
-    if (page->mainFrame()->loader()->stateMachine()->creatingInitialEmptyDocument())
+    if (page->mainFrame()->loader().stateMachine()->creatingInitialEmptyDocument())
         return;
-    KURL currentURL = page->mainFrame()->loader()->documentLoader() ? page->mainFrame()->loader()->documentLoader()->url() : KURL();
+    KURL currentURL = page->mainFrame()->loader().documentLoader() ? page->mainFrame()->loader().documentLoader()->url() : KURL();
     if (currentURL.isEmpty())
         return;
     
@@ -240,7 +240,7 @@ static void logCanCachePageDecision(Page* page)
         rejectReasons |= 1 << UsesDeviceMotion;
     }
 #endif
-    FrameLoadType loadType = page->mainFrame()->loader()->loadType();
+    FrameLoadType loadType = page->mainFrame()->loader().loadType();
     if (loadType == FrameLoadTypeReload) {
         PCLOG("   -Load type is: Reload");
         rejectReasons |= 1 << IsReload;
@@ -308,15 +308,15 @@ bool PageCache::canCachePageContainingThisFrame(Frame* frame)
             return false;
     }
     
-    FrameLoader* frameLoader = frame->loader();
-    DocumentLoader* documentLoader = frameLoader->documentLoader();
+    FrameLoader& frameLoader = frame->loader();
+    DocumentLoader* documentLoader = frameLoader.documentLoader();
     Document* document = frame->document();
     
     return documentLoader
         && documentLoader->mainDocumentError().isNull()
         // Do not cache error pages (these can be recognized as pages with substitute data or unreachable URLs).
         && !(documentLoader->substituteData().isValid() && !documentLoader->substituteData().failingURL().isEmpty())
-        && (!frameLoader->subframeLoader()->containsPlugins() || frame->page()->settings().pageCacheSupportsPlugins())
+        && (!frameLoader.subframeLoader()->containsPlugins() || frame->page()->settings().pageCacheSupportsPlugins())
         && (!document->url().protocolIs("https") || (!documentLoader->response().cacheControlContainsNoCache() && !documentLoader->response().cacheControlContainsNoStore()))
         && (!document->domWindow() || !document->domWindow()->hasEventListeners(eventNames().unloadEvent))
 #if ENABLE(SQL_DATABASE)
@@ -325,15 +325,15 @@ bool PageCache::canCachePageContainingThisFrame(Frame* frame)
 #if ENABLE(SHARED_WORKERS)
         && !SharedWorkerRepository::hasSharedWorkers(document)
 #endif
-        && frameLoader->history()->currentItem()
-        && !frameLoader->quickRedirectComing()
+        && frameLoader.history()->currentItem()
+        && !frameLoader.quickRedirectComing()
         && !documentLoader->isLoadingInAPISense()
         && !documentLoader->isStopping()
         && document->canSuspendActiveDOMObjects()
         // 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
@@ -350,7 +350,7 @@ bool PageCache::canCache(Page* page) const
     // store the final page we end up on.
     // No point writing to the cache on a reload or loadSame, since we will just write
     // over it again when we leave that page.
-    FrameLoadType loadType = page->mainFrame()->loader()->loadType();
+    FrameLoadType loadType = page->mainFrame()->loader().loadType();
     
     return m_capacity > 0
         && canCachePageContainingThisFrame(page->mainFrame())
index 741f32c..6e37dbb 100644 (file)
@@ -539,16 +539,16 @@ void HTMLAnchorElement::handleClick(Event* event)
 
         // FIXME: Why are we not calling addExtraFieldsToMainResourceRequest() if this check fails? It sets many important header fields.
         if (!hasRel(RelationNoReferrer)) {
-            String referrer = SecurityPolicy::generateReferrerHeader(document()->referrerPolicy(), kurl, frame->loader()->outgoingReferrer());
+            String referrer = SecurityPolicy::generateReferrerHeader(document()->referrerPolicy(), kurl, frame->loader().outgoingReferrer());
             if (!referrer.isEmpty())
                 request.setHTTPReferrer(referrer);
-            frame->loader()->addExtraFieldsToMainResourceRequest(request);
+            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);
+        frame->loader().urlSelected(kurl, target(), event, false, false, hasRel(RelationNoReferrer) ? NeverSendReferrer : MaybeSendReferrer);
 
     sendPings(kurl);
 }
index 3399eae..3e5acc8 100644 (file)
@@ -162,7 +162,7 @@ void HTMLAppletElement::updateWidget(PluginCreationOption pluginCreationOption)
     Frame* frame = document()->frame();
     ASSERT(frame);
 
-    renderer->setWidget(frame->loader()->subframeLoader()->createJavaAppletWidget(roundedIntSize(LayoutSize(contentWidth, contentHeight)), this, paramNames, paramValues));
+    renderer->setWidget(frame->loader().subframeLoader()->createJavaAppletWidget(roundedIntSize(LayoutSize(contentWidth, contentHeight)), this, paramNames, paramValues));
 }
 
 bool HTMLAppletElement::canEmbedJava() const
index ac0d526..87363f6 100644 (file)
@@ -757,7 +757,7 @@ bool HTMLElement::rendererIsNeeded(const NodeRenderingContext& context)
             return false;
     } else if (hasLocalName(noembedTag)) {
         Frame* frame = document()->frame();
-        if (frame && frame->loader()->subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
+        if (frame && frame->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
             return false;
     }
     return StyledElement::rendererIsNeeded(context);
index 56d35af..5ef0beb 100644 (file)
@@ -165,7 +165,7 @@ void HTMLEmbedElement::updateWidget(PluginCreationOption pluginCreationOption)
     if (!renderer()) // Do not load the plugin if beforeload removed this element or its renderer.
         return;
 
-    SubframeLoader* loader = document()->frame()->loader()->subframeLoader();
+    SubframeLoader* loader = document()->frame()->loader().subframeLoader();
     // FIXME: beforeLoad could have detached the renderer!  Just like in the <object> case above.
     loader->requestObject(this, m_url, getNameAttribute(), m_serviceType, paramNames, paramValues);
 }
index f26ca38..ac7a2c1 100644 (file)
@@ -270,7 +270,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;
@@ -347,7 +347,7 @@ void HTMLFormElement::submit(Event* event, bool activateSubmitButton, bool proce
         firstSuccessfulSubmitButton->setActivatedSubmit(true);
 
     bool lockHistory = !processingUserGesture;
-    frame->loader()->submitForm(FormSubmission::create(this, m_attributes, event, lockHistory, formSubmissionTrigger));
+    frame->loader().submitForm(FormSubmission::create(this, m_attributes, event, lockHistory, formSubmissionTrigger));
 
     if (needButtonActivation && firstSuccessfulSubmitButton)
         firstSuccessfulSubmitButton->setActivatedSubmit(false);
index 12b0187..d8c4c82 100644 (file)
@@ -85,7 +85,7 @@ void HTMLFrameElementBase::openURL(bool lockHistory, bool lockBackForwardList)
     if (!parentFrame)
         return;
 
-    parentFrame->loader()->subframeLoader()->requestFrame(this, m_URL, m_frameName, lockHistory, lockBackForwardList);
+    parentFrame->loader().subframeLoader()->requestFrame(this, m_URL, m_frameName, lockHistory, lockBackForwardList);
     if (contentFrame())
         contentFrame()->setInViewSourceMode(viewSourceMode());
 }
index 252522e..75ca97e 100644 (file)
@@ -81,7 +81,7 @@ void HTMLFrameOwnerElement::disconnectContentFrame()
     // see if this behavior is really needed as Gecko does not allow this.
     if (Frame* frame = contentFrame()) {
         RefPtr<Frame> protect(frame);
-        frame->loader()->frameDetached();
+        frame->loader().frameDetached();
         frame->disconnectOwnerElement();
     }
 }
index cfdeadc..686c2d2 100644 (file)
@@ -214,7 +214,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;
@@ -225,7 +225,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 fa6284d..414d3c7 100644 (file)
@@ -66,7 +66,7 @@ void HTMLHtmlElement::insertedByParser()
     if (!document()->frame())
         return;
 
-    DocumentLoader* documentLoader = document()->frame()->loader()->documentLoader();
+    DocumentLoader* documentLoader = document()->frame()->loader().documentLoader();
     if (!documentLoader)
         return;
 
index 43ed156..b429f5d 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
@@ -646,7 +646,7 @@ void HTMLMediaElement::attach(const AttachContext& context)
 #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
 }
@@ -1039,7 +1039,7 @@ void HTMLMediaElement::loadResource(const KURL& initialURL, ContentType& content
     }
 
     KURL url = initialURL;
-    if (!frame->loader()->willLoadMediaElementURL(url)) {
+    if (!frame->loader().willLoadMediaElementURL(url)) {
         mediaLoadingFailed(MediaPlayer::FormatError);
         return;
     }
@@ -1049,7 +1049,7 @@ void HTMLMediaElement::loadResource(const KURL& initialURL, ContentType& content
 
     // If the url should be loaded from the application cache, pass the url of the cached file
     // to the media engine.
-    ApplicationCacheHost* cacheHost = frame->loader()->documentLoader()->applicationCacheHost();
+    ApplicationCacheHost* cacheHost = frame->loader().documentLoader()->applicationCacheHost();
     ApplicationCacheResource* resource = 0;
     if (cacheHost && cacheHost->shouldLoadResourceFromApplicationCache(ResourceRequest(url), resource)) {
         // Resources that are not present in the manifest will always fail to load (at least, after the
@@ -4312,7 +4312,7 @@ void HTMLMediaElement::getPluginProxyParams(KURL& url, Vector<String>& names, Ve
     if (isVideo()) {
         HTMLVideoElement* video = toHTMLVideoElement(this);
         KURL posterURL = video->posterImageURL();
-        if (!posterURL.isEmpty() && frame && frame->loader()->willLoadMediaElementURL(posterURL)) {
+        if (!posterURL.isEmpty() && frame && frame->loader().willLoadMediaElementURL(posterURL)) {
             names.append(ASCIILiteral("_media_element_poster_"));
             values.append(posterURL.string());
         }
@@ -4328,7 +4328,7 @@ void HTMLMediaElement::getPluginProxyParams(KURL& url, Vector<String>& names, Ve
         url = selectNextSourceChild(0, 0, DoNothing);
 
     m_currentSrc = url;
-    if (url.isValid() && frame && frame->loader()->willLoadMediaElementURL(url)) {
+    if (url.isValid() && frame && frame->loader().willLoadMediaElementURL(url)) {
         names.append(ASCIILiteral("_media_element_src_"));
         values.append(m_currentSrc.string());
     }
@@ -4355,7 +4355,7 @@ void HTMLMediaElement::createMediaPlayerProxy()
     
     // Hang onto the proxy widget so it won't be destroyed if the plug-in is set to
     // display:none
-    m_proxyWidget = frame->loader()->subframeLoader()->loadMediaPlayerProxyPlugin(this, url, paramNames, paramValues);
+    m_proxyWidget = frame->loader().subframeLoader()->loadMediaPlayerProxyPlugin(this, url, paramNames, paramValues);
     if (m_proxyWidget)
         m_needWidgetUpdate = false;
 }
@@ -4371,7 +4371,7 @@ void HTMLMediaElement::updateWidget(PluginCreationOption)
 
     mediaElement->getPluginProxyParams(kurl, paramNames, paramValues);
     // FIXME: What if document()->frame() is 0?
-    SubframeLoader* loader = document()->frame()->loader()->subframeLoader();
+    SubframeLoader* loader = document()->frame()->loader().subframeLoader();
     loader->loadMediaPlayerProxyPlugin(mediaElement, kurl, paramNames, paramValues);
 }
 
@@ -4993,7 +4993,7 @@ String HTMLMediaElement::mediaPlayerReferrer() const
     if (!frame)
         return String();
 
-    return SecurityPolicy::generateReferrerHeader(document()->referrerPolicy(), m_currentSrc, frame->loader()->outgoingReferrer());
+    return SecurityPolicy::generateReferrerHeader(document()->referrerPolicy(), m_currentSrc, frame->loader().outgoingReferrer());
 }
 
 String HTMLMediaElement::mediaPlayerUserAgent() const
@@ -5002,7 +5002,7 @@ String HTMLMediaElement::mediaPlayerUserAgent() const
     if (!frame)
         return String();
 
-    return frame->loader()->userAgent(m_currentSrc);
+    return frame->loader().userAgent(m_currentSrc);
 
 }
 
index 49f4e2c..568d85e 100644 (file)
@@ -208,7 +208,7 @@ void HTMLObjectElement::parametersForPlugin(Vector<String>& paramNames, Vector<S
     // resource's URL to be given by a param named "src", "movie", "code" or "url"
     // if we know that resource points to a plug-in.
     if (url.isEmpty() && !urlParameter.isEmpty()) {
-        SubframeLoader* loader = document()->frame()->loader()->subframeLoader();
+        SubframeLoader* loader = document()->frame()->loader().subframeLoader();
         if (loader->resourceWillUsePlugin(urlParameter, serviceType, shouldPreferPlugInsForImages()))
             url = urlParameter;
     }
@@ -318,7 +318,7 @@ void HTMLObjectElement::updateWidget(PluginCreationOption pluginCreationOption)
     if (!renderer()) // Do not load the plugin if beforeload removed this element or its renderer.
         return;
 
-    SubframeLoader* loader = document()->frame()->loader()->subframeLoader();
+    SubframeLoader* loader = document()->frame()->loader().subframeLoader();
     bool success = beforeLoadAllowedLoad && hasValidClassId() && loader->requestObject(this, url, getNameAttribute(), serviceType, paramNames, paramValues);
     if (!success && fallbackContent)
         renderFallbackContent();
index 49a7ba9..dccb9f0 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);
@@ -187,9 +187,8 @@ bool HTMLPlugInImageElement::wouldLoadAsNetscapePlugin(const String& url, const
     if (!url.isEmpty())
         completedURL = document()->completeURL(url);
 
-    FrameLoader* frameLoader = document()->frame()->loader();
-    ASSERT(frameLoader);
-    if (frameLoader->client()->objectContentType(completedURL, serviceType, shouldPreferPlugInsForImages()) == ObjectContentNetscapePlugin)
+    FrameLoader& frameLoader = document()->frame()->loader();
+    if (frameLoader.client()->objectContentType(completedURL, serviceType, shouldPreferPlugInsForImages()) == ObjectContentNetscapePlugin)
         return true;
     return false;
 }
@@ -457,7 +456,7 @@ void HTMLPlugInImageElement::restartSimilarPlugIns()
         return;
 
     for (Frame* frame = document()->page()->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
-        if (!frame->loader()->subframeLoader()->containsPlugins())
+        if (!frame->loader().subframeLoader()->containsPlugins())
             continue;
         
         if (!frame->document())
index 79f1807..a64e59e 100644 (file)
@@ -212,9 +212,8 @@ void HTMLVideoElement::setDisplayMode(DisplayMode mode)
     if (player() && player()->canLoadPoster()) {
         bool canLoad = true;
         if (!poster.isEmpty()) {
-            Frame* frame = document()->frame();
-            FrameLoader* loader = frame ? frame->loader() : 0;
-            canLoad = loader && loader->willLoadMediaElementURL(poster);
+            if (Frame* frame = document()->frame())
+                canLoad = frame->loader().willLoadMediaElementURL(poster);
         }
         if (canLoad)
             player()->setPoster(poster);
index ec849ac..db2d1d9 100644 (file)
@@ -131,11 +131,11 @@ void ImageDocumentParser::appendBytes(DocumentWriter*, const char*, size_t)
 {
     Frame* frame = document()->frame();
     Settings* settings = frame->settings();
-    if (!frame->loader()->client()->allowImage(!settings || settings->areImagesEnabled(), document()->url()))
+    if (!frame->loader().client()->allowImage(!settings || settings->areImagesEnabled(), document()->url()))
         return;
 
     CachedImage* cachedImage = document()->cachedImage();
-    RefPtr<ResourceBuffer> resourceData = frame->loader()->documentLoader()->mainResourceData();
+    RefPtr<ResourceBuffer> resourceData = frame->loader().documentLoader()->mainResourceData();
     cachedImage->addDataBuffer(resourceData.get());
 
     document()->imageUpdated();
@@ -145,17 +145,17 @@ void ImageDocumentParser::finish()
 {
     if (!isStopped() && document()->imageElement()) {
         CachedImage* cachedImage = document()->cachedImage();
-        RefPtr<ResourceBuffer> data = document()->frame()->loader()->documentLoader()->mainResourceData();
+        RefPtr<ResourceBuffer> data = document()->frame()->loader().documentLoader()->mainResourceData();
 
         // If this is a multipart image, make a copy of the current part, since the resource data
         // will be overwritten by the next part.
-        if (document()->frame()->loader()->documentLoader()->isLoadingMultipartContent())
+        if (document()->frame()->loader().documentLoader()->isLoadingMultipartContent())
             data = data->copy();
 
         cachedImage->finishLoading(data.get());
         cachedImage->finish();
 
-        cachedImage->setResponse(document()->frame()->loader()->documentLoader()->response());
+        cachedImage->setResponse(document()->frame()->loader().documentLoader()->response());
 
         // Report the natural image size in the page title, regardless of zoom level.
         // At a zoom level of 1 the image is guaranteed to have an integer size.
@@ -199,8 +199,8 @@ void ImageDocument::createDocumentStructure()
     appendChild(rootElement, IGNORE_EXCEPTION);
     static_cast<HTMLHtmlElement*>(rootElement.get())->insertedByParser();
 
-    if (frame() && frame()->loader())
-        frame()->loader()->dispatchDocumentElementAvailable();
+    if (frame())
+        frame()->loader().dispatchDocumentElementAvailable();
     
     RefPtr<Element> body = Document::createElement(bodyTag, false);
     body->setAttribute(styleAttr, "margin: 0px;");
index 5972af2..3a4aedf 100644 (file)
@@ -78,7 +78,7 @@ void MediaDocumentParser::createDocumentStructure()
     static_cast<HTMLHtmlElement*>(rootElement.get())->insertedByParser();
 
     if (document()->frame())
-        document()->frame()->loader()->dispatchDocumentElementAvailable();
+        document()->frame()->loader().dispatchDocumentElementAvailable();
         
     RefPtr<Element> body = document()->createElement(bodyTag, false);
     rootElement->appendChild(body, IGNORE_EXCEPTION);
@@ -105,7 +105,7 @@ void MediaDocumentParser::createDocumentStructure()
     if (!frame)
         return;
 
-    frame->loader()->activeDocumentLoader()->setMainResourceDataBufferingPolicy(DoNotBufferData);
+    frame->loader().activeDocumentLoader()->setMainResourceDataBufferingPolicy(DoNotBufferData);
 }
 
 void MediaDocumentParser::appendBytes(DocumentWriter*, const char*, size_t)
index 4d1ccfe..14fbcf9 100644 (file)
@@ -71,8 +71,8 @@ void PluginDocumentParser::createDocumentStructure()
     document()->appendChild(rootElement, IGNORE_EXCEPTION);
     static_cast<HTMLHtmlElement*>(rootElement.get())->insertedByParser();
 
-    if (document()->frame() && document()->frame()->loader())
-        document()->frame()->loader()->dispatchDocumentElementAvailable();
+    if (document()->frame())
+        document()->frame()->loader().dispatchDocumentElementAvailable();
 
     RefPtr<Element> body = document()->createElement(bodyTag, false);
     body->setAttribute(marginwidthAttr, "0");
@@ -125,11 +125,11 @@ 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().
-            frame->loader()->activeDocumentLoader()->setMainResourceDataBufferingPolicy(DoNotBufferData);
+            frame->loader().activeDocumentLoader()->setMainResourceDataBufferingPolicy(DoNotBufferData);
         }
     }
 }
@@ -165,8 +165,7 @@ void PluginDocument::detach()
 {
     // Release the plugin Element so that we don't have a circular reference.
     m_pluginElement = 0;
-    if (FrameLoader* loader = frame()->loader())
-        loader->client()->redirectDataToPlugin(0);
+    frame()->loader().client()->redirectDataToPlugin(0);
     Document::detach();
 }
 
@@ -177,8 +176,8 @@ void PluginDocument::cancelManualPluginLoad()
     if (!shouldLoadPluginManually())
         return;
 
-    DocumentLoader* documentLoader = frame()->loader()->activeDocumentLoader();
-    documentLoader->cancelMainResourceLoad(frame()->loader()->cancelledError(documentLoader->request()));
+    DocumentLoader* documentLoader = frame()->loader().activeDocumentLoader();
+    documentLoader->cancelMainResourceLoad(frame()->loader().cancelledError(documentLoader->request()));
     setShouldLoadPluginManually(false);
 }
 
index a38083e..d9a01d3 100644 (file)
@@ -415,7 +415,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(settings && settings->webGLEnabled())) {
+    if (!frame->loader().client()->allowWebGL(settings && settings->webGLEnabled())) {
         canvas->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextcreationerrorEvent, false, true, "Web page was not allowed to create a WebGL context."));
         return nullptr;
     }
@@ -4603,7 +4603,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());
         }
     }
 
@@ -5822,7 +5822,7 @@ void WebGLRenderingContext::maybeRestoreContext(Timer<WebGLRenderingContext>*)
     if (!frame)
         return;
 
-    if (!frame->loader()->client()->allowWebGL(frame->settings() && frame->settings()->webGLEnabled()))
+    if (!frame->loader().client()->allowWebGL(frame->settings() && frame->settings()->webGLEnabled()))
         return;
 
     FrameView* view = frame->view();
index 157c256..db6747f 100644 (file)
@@ -202,7 +202,7 @@ void HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded()
 {
     ASSERT(m_document);
     if (m_document->frame() && !m_isParsingFragment)
-        m_document->frame()->loader()->dispatchDocumentElementAvailable();
+        m_document->frame()->loader().dispatchDocumentElementAvailable();
 }
 
 void HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML(AtomicHTMLToken* token)
@@ -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 07eb5c0..bd6814b 100644 (file)
@@ -38,7 +38,7 @@ HTMLParserOptions::HTMLParserOptions(Document* document)
 {
     Frame* frame = document ? document->frame() : 0;
     scriptEnabled = frame && frame->script()->canExecuteScripts(NotAboutToExecuteScript);
-    pluginsEnabled = frame && frame->loader()->subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin);
+    pluginsEnabled = frame && frame->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin);
 
     Settings* settings = document ? document->settings() : 0;
     usePreHTML5ParserQuirks = settings && settings->usePreHTML5ParserQuirks();
index 5253ec5..30660f9 100644 (file)
@@ -273,7 +273,7 @@ void XSSAuditor::init(Document* document, XSSAuditorDelegate* auditorDelegate)
         m_decodedURL = String();
 
     String httpBodyAsString;
-    if (DocumentLoader* documentLoader = document->frame()->loader()->documentLoader()) {
+    if (DocumentLoader* documentLoader = document->frame()->loader().documentLoader()) {
         DEFINE_STATIC_LOCAL(String, XSSProtectionHeader, (ASCIILiteral("X-XSS-Protection")));
         String headerValue = documentLoader->response().httpHeaderField(XSSProtectionHeader);
         String errorDetails;
index e25265e..9c89c06 100644 (file)
@@ -76,10 +76,10 @@ PassRefPtr<FormData> XSSAuditorDelegate::generateViolationReport()
 {
     ASSERT(isMainThread());
 
-    FrameLoader* frameLoader = m_document->frame()->loader();
+    FrameLoader& frameLoader = m_document->frame()->loader();
     String httpBody;
-    if (frameLoader->documentLoader()) {
-        if (FormData* formData = frameLoader->documentLoader()->originalRequest().httpBody())
+    if (frameLoader.documentLoader()) {
+        if (FormData* formData = frameLoader.documentLoader()->originalRequest().httpBody())
             httpBody = formData->flattenToString();
     }
 
@@ -99,14 +99,14 @@ void XSSAuditorDelegate::didBlockScript(const XSSInfo& xssInfo)
 
     m_document->addConsoleMessage(JSMessageSource, ErrorMessageLevel, buildConsoleError(xssInfo, m_document->url().string()));
 
-    FrameLoader* frameLoader = m_document->frame()->loader();
+    FrameLoader& frameLoader = m_document->frame()->loader();
     if (xssInfo.m_didBlockEntirePage)
-        frameLoader->stopAllLoaders();
+        frameLoader.stopAllLoaders();
 
     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 2d7c73b..9736b95 100644 (file)
@@ -86,7 +86,7 @@ void InspectorApplicationCacheAgent::enable(ErrorString*)
 
 void InspectorApplicationCacheAgent::updateApplicationCacheStatus(Frame* frame)
 {
-    DocumentLoader* documentLoader = frame->loader()->documentLoader();
+    DocumentLoader* documentLoader = frame->loader().documentLoader();
     if (!documentLoader)
         return;
 
@@ -110,7 +110,7 @@ void InspectorApplicationCacheAgent::getFramesWithManifests(ErrorString*, RefPtr
 
     Frame* mainFrame = m_pageAgent->mainFrame();
     for (Frame* frame = mainFrame; frame; frame = frame->tree()->traverseNext(mainFrame)) {
-        DocumentLoader* documentLoader = frame->loader()->documentLoader();
+        DocumentLoader* documentLoader = frame->loader().documentLoader();
         if (!documentLoader)
             continue;
 
index 1bfb67b..432c11a 100644 (file)
@@ -219,11 +219,11 @@ void InspectorFrontendClientLocal::openInNewTab(const String& url)
     if (!frame)
         return;
 
-    frame->loader()->setOpener(mainFrame);
+    frame->loader().setOpener(mainFrame);
     frame->page()->setOpenedByDOM();
 
     // FIXME: Why does one use mainFrame and the other frame?
-    frame->loader()->changeLocation(mainFrame->document()->securityOrigin(), frame->document()->completeURL(url), "", false, false);
+    frame->loader().changeLocation(mainFrame->document()->securityOrigin(), frame->document()->completeURL(url), "", false, false);
 }
 
 void InspectorFrontendClientLocal::moveWindowBy(float x, float y)
index 275279f..bcce558 100644 (file)
@@ -290,7 +290,7 @@ String InspectorFrontendHost::loadResourceSynchronously(const String& url)
     Vector<char> data;
     ResourceError error;
     ResourceResponse response;
-    m_frontendPage->mainFrame()->loader()->loadResourceSynchronously(request, DoNotAllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, error, response, data);
+    m_frontendPage->mainFrame()->loader().loadResourceSynchronously(request, DoNotAllowStoredCredentials, DoNotAskClientForCrossOriginCredentials, error, response, data);
     return String::fromUTF8(data.data(), data.size());
 }
 
index 0a3f659..2e2d98f 100644 (file)
@@ -454,14 +454,14 @@ Page* InspectorOverlay::overlayPage()
     RefPtr<Frame> frame = Frame::create(m_overlayPage.get(), 0, dummyFrameLoaderClient);
     frame->setView(FrameView::create(frame.get()));
     frame->init();
-    FrameLoader* loader = frame->loader();
+    FrameLoader& loader = frame->loader();
     frame->view()->setCanHaveScrollbars(false);
     frame->view()->setTransparent(true);
-    ASSERT(loader->activeDocumentLoader());
-    loader->activeDocumentLoader()->writer()->setMIMEType("text/html");
-    loader->activeDocumentLoader()->writer()->begin();
-    loader->activeDocumentLoader()->writer()->addData(reinterpret_cast<const char*>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html));
-    loader->activeDocumentLoader()->writer()->end();
+    ASSERT(loader.activeDocumentLoader());
+    loader.activeDocumentLoader()->writer()->setMIMEType("text/html");
+    loader.activeDocumentLoader()->writer()->begin();
+    loader.activeDocumentLoader()->writer()->addData(reinterpret_cast<const char*>(InspectorOverlayPage_html), sizeof(InspectorOverlayPage_html));
+    loader.activeDocumentLoader()->writer()->end();
 
 #if OS(WINDOWS)
     evaluateInOverlay("setPlatform", "windows");
index 517b11f..c43028b 100644 (file)
@@ -215,7 +215,7 @@ bool InspectorPageAgent::cachedResourceContent(CachedResource* cachedResource, S
 
 bool InspectorPageAgent::mainResourceContent(Frame* frame, bool withBase64Encode, String* result)
 {
-    RefPtr<ResourceBuffer> buffer = frame->loader()->documentLoader()->mainResourceData();
+    RefPtr<ResourceBuffer> buffer = frame->loader().documentLoader()->mainResourceData();
     if (!buffer)
         return false;
     String textEncodingName = frame->document()->inputEncoding();
@@ -494,14 +494,14 @@ void InspectorPageAgent::reload(ErrorString*, const bool* const optionalIgnoreCa
 {
     m_pendingScriptToEvaluateOnLoadOnce = optionalScriptToEvaluateOnLoad ? *optionalScriptToEvaluateOnLoad : "";
     m_pendingScriptPreprocessor = optionalScriptPreprocessor ? *optionalScriptPreprocessor : "";
-    m_page->mainFrame()->loader()->reload(optionalIgnoreCache ? *optionalIgnoreCache : false);
+    m_page->mainFrame()->loader().reload(optionalIgnoreCache ? *optionalIgnoreCache : false);
 }
 
 void InspectorPageAgent::navigate(ErrorString*, const String& url)
 {
     UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
     Frame* frame = m_page->mainFrame();
-    frame->loader()->changeLocation(frame->document()->securityOrigin(), frame->document()->completeURL(url), "", false, false);
+    frame->loader().changeLocation(frame->document()->securityOrigin(), frame->document()->completeURL(url), "", false, false);
 }
 
 static PassRefPtr<TypeBuilder::Page::Cookie> buildObjectForCookie(const Cookie& cookie)
@@ -563,7 +563,7 @@ static Vector<KURL> allResourcesURLsForFrame(Frame* frame)
 {
     Vector<KURL> result;
 
-    result.append(frame->loader()->documentLoader()->url());
+    result.append(frame->loader().documentLoader()->url());
 
     Vector<CachedResource*> allResources = cachedResourcesForFrame(frame);
     for (Vector<CachedResource*>::const_iterator it = allResources.begin(); it != allResources.end(); ++it)
@@ -659,13 +659,15 @@ void InspectorPageAgent::searchInResource(ErrorString*, const String& frameId, c
     bool caseSensitive = optionalCaseSensitive ? *optionalCaseSensitive : false;
 
     Frame* frame = frameForId(frameId);
-    KURL kurl(ParsedURLString, url);
+    if (!frame)
+        return;
 
-    FrameLoader* frameLoader = frame ? frame->loader() : 0;
-    DocumentLoader* loader = frameLoader ? frameLoader->documentLoader() : 0;
+    DocumentLoader* loader = frame->loader().documentLoader();
     if (!loader)
         return;
 
+    KURL kurl(ParsedURLString, url);
+
     String content;
     bool success = false;
     if (equalIgnoringFragmentIdentifier(kurl, loader->url()))
@@ -984,8 +986,8 @@ Frame* InspectorPageAgent::assertFrame(ErrorString* errorString, const String& f
 // static
 DocumentLoader* InspectorPageAgent::assertDocumentLoader(ErrorString* errorString, Frame* frame)
 {
-    FrameLoader* frameLoader = frame->loader();
-    DocumentLoader* documentLoader = frameLoader ? frameLoader->documentLoader() : 0;
+    FrameLoader& frameLoader = frame->loader();
+    DocumentLoader* documentLoader = frameLoader.documentLoader();
     if (!documentLoader)
         *errorString = "No documentLoader for given frame found";
     return documentLoader;
@@ -1102,9 +1104,9 @@ PassRefPtr<TypeBuilder::Page::Frame> InspectorPageAgent::buildObjectForFrame(Fra
 {
     RefPtr<TypeBuilder::Page::Frame> frameObject = TypeBuilder::Page::Frame::create()
         .setId(frameId(frame))
-        .setLoaderId(loaderId(frame->loader()->documentLoader()))
+        .setLoaderId(loaderId(frame->loader().documentLoader()))
         .setUrl(frame->document()->url().string())
-        .setMimeType(frame->loader()->documentLoader()->responseMIMEType())
+        .setMimeType(frame->loader().documentLoader()->responseMIMEType())
         .setSecurityOrigin(frame->document()->securityOrigin()->toRawString());
     if (frame->tree()->parent())
         frameObject->setParentId(frameId(frame->tree()->parent()));
index 5c8c1be..3f4ee4e 100644 (file)
@@ -322,8 +322,8 @@ void InspectorResourceAgent::didFailLoading(unsigned long identifier, DocumentLo
 
     if (m_resourcesData->resourceType(requestId) == InspectorPageAgent::DocumentResource) {
         Frame* frame = loader ? loader->frame() : 0;
-        if (frame && frame->loader()->documentLoader() && frame->document()) {
-            RefPtr<ResourceBuffer> buffer = frame->loader()->documentLoader()->mainResourceData();
+        if (frame && frame->loader().documentLoader() && frame->document()) {
+            RefPtr<ResourceBuffer> buffer = frame->loader().documentLoader()->mainResourceData();
             m_resourcesData->addResourceSharedBuffer(requestId, buffer ? buffer->sharedBuffer() : 0, frame->document()->inputEncoding());
         }
     }
index 98f8741..9cb1dce 100644 (file)
@@ -44,10 +44,8 @@ static NetworkingContext* networkingContext(const Document* document)
     Frame* frame = document->frame();
     if (!frame)
         return 0;
-    FrameLoader* loader = frame->loader();
-    if (!loader)
-        return 0;
-    return loader->networkingContext();
+
+    return frame->loader().networkingContext();
 }
 
 #if PLATFORM(MAC) || USE(CFNETWORK) || USE(SOUP)
index 27d330c..a7e6139 100644 (file)
@@ -126,7 +126,7 @@ FrameLoader* DocumentLoader::frameLoader() const
 {
     if (!m_frame)
         return 0;
-    return m_frame->loader();
+    return &m_frame->loader();
 }
 
 ResourceLoader* DocumentLoader::mainResourceLoader() const
@@ -157,7 +157,7 @@ PassRefPtr<ResourceBuffer> DocumentLoader::mainResourceData() const
 
 Document* DocumentLoader::document() const
 {
-    if (m_frame && m_frame->loader()->documentLoader() == this)
+    if (m_frame && m_frame->loader().documentLoader() == this)
         return m_frame->document();
     return 0;
 }
@@ -262,7 +262,7 @@ void DocumentLoader::stopLoading()
         Document* doc = m_frame->document();
         
         if (loading || doc->parsing())
-            m_frame->loader()->stopLoading(UnloadEventPolicyNone);
+            m_frame->loader().stopLoading(UnloadEventPolicyNone);
     }
 
     // Always cancel multipart loaders
@@ -1317,7 +1317,7 @@ void DocumentLoader::removeSubresourceLoader(ResourceLoader* loader)
     m_subresourceLoaders.remove(it);
     checkLoadComplete();
     if (Frame* frame = m_frame)
-        frame->loader()->checkLoadComplete();
+        frame->loader().checkLoadComplete();
 }
 
 void DocumentLoader::addPlugInStreamLoader(ResourceLoader* loader)
@@ -1452,7 +1452,7 @@ void DocumentLoader::subresourceLoaderFinishedLoadingOnePart(ResourceLoader* loa
     m_subresourceLoaders.remove(loader);
     checkLoadComplete();
     if (Frame* frame = m_frame)
-        frame->loader()->checkLoadComplete();    
+        frame->loader().checkLoadComplete();    
 }
 
 void DocumentLoader::maybeFinishLoadingMultipartContent()
@@ -1469,7 +1469,7 @@ void DocumentLoader::maybeFinishLoadingMultipartContent()
 void DocumentLoader::iconLoadDecisionAvailable()
 {
     if (m_frame)
-        m_frame->loader()->icon()->loadDecisionReceived(iconDatabase().synchronousLoadDecisionForIconURL(frameLoader()->icon()->url(), this));
+        m_frame->loader().icon()->loadDecisionReceived(iconDatabase().synchronousLoadDecisionForIconURL(frameLoader()->icon()->url(), this));
 }
 
 static void iconLoadDecisionCallback(IconLoadDecision decision, void* context)
@@ -1490,7 +1490,7 @@ void DocumentLoader::continueIconLoadWithDecision(IconLoadDecision decision)
     ASSERT(m_iconLoadDecisionCallback);
     m_iconLoadDecisionCallback = 0;
     if (m_frame)
-        m_frame->loader()->icon()->continueLoadWithDecision(decision);
+        m_frame->loader().icon()->continueLoadWithDecision(decision);
 }
 
 static void iconDataCallback(SharedBuffer*, void*)
index e8fe018..c924853 100644 (file)
@@ -247,7 +247,7 @@ void DocumentThreadableLoader::didReceiveResponse(unsigned long identifier, cons
     String accessControlErrorDescription;
     if (m_actualRequest) {
 #if ENABLE(INSPECTOR)
-        DocumentLoader* loader = m_document->frame()->loader()->documentLoader();
+        DocumentLoader* loader = m_document->frame()->loader().documentLoader();
         InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceResponse(m_document->frame(), identifier, response);
         InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loader, response, 0);
 #endif
@@ -314,7 +314,7 @@ void DocumentThreadableLoader::didFinishLoading(unsigned long identifier, double
 {
     if (m_actualRequest) {
 #if ENABLE(INSPECTOR)
-        InspectorInstrumentation::didFinishLoading(m_document->frame(), m_document->frame()->loader()->documentLoader(), identifier, finishTime);
+        InspectorInstrumentation::didFinishLoading(m_document->frame(), m_document->frame()->loader().documentLoader(), identifier, finishTime);
 #endif
         ASSERT(!m_sameOriginRequest);
         ASSERT(m_options.crossOriginRequestPolicy == UseAccessControl);
@@ -327,7 +327,7 @@ void DocumentThreadableLoader::didFail(unsigned long identifier, const ResourceE
 {
 #if ENABLE(INSPECTOR)
     if (m_actualRequest)
-        InspectorInstrumentation::didFailLoading(m_document->frame(), m_document->frame()->loader()->documentLoader(), identifier, error);
+        InspectorInstrumentation::didFailLoading(m_document->frame(), m_document->frame()->loader().documentLoader(), identifier, error);
 #endif
 
     m_client->didFail(error);
@@ -351,7 +351,7 @@ void DocumentThreadableLoader::preflightFailure(unsigned long identifier, const
     ResourceError error(errorDomainWebKitInternal, 0, url, errorDescription);
 #if ENABLE(INSPECTOR)
     if (m_actualRequest)
-        InspectorInstrumentation::didFailLoading(m_document->frame(), m_document->frame()->loader()->documentLoader(), identifier, error);
+        InspectorInstrumentation::didFailLoading(m_document->frame(), m_document->frame()->loader().documentLoader(), identifier, error);
 #endif
     m_actualRequest = nullptr; // Prevent didFinishLoading() from bypassing access check.
     m_client->didFailAccessControlCheck(error);
@@ -400,7 +400,7 @@ void DocumentThreadableLoader::loadRequest(const ResourceRequest& request, Secur
     ResourceResponse response;
     unsigned long identifier = std::numeric_limits<unsigned long>::max();
     if (m_document->frame())
-        identifier = m_document->frame()->loader()->loadResourceSynchronously(request, m_options.allowCredentials, m_options.clientCredentialPolicy, error, response, data);
+        identifier = m_document->frame()->loader().loadResourceSynchronously(request, m_options.allowCredentials, m_options.clientCredentialPolicy, error, response, data);
 
     InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient(m_document, identifier, m_client);
 
index 89e989d..3b97dfb 100644 (file)
@@ -67,7 +67,7 @@ DocumentWriter::DocumentWriter(Frame* frame)
 // This is the <iframe src="javascript:'html'"> case.
 void DocumentWriter::replaceDocument(const String& source, Document* ownerDocument)
 {
-    m_frame->loader()->stopAllLoaders();
+    m_frame->loader().stopAllLoaders();
     begin(m_frame->document()->url(), true, ownerDocument);
 
     if (!source.isNull()) {
@@ -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());
 }
@@ -129,19 +129,19 @@ void DocumentWriter::begin(const KURL& urlReference, bool dispatch, Document* ow
 
     // FIXME: Do we need to consult the content security policy here about blocked plug-ins?
 
-    bool shouldReuseDefaultView = m_frame->loader()->stateMachine()->isDisplayingInitialEmptyDocument() && m_frame->document()->isSecureTransitionTo(url);
+    bool shouldReuseDefaultView = m_frame->loader().stateMachine()->isDisplayingInitialEmptyDocument() && m_frame->document()->isSecureTransitionTo(url);
     if (shouldReuseDefaultView)
         document->takeDOMWindowFrom(m_frame->document());
     else
         document->createDOMWindow();
 
-    m_frame->loader()->clear(document.get(), !shouldReuseDefaultView, !shouldReuseDefaultView);
+    m_frame->loader().clear(document.get(), !shouldReuseDefaultView, !shouldReuseDefaultView);
     clear();
 
     if (!shouldReuseDefaultView)
         m_frame->script()->updatePlatformScriptObjects();
 
-    m_frame->loader()->setOutgoingReferrer(url);
+    m_frame->loader().setOutgoingReferrer(url);
     m_frame->setDocument(document);
 
     if (m_decoder)
@@ -151,7 +151,7 @@ void DocumentWriter::begin(const KURL& urlReference, bool dispatch, Document* ow
         document->setSecurityOrigin(ownerDocument->securityOrigin());
     }
 
-    m_frame->loader()->didBeginDocument(dispatch);
+    m_frame->loader().didBeginDocument(dispatch);
 
     document->implicitOpen();
 
@@ -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 bddd460..a65e6c4 100644 (file)
@@ -248,7 +248,7 @@ FrameLoader::~FrameLoader()
 
     HashSet<Frame*>::iterator end = m_openedFrames.end();
     for (HashSet<Frame*>::iterator it = m_openedFrames.begin(); it != end; ++it)
-        (*it)->loader()->m_opener = 0;
+        (*it)->loader().m_opener = 0;
 
     m_client->frameLoaderDestroyed();
 
@@ -742,7 +742,7 @@ void FrameLoader::loadDone()
 bool FrameLoader::allChildrenAreComplete() const
 {
     for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling()) {
-        if (!child->loader()->m_isComplete)
+        if (!child->loader().m_isComplete)
             return false;
     }
     return true;
@@ -751,7 +751,7 @@ bool FrameLoader::allChildrenAreComplete() const
 bool FrameLoader::allAncestorsAreComplete() const
 {
     for (Frame* ancestor = m_frame; ancestor; ancestor = ancestor->tree()->parent()) {
-        if (!ancestor->loader()->m_isComplete)
+        if (!ancestor->loader().m_isComplete)
             return false;
     }
     return true;
@@ -857,7 +857,7 @@ void FrameLoader::loadURLIntoChildFrame(const KURL& url, const String& referer,
 #if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
     RefPtr<Archive> subframeArchive = activeDocumentLoader()->popArchiveForSubframe(childFrame->tree()->uniqueName(), url);    
     if (subframeArchive) {
-        childFrame->loader()->loadArchive(subframeArchive.release());
+        childFrame->loader().loadArchive(subframeArchive.release());
         return;
     }
 #endif // ENABLE(WEB_ARCHIVE)
@@ -869,12 +869,12 @@ void FrameLoader::loadURLIntoChildFrame(const KURL& url, const String& referer,
         && !m_frame->document()->loadEventFinished()) {
         HistoryItem* childItem = parentItem->childItemWithTarget(childFrame->tree()->uniqueName());
         if (childItem) {
-            childFrame->loader()->loadDifferentDocumentItem(childItem, loadType(), MayAttemptCacheOnlyLoadForFormSubmissionItem);
+            childFrame->loader().loadDifferentDocumentItem(childItem, loadType(), MayAttemptCacheOnlyLoadForFormSubmissionItem);
             return;
         }
     }
 
-    childFrame->loader()->loadURL(url, referer, "_self", false, FrameLoadTypeRedirectWithLockedBackForwardList, 0, 0);
+    childFrame->loader().loadURL(url, referer, "_self", false, FrameLoadTypeRedirectWithLockedBackForwardList, 0, 0);
 }
 
 #if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML)
@@ -944,7 +944,7 @@ String FrameLoader::outgoingReferrer() const
         // because they need to be contained in iframes with the srcdoc.
         ASSERT(frame);
     }
-    return frame->loader()->m_outgoingReferrer;
+    return frame->loader().m_outgoingReferrer;
 }
 
 String FrameLoader::outgoingOrigin() const
@@ -971,9 +971,9 @@ void FrameLoader::setOpener(Frame* opener)
         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())
@@ -1096,7 +1096,7 @@ void FrameLoader::completed()
         descendant->navigationScheduler()->startTimer();
 
     if (Frame* parent = m_frame->tree()->parent())
-        parent->loader()->checkCompleted();
+        parent->loader().checkCompleted();
 
     if (m_frame->view())
         m_frame->view()->maintainScrollPositionAtAnchor(0);
@@ -1108,7 +1108,7 @@ 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())
-        frame->loader()->m_isComplete = false;
+        frame->loader().m_isComplete = false;
 }
 
 void FrameLoader::prepareForHistoryNavigation()
@@ -1191,7 +1191,7 @@ void FrameLoader::loadFrameRequest(const FrameLoadRequest& request, bool lockHis
     Frame* sourceFrame = formState ? formState->sourceDocument()->frame() : m_frame;
     if (!sourceFrame)
         sourceFrame = m_frame;
-    Frame* targetFrame = sourceFrame->loader()->findFrameForNavigation(request.frameName());
+    Frame* targetFrame = sourceFrame->loader().findFrameForNavigation(request.frameName());
     if (targetFrame && targetFrame != sourceFrame) {
         if (Page* page = targetFrame->page())
             page->chrome().focus();
@@ -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) {
-        targetFrame->loader()->loadURL(newURL, referrer, "_self", lockHistory, newLoadType, event, formState.release());
+        targetFrame->loader().loadURL(newURL, referrer, "_self", lockHistory, newLoadType, event, formState.release());
         return;
     }
 
@@ -1292,8 +1292,8 @@ void FrameLoader::load(const FrameLoadRequest& passedRequest)
         Frame* frame = findFrameForNavigation(request.frameName());
         if (frame) {
             request.setShouldCheckNewWindowPolicy(false);
-            if (frame->loader() != this) {
-                frame->loader()->load(request);
+            if (&frame->loader() != this) {
+                frame->loader().load(request);
                 return;
             }
         }
@@ -1398,7 +1398,7 @@ void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType t
             callContinueFragmentScrollAfterNavigationPolicy, this);
     } else {
         if (Frame* parent = m_frame->tree()->parent())
-            loader->setOverrideEncoding(parent->loader()->documentLoader()->overrideEncoding());
+            loader->setOverrideEncoding(parent->loader().documentLoader()->overrideEncoding());
 
         policyChecker()->stopCheck();
         setPolicyDocumentLoader(loader);
@@ -1575,7 +1575,7 @@ void FrameLoader::stopAllLoaders(ClearProvisionalItemPolicy clearProvisionalItem
         history()->setProvisionalItem(0);
 
     for (RefPtr<Frame> child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
-        child->loader()->stopAllLoaders(clearProvisionalItemPolicy);
+        child->loader().stopAllLoaders(clearProvisionalItemPolicy);
     if (m_provisionalDocumentLoader)
         m_provisionalDocumentLoader->stopLoading();
     if (m_documentLoader)
@@ -1950,7 +1950,7 @@ void FrameLoader::closeOldDataSources()
     // 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())
-        child->loader()->closeOldDataSources();
+        child->loader().closeOldDataSources();
     
     if (m_documentLoader)
         m_client->dispatchWillClose();
@@ -2049,14 +2049,14 @@ 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()) {
-        FrameLoader* childLoader = child->loader();
-        DocumentLoader* documentLoader = childLoader->documentLoader();
+        FrameLoader& childLoader = child->loader();
+        DocumentLoader* documentLoader = childLoader.documentLoader();
         if (documentLoader && documentLoader->isLoadingInAPISense())
             return true;
-        documentLoader = childLoader->provisionalDocumentLoader();
+        documentLoader = childLoader.provisionalDocumentLoader();
         if (documentLoader && documentLoader->isLoadingInAPISense())
             return true;
-        documentLoader = childLoader->policyDocumentLoader();
+        documentLoader = childLoader.policyDocumentLoader();
         if (documentLoader)
             return true;
     }
@@ -2082,7 +2082,7 @@ CachePolicy FrameLoader::subresourceCachePolicy() const
         return CachePolicyReload;
 
     if (Frame* parentFrame = m_frame->tree()->parent()) {
-        CachePolicy parentCachePolicy = parentFrame->loader()->subresourceCachePolicy();
+        CachePolicy parentCachePolicy = parentFrame->loader().subresourceCachePolicy();
         if (parentCachePolicy != CachePolicyVerify)
             return parentCachePolicy;
     }
@@ -2125,7 +2125,7 @@ void FrameLoader::checkLoadCompleteForThisFrame()
             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();
+                    item = page->mainFrame()->loader().history()->currentItem();
                 
             // Only reset if we aren't already going to a new provisional item.
             bool shouldReset = !history()->provisionalItem();
@@ -2153,7 +2153,7 @@ void FrameLoader::checkLoadCompleteForThisFrame()
             if (shouldReset && item)
                 if (Page* page = m_frame->page()) {
                     page->backForward()->setCurrentItem(item.get());
-                    m_frame->loader()->client()->updateGlobalHistoryItemForPage();
+                    m_frame->loader().client()->updateGlobalHistoryItemForPage();
                 }
             return;
         }
@@ -2329,7 +2329,7 @@ void FrameLoader::detachChildren()
         childrenToDetach.append(child);
     FrameVector::iterator end = childrenToDetach.end();
     for (FrameVector::iterator it = childrenToDetach.begin(); it != end; ++it)
-        (*it)->loader()->detachFromParent();
+        (*it)->loader().detachFromParent();
 }
 
 void FrameLoader::closeAndRemoveChild(Frame* child)
@@ -2360,7 +2360,7 @@ void FrameLoader::checkLoadComplete()
             frames.append(frame);
         // To process children before their parents, iterate the vector backwards.
         for (size_t i = frames.size(); i; --i)
-            frames[i - 1]->loader()->checkLoadCompleteForThisFrame();
+            frames[i - 1]->loader().checkLoadCompleteForThisFrame();
     }
 }
 
@@ -2416,8 +2416,8 @@ void FrameLoader::detachFromParent()
     m_progressTracker.clear();
 
     if (Frame* parent = m_frame->tree()->parent()) {
-        parent->loader()->closeAndRemoveChild(m_frame);
-        parent->loader()->scheduleCheckCompleted();
+        parent->loader().closeAndRemoveChild(m_frame);
+        parent->loader().scheduleCheckCompleted();
     } else {
         m_frame->setView(0);
         m_frame->willDetachPage();
@@ -2563,7 +2563,7 @@ void FrameLoader::loadPostRequest(const ResourceRequest& inRequest, const String
     if (!frameName.isEmpty()) {
         // The search for a target frame is done earlier in the case of form submission.
         if (Frame* targetFrame = formState ? 0 : findFrameForNavigation(frameName))
-            targetFrame->loader()->loadWithNavigationAction(workingResourceRequest, action, lockHistory, loadType, formState.release());
+            targetFrame->loader().loadWithNavigationAction(workingResourceRequest, action, lockHistory, loadType, formState.release());
         else
             policyChecker()->checkNewWindowPolicy(action, FrameLoader::callContinueLoadAfterNewWindowPolicy, workingResourceRequest, formState.release(), frameName, this);
     } else {
@@ -2591,7 +2591,7 @@ unsigned long FrameLoader::loadResourceSynchronously(const ResourceRequest& requ
     addHTTPOriginIfNeeded(initialRequest, outgoingOrigin());
 
     if (Page* page = m_frame->page())
-        initialRequest.setFirstPartyForCookies(page->mainFrame()->loader()->documentLoader()->request().url());
+        initialRequest.setFirstPartyForCookies(page->mainFrame()->loader().documentLoader()->request().url());
     
     addExtraFieldsToSubresourceRequest(initialRequest);
 
@@ -2740,7 +2740,7 @@ bool FrameLoader::shouldClose()
         for (i = 0; i < targetFrames.size(); i++) {
             if (!targetFrames[i]->tree()->isDescendantOf(m_frame))
                 continue;
-            if (!targetFrames[i]->loader()->handleBeforeUnloadEvent(page->chrome(), this))
+            if (!targetFrames[i]->loader().handleBeforeUnloadEvent(page->chrome(), this))
                 break;
         }
 
@@ -2801,7 +2801,7 @@ bool FrameLoader::handleBeforeUnloadEvent(Chrome& chrome, FrameLoader* frameLoad
                 return true;
             }
             
-            if (parentFrame->loader() == frameLoaderBeingNavigated)
+            if (&parentFrame->loader() == frameLoaderBeingNavigated)
                 break;
             
             parentFrame = parentFrame->tree()->parent();
@@ -2809,7 +2809,7 @@ bool FrameLoader::handleBeforeUnloadEvent(Chrome& chrome, FrameLoader* frameLoad
         
         // The navigatingFrameLoader should always be in our ancestory.
         ASSERT(parentFrame);
-        ASSERT(parentFrame->loader() == frameLoaderBeingNavigated);
+        ASSERT(&parentFrame->loader() == frameLoaderBeingNavigated);
     }
 
     frameLoaderBeingNavigated->m_currentNavigationHasShownBeforeUnloadConfirmPanel = true;
@@ -2847,9 +2847,9 @@ void FrameLoader::continueLoadAfterNavigationPolicy(const ResourceRequest&, Pass
         if ((isTargetItem || isLoadingMainFrame()) && isBackForwardLoadType(policyChecker()->loadType())) {
             if (Page* page = m_frame->page()) {
                 Frame* mainFrame = page->mainFrame();
-                if (HistoryItem* resetItem = mainFrame->loader()->history()->currentItem()) {
+                if (HistoryItem* resetItem = mainFrame->loader().history()->currentItem()) {
                     page->backForward()->setCurrentItem(resetItem);
-                    m_frame->loader()->client()->updateGlobalHistoryItemForPage();
+                    m_frame->loader().client()->updateGlobalHistoryItemForPage();
                 }
             }
         }
@@ -2911,12 +2911,12 @@ 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->loader().setOpener(frame.get());
         mainFrame->document()->setReferrerPolicy(frame->document()->referrerPolicy());
     }
-    mainFrame->loader()->loadWithNavigationAction(request, NavigationAction(request), false, FrameLoadTypeStandard, formState);
+    mainFrame->loader().loadWithNavigationAction(request, NavigationAction(request), false, FrameLoadTypeStandard, formState);
 }
 
 void FrameLoader::requestFromDelegate(ResourceRequest& request, unsigned long& identifier, ResourceError& error)
@@ -3398,7 +3398,7 @@ PassRefPtr<Frame> createWindow(Frame* openerFrame, Frame* lookupFrame, const Fra
     ASSERT(!features.dialog || request.frameName().isEmpty());
 
     if (!request.frameName().isEmpty() && request.frameName() != "_blank") {
-        if (Frame* frame = lookupFrame->loader()->findFrameForNavigation(request.frameName(), openerFrame->document())) {
+        if (Frame* frame = lookupFrame->loader().findFrameForNavigation(request.frameName(), openerFrame->document())) {
             if (request.frameName() != "_self") {
                 if (Page* page = frame->page())
                     page->chrome().focus();
@@ -3417,10 +3417,10 @@ PassRefPtr<Frame> createWindow(Frame* openerFrame, Frame* lookupFrame, const Fra
 
     // FIXME: Setting the referrer should be the caller's responsibility.
     FrameLoadRequest requestWithReferrer = request;
-    String referrer = SecurityPolicy::generateReferrerHeader(openerFrame->document()->referrerPolicy(), request.resourceRequest().url(), openerFrame->loader()->outgoingReferrer());
+    String referrer = SecurityPolicy::generateReferrerHeader(openerFrame->document()->referrerPolicy(), request.resourceRequest().url(), openerFrame->loader().outgoingReferrer());
     if (!referrer.isEmpty())
         requestWithReferrer.resourceRequest().setHTTPReferrer(referrer);
-    FrameLoader::addHTTPOriginIfNeeded(requestWithReferrer.resourceRequest(), openerFrame->loader()->outgoingOrigin());
+    FrameLoader::addHTTPOriginIfNeeded(requestWithReferrer.resourceRequest(), openerFrame->loader().outgoingOrigin());
 
     if (openerFrame->settings() && !openerFrame->settings()->supportsMultipleWindows()) {
         created = false;
@@ -3438,7 +3438,7 @@ PassRefPtr<Frame> createWindow(Frame* openerFrame, Frame* lookupFrame, const Fra
 
     Frame* frame = page->mainFrame();
 
-    frame->loader()->forceSandboxFlags(openerFrame->document()->sandboxFlags());
+    frame->loader().forceSandboxFlags(openerFrame->document()->sandboxFlags());
 
     if (request.frameName() != "_blank")
         frame->tree()->setName(request.frameName());
index 1f5e185..9d7d522 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()
@@ -110,7 +110,7 @@ void HistoryController::clearScrollPositionAndViewState()
 */
 void HistoryController::restoreScrollPositionAndViewState()
 {
-    if (!m_frame->loader()->stateMachine()->committedFirstRealDocumentLoad())
+    if (!m_frame->loader().stateMachine()->committedFirstRealDocumentLoad())
         return;
 
     ASSERT(m_currentItem);
@@ -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
@@ -157,7 +157,7 @@ void HistoryController::saveDocumentState()
 {
     // FIXME: Reading this bit of FrameLoader state here is unfortunate.  I need to study
     // this more to see if we can remove this dependency.
-    if (m_frame->loader()->stateMachine()->creatingInitialEmptyDocument())
+    if (m_frame->loader().stateMachine()->creatingInitialEmptyDocument())
         return;
 
     // For a standard page load, we will have a previous item set, which will be used to
@@ -189,8 +189,8 @@ void HistoryController::saveDocumentState()
 void HistoryController::saveDocumentAndScrollState()
 {
     for (Frame* frame = m_frame; frame; frame = frame->tree()->traverseNext(m_frame)) {
-        frame->loader()->history()->saveDocumentState();
-        frame->loader()->history()->saveScrollPositionAndViewStateToItem(frame->loader()->history()->currentItem());
+        frame->loader().history()->saveDocumentState();
+        frame->loader().history()->saveScrollPositionAndViewStateToItem(frame->loader().history()->currentItem());
     }
 }
 
@@ -201,7 +201,7 @@ static inline bool isAssociatedToRequestedHistoryItem(const HistoryItem* current
     if (requested)
         return false;
     while ((frame = frame->tree()->parent())) {
-        requested = frame->loader()->requestedHistoryItem();
+        requested = frame->loader().requestedHistoryItem();
         if (!requested)
             continue;
         if (requested->isAncestorOf(current))
@@ -216,7 +216,7 @@ void HistoryController::restoreDocumentState()
         
     HistoryItem* itemToRestore = 0;
     
-    switch (m_frame->loader()->loadType()) {
+    switch (m_frame->loader().loadType()) {
         case FrameLoadTypeReload:
         case FrameLoadTypeReloadFromOrigin:
         case FrameLoadTypeSame:
@@ -232,7 +232,7 @@ void HistoryController::restoreDocumentState()
     
     if (!itemToRestore)
         return;
-    if (isAssociatedToRequestedHistoryItem(itemToRestore, m_frame, m_frame->loader()->requestedHistoryItem()) && !m_frame->loader()->documentLoader()->isClientRedirect()) {
+    if (isAssociatedToRequestedHistoryItem(itemToRestore, m_frame, m_frame->loader().requestedHistoryItem()) && !m_frame->loader().documentLoader()->isClientRedirect()) {
         LOG(Loading, "WebCoreLoading %s: restoring form state from %p", m_frame->tree()->uniqueName().string().utf8().data(), itemToRestore);
         doc->setStateForNewFormElements(itemToRestore->documentState());
     }
@@ -266,7 +266,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)
@@ -282,7 +282,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;
@@ -295,7 +295,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
@@ -318,8 +318,8 @@ void HistoryController::setDefersLoading(bool defer)
 void HistoryController::updateForBackForwardNavigation()
 {
 #if !LOG_DISABLED
-    if (m_frame->loader()->documentLoader())
-        LOG(History, "WebCoreHistory: Updating History for back/forward navigation in frame %s", m_frame->loader()->documentLoader()->title().string().utf8().data());
+    if (m_frame->loader().documentLoader())
+        LOG(History, "WebCoreHistory: Updating History for back/forward navigation in frame %s", m_frame->loader().documentLoader()->title().string().utf8().data());
 #endif
 
     // Must grab the current scroll position before disturbing it
@@ -334,14 +334,14 @@ void HistoryController::updateForBackForwardNavigation()
 void HistoryController::updateForReload()
 {
 #if !LOG_DISABLED
-    if (m_frame->loader()->documentLoader())
-        LOG(History, "WebCoreHistory: Updating History for reload in frame %s", m_frame->loader()->documentLoader()->title().string().utf8().data());
+    if (m_frame->loader().documentLoader())
+        LOG(History, "WebCoreHistory: Updating History for reload in frame %s", m_frame->loader().documentLoader()->title().string().utf8().data());
 #endif
 
     if (m_currentItem) {
         pageCache()->remove(m_currentItem.get());
     
-        if (m_frame->loader()->loadType() == FrameLoadTypeReload || m_frame->loader()->loadType() == FrameLoadTypeReloadFromOrigin)
+        if (m_frame->loader().loadType() == FrameLoadTypeReload || m_frame->loader().loadType() == FrameLoadTypeReloadFromOrigin)
             saveScrollPositionAndViewStateToItem(m_currentItem.get());
     }
 
@@ -358,26 +358,26 @@ void HistoryController::updateForReload()
 
 void HistoryController::updateForStandardLoad(HistoryUpdateType updateType)
 {
-    LOG(History, "WebCoreHistory: Updating History for Standard Load in frame %s", m_frame->loader()->documentLoader()->url().string().ascii().data());
+    LOG(History, "WebCoreHistory: Updating History for Standard Load in frame %s", m_frame->loader().documentLoader()->url().string().ascii().data());
 
-    FrameLoader* frameLoader = m_frame->loader();
+    FrameLoader& frameLoader = m_frame->loader();
 
     Settings* settings = m_frame->settings();
     bool needPrivacy = !settings || settings->privateBrowsingEnabled();
-    const KURL& historyURL = frameLoader->documentLoader()->urlForHistory();
+    const KURL& historyURL = frameLoader.documentLoader()->urlForHistory();
 
-    if (!frameLoader->documentLoader()->isClientRedirect()) {
+    if (!frameLoader.documentLoader()->isClientRedirect()) {
         if (!historyURL.isEmpty()) {
             if (updateType != UpdateAllExceptBackForwardList)
                 updateBackForwardListClippedAtTarget(true);
             if (!needPrivacy) {
-                frameLoader->client()->updateGlobalHistory();
-                frameLoader->documentLoader()->setDidCreateGlobalHistoryEntry(true);
-                if (frameLoader->documentLoader()->unreachableURL().isEmpty())
-                    frameLoader->client()->updateGlobalHistoryRedirectLinks();
+                frameLoader.client()->updateGlobalHistory();
+                frameLoader.documentLoader()->setDidCreateGlobalHistoryEntry(true);
+                if (frameLoader.documentLoader()->unreachableURL().isEmpty())
+                    frameLoader.client()->updateGlobalHistoryRedirectLinks();
             }
 
-            m_frame->loader()->client()->updateGlobalHistoryItemForPage();
+            m_frame->loader().client()->updateGlobalHistoryItemForPage();
         }
     } else {
         // The client redirect replaces the current history item.
@@ -388,58 +388,58 @@ void HistoryController::updateForStandardLoad(HistoryUpdateType updateType)
         if (Page* page = m_frame->page())
             addVisitedLink(page, historyURL);
 
-        if (!frameLoader->documentLoader()->didCreateGlobalHistoryEntry() && frameLoader->documentLoader()->unreachableURL().isEmpty() && !m_frame->document()->url().isEmpty())
-            frameLoader->client()->updateGlobalHistoryRedirectLinks();
+        if (!frameLoader.documentLoader()->didCreateGlobalHistoryEntry() && frameLoader.documentLoader()->unreachableURL().isEmpty() && !m_frame->document()->url().isEmpty())
+            frameLoader.client()->updateGlobalHistoryRedirectLinks();
     }
 }
 
 void HistoryController::updateForRedirectWithLockedBackForwardList()
 {
 #if !LOG_DISABLED
-    if (m_frame->loader()->documentLoader())
-        LOG(History, "WebCoreHistory: Updating History for redirect load in frame %s", m_frame->loader()->documentLoader()->title().string().utf8().data());
+    if (m_frame->loader().documentLoader())
+        LOG(History, "WebCoreHistory: Updating History for redirect load in frame %s", m_frame->loader().documentLoader()->title().string().utf8().data());
 #endif
     
     Settings* settings = m_frame->settings();
     bool needPrivacy = !settings || settings->privateBrowsingEnabled();
-    const KURL& historyURL = m_frame->loader()->documentLoader()->urlForHistory();
+    const KURL& historyURL = m_frame->loader().documentLoader()->urlForHistory();
 
-    if (m_frame->loader()->documentLoader()->isClientRedirect()) {
+    if (m_frame->loader().documentLoader()->isClientRedirect()) {
         if (!m_currentItem && !m_frame->tree()->parent()) {
             if (!historyURL.isEmpty()) {
                 updateBackForwardListClippedAtTarget(true);
                 if (!needPrivacy) {
-                    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()->updateGlobalHistory();
+                    m_frame->loader().documentLoader()->setDidCreateGlobalHistoryEntry(true);
+                    if (m_frame->loader().documentLoader()->unreachableURL().isEmpty())
+                        m_frame->loader().client()->updateGlobalHistoryRedirectLinks();
                 }
 
-                m_frame->loader()->client()->updateGlobalHistoryItemForPage();
+                m_frame->loader().client()->updateGlobalHistoryItemForPage();
             }
         }
         // The client redirect replaces the current history item.
         updateCurrentItem();
     } else {
         Frame* parentFrame = m_frame->tree()->parent();
-        if (parentFrame && parentFrame->loader()->history()->m_currentItem)
-            parentFrame->loader()->history()->m_currentItem->setChildItem(createItem());
+        if (parentFrame && parentFrame->loader().history()->m_currentItem)
+            parentFrame->loader().history()->m_currentItem->setChildItem(createItem());
     }
 
     if (!historyURL.isEmpty() && !needPrivacy) {
         if (Page* page = m_frame->page())
             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();
+        if (!m_frame->loader().documentLoader()->didCreateGlobalHistoryEntry() && m_frame->loader().documentLoader()->unreachableURL().isEmpty() && !m_frame->document()->url().isEmpty())
+            m_frame->loader().client()->updateGlobalHistoryRedirectLinks();
     }
 }
 
 void HistoryController::updateForClientRedirect()
 {
 #if !LOG_DISABLED
-    if (m_frame->loader()->documentLoader())
-        LOG(History, "WebCoreHistory: Updating History for client redirect in frame %s", m_frame->loader()->documentLoader()->title().string().utf8().data());
+    if (m_frame->loader().documentLoader())
+        LOG(History, "WebCoreHistory: Updating History for client redirect in frame %s", m_frame->loader().documentLoader()->title().string().utf8().data());
 #endif
 
     // Clear out form data so we don't try to restore it into the incoming page.  Must happen after
@@ -451,7 +451,7 @@ void HistoryController::updateForClientRedirect()
 
     Settings* settings = m_frame->settings();
     bool needPrivacy = !settings || settings->privateBrowsingEnabled();
-    const KURL& historyURL = m_frame->loader()->documentLoader()->urlForHistory();
+    const KURL& historyURL = m_frame->loader().documentLoader()->urlForHistory();
 
     if (!historyURL.isEmpty() && !needPrivacy) {
         if (Page* page = m_frame->page())
@@ -461,15 +461,15 @@ void HistoryController::updateForClientRedirect()
 
 void HistoryController::updateForCommit()
 {
-    FrameLoader* frameLoader = m_frame->loader();
+    FrameLoader& frameLoader = m_frame->loader();
 #if !LOG_DISABLED
-    if (frameLoader->documentLoader())
-        LOG(History, "WebCoreHistory: Updating History for commit in frame %s", frameLoader->documentLoader()->title().string().utf8().data());
+    if (frameLoader.documentLoader())
+        LOG(History, "WebCoreHistory: Updating History for commit in frame %s", frameLoader.documentLoader()->title().string().utf8().data());
 #endif
-    FrameLoadType type = frameLoader->loadType();
+    FrameLoadType type = frameLoader.loadType();
     if (isBackForwardLoadType(type)
         || isReplaceLoadTypeWithProvisionalItem(type)
-        || (isReloadTypeWithProvisionalItem(type) && !frameLoader->provisionalDocumentLoader()->unreachableURL().isEmpty())) {
+        || (isReloadTypeWithProvisionalItem(type) && !frameLoader.provisionalDocumentLoader()->unreachableURL().isEmpty())) {
         // Once committed, we want to use current item for saving DocState, and
         // the provisional item for restoring state.
         // Note previousItem must be set before we close the URL, which will
@@ -485,7 +485,7 @@ void HistoryController::updateForCommit()
         // committed) and its children (which will be replaced).
         Page* page = m_frame->page();
         ASSERT(page);
-        page->mainFrame()->loader()->history()->recursiveUpdateForCommit();
+        page->mainFrame()->loader().history()->recursiveUpdateForCommit();
     }
 }
 
@@ -534,7 +534,7 @@ void HistoryController::recursiveUpdateForCommit()
 
     // Iterate over the rest of the tree
     for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
-        child->loader()->history()->recursiveUpdateForCommit();
+        child->loader().history()->recursiveUpdateForCommit();
 }
 
 void HistoryController::updateForSameDocumentNavigation()
@@ -551,11 +551,11 @@ void HistoryController::updateForSameDocumentNavigation()
         return;
 
     addVisitedLink(page, m_frame->document()->url());
-    page->mainFrame()->loader()->history()->recursiveUpdateForSameDocumentNavigation();
+    page->mainFrame()->loader().history()->recursiveUpdateForSameDocumentNavigation();
 
     if (m_currentItem) {
         m_currentItem->setURL(m_frame->document()->url());
-        m_frame->loader()->client()->updateGlobalHistory();
+        m_frame->loader().client()->updateGlobalHistory();
     }
 }
 
@@ -579,7 +579,7 @@ void HistoryController::recursiveUpdateForSameDocumentNavigation()
 
     // Iterate over the rest of the tree.
     for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling())
-        child->loader()->history()->recursiveUpdateForSameDocumentNavigation();
+        child->loader().history()->recursiveUpdateForSameDocumentNavigation();
 }
 
 void HistoryController::updateForFrameLoadCompleted()
@@ -620,7 +620,7 @@ void HistoryController::setProvisionalItem(HistoryItem* item)
 
 void HistoryController::initializeItem(HistoryItem* item)
 {
-    DocumentLoader* documentLoader = m_frame->loader()->documentLoader();
+    DocumentLoader* documentLoader = m_frame->loader().documentLoader();
     ASSERT(documentLoader);
 
     KURL unreachableURL = documentLoader->unreachableURL();
@@ -698,15 +698,15 @@ PassRefPtr<HistoryItem> HistoryController::createItemTree(Frame* targetFrame, bo
         }
 
         for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling()) {
-            FrameLoader* childLoader = child->loader();
-            bool hasChildLoaded = childLoader->frameHasLoaded();
+            FrameLoader& childLoader = child->loader();
+            bool hasChildLoaded = childLoader.frameHasLoaded();
 
             // If the child is a frame corresponding to an <object> element that never loaded,
             // we don't want to create a history item, because that causes fallback content
             // to be ignored on reload.
             
-            if (!(!hasChildLoaded && childLoader->isHostedByObjectElement()))
-                bfItem->addChildItem(childLoader->history()->createItemTree(targetFrame, clipAtTarget));
+            if (!(!hasChildLoaded && childLoader.isHostedByObjectElement()))
+                bfItem->addChildItem(childLoader.history()->createItemTree(targetFrame, clipAtTarget));
         }
     }
     // FIXME: Eliminate the isTargetItem flag in favor of itemSequenceNumber.
@@ -737,7 +737,7 @@ void HistoryController::recursiveSetProvisionalItem(HistoryItem* item, HistoryIt
             ASSERT(fromChildItem);
             Frame* childFrame = m_frame->tree()->child(childFrameName);
             ASSERT(childFrame);
-            childFrame->loader()->history()->recursiveSetProvisionalItem(childItems[i].get(), fromChildItem, type);
+            childFrame->loader().history()->recursiveSetProvisionalItem(childItems[i].get(), fromChildItem, type);
         }
     }
 }
@@ -759,10 +759,10 @@ void HistoryController::recursiveGoToItem(HistoryItem* item, HistoryItem* fromIt
             ASSERT(fromChildItem);
             Frame* childFrame = m_frame->tree()->child(childFrameName);
             ASSERT(childFrame);
-            childFrame->loader()->history()->recursiveGoToItem(childItems[i].get(), fromChildItem, type);
+            childFrame->loader().history()->recursiveGoToItem(childItems[i].get(), fromChildItem, type);
         }
     } else {
-        m_frame->loader()->loadItem(item, type);
+        m_frame->loader().loadItem(item, type);
     }
 }
 
@@ -813,17 +813,17 @@ void HistoryController::updateBackForwardListClippedAtTarget(bool doClip)
     if (!page)
         return;
 
-    if (m_frame->loader()->documentLoader()->urlForHistory().isEmpty())
+    if (m_frame->loader().documentLoader()->urlForHistory().isEmpty())
         return;
 
     Frame* mainFrame = page->mainFrame();
     ASSERT(mainFrame);
-    FrameLoader* frameLoader = mainFrame->loader();
+    FrameLoader& frameLoader = mainFrame->loader();
 
-    frameLoader->checkDidPerformFirstNavigation();
+    frameLoader.checkDidPerformFirstNavigation();
 
-    RefPtr<HistoryItem> topItem = frameLoader->history()->createItemTree(m_frame, doClip);
-    LOG(BackForward, "WebCoreBackForward - Adding backforward item %p for frame %s", topItem.get(), m_frame->loader()->documentLoader()->url().string().ascii().data());
+    RefPtr<HistoryItem> topItem = frameLoader.history()->createItemTree(m_frame, doClip);
+    LOG(BackForward, "WebCoreBackForward - Adding backforward item %p for frame %s", topItem.get(), m_frame->loader().documentLoader()->url().string().ascii().data());
     page->backForward()->addItem(topItem.release());
 }
 
@@ -832,7 +832,7 @@ void HistoryController::updateCurrentItem()
     if (!m_currentItem)
         return;
 
-    DocumentLoader* documentLoader = m_frame->loader()->documentLoader();
+    DocumentLoader* documentLoader = m_frame->loader().documentLoader();
 
     if (!documentLoader->unreachableURL().isEmpty())
         return;
@@ -861,7 +861,7 @@ void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject,
     ASSERT(page);
 
     // Get a HistoryItem tree for the current frame tree.
-    RefPtr<HistoryItem> topItem = page->mainFrame()->loader()->history()->createItemTree(m_frame, false);
+    RefPtr<HistoryItem> topItem = page->mainFrame()->loader().history()->createItemTree(m_frame, false);
     
     // Override data in the current item (created by createItemTree) to reflect
     // the pushState() arguments.
@@ -876,7 +876,7 @@ void HistoryController::pushState(PassRefPtr<SerializedScriptValue> stateObject,
         return;
 
     addVisitedLink(page, KURL(ParsedURLString, urlString));
-    m_frame->loader()->client()->updateGlobalHistory();
+    m_frame->loader().client()->updateGlobalHistory();
 
 }
 
@@ -898,7 +898,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 4ac8c47..e8d3edd 100644 (file)
@@ -86,7 +86,7 @@ static ImageEventSender& errorEventSender()
 static inline bool pageIsBeingDismissed(Document* document)
 {
     Frame* frame = document->frame();
-    return frame && frame->loader()->pageDismissalEventBeingDispatched() != FrameLoader::NoDismissal;
+    return frame && frame->loader().pageDismissalEventBeingDispatched() != FrameLoader::NoDismissal;
 }
 
 ImageLoader::ImageLoader(Element* element)
index 08c2369..8176c02 100644 (file)
@@ -50,7 +50,7 @@ MixedContentChecker::MixedContentChecker(Frame* frame)
 
 FrameLoaderClient* MixedContentChecker::client() const
 {
-    return m_frame->loader()->client();
+    return m_frame->loader().client();
 }
 
 // static
index 5be73e1..8d08401 100644 (file)
@@ -108,7 +108,7 @@ protected:
     virtual void fire(Frame* frame)
     {
         UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
-        frame->loader()->changeLocation(m_securityOrigin.get(), KURL(ParsedURLString, m_url), m_referrer, lockHistory(), lockBackForwardList(), false);
+        frame->loader().changeLocation(m_securityOrigin.get(), KURL(ParsedURLString, m_url), m_referrer, lockHistory(), lockBackForwardList(), false);
     }
 
     virtual void didStartTimer(Frame* frame, Timer<NavigationScheduler>* timer)
@@ -118,7 +118,7 @@ protected:
         m_haveToldClient = true;
 
         UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
-        frame->loader()->clientRedirected(KURL(ParsedURLString, m_url), delay(), currentTime() + timer->nextFireInterval(), lockBackForwardList());
+        frame->loader().clientRedirected(KURL(ParsedURLString, m_url), delay(), currentTime() + timer->nextFireInterval(), lockBackForwardList());
     }
 
     virtual void didStopTimer(Frame* frame, bool newLoadInProgress)
@@ -132,7 +132,7 @@ protected:
         // fact unavailable. We need to be consistent with them, otherwise the
         // gesture state will sometimes be set and sometimes not within
         // dispatchDidCancelClientRedirect().
-        frame->loader()->clientRedirectCancelledOrFinished(newLoadInProgress);
+        frame->loader().clientRedirectCancelledOrFinished(newLoadInProgress);
     }
 
     SecurityOrigin* securityOrigin() const { return m_securityOrigin.get(); }
@@ -154,13 +154,13 @@ public:
         clearUserGesture();
     }
 
-    virtual bool shouldStartTimer(Frame* frame) { return frame->loader()->allAncestorsAreComplete(); }
+    virtual bool shouldStartTimer(Frame* frame) { return frame->loader().allAncestorsAreComplete(); }
 
     virtual void fire(Frame* frame)
     {
         UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
         bool refresh = equalIgnoringFragmentIdentifier(frame->document()->url(), KURL(ParsedURLString, url()));
-        frame->loader()->changeLocation(securityOrigin(), KURL(ParsedURLString, url()), referrer(), lockHistory(), lockBackForwardList(), refresh);
+        frame->loader().changeLocation(securityOrigin(), KURL(ParsedURLString, url()), referrer(), lockHistory(), lockBackForwardList(), refresh);
     }
 };
 
@@ -180,7 +180,7 @@ public:
     virtual void fire(Frame* frame)
     {
         UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
-        frame->loader()->changeLocation(securityOrigin(), KURL(ParsedURLString, url()), referrer(), lockHistory(), lockBackForwardList(), true);
+        frame->loader().changeLocation(securityOrigin(), KURL(ParsedURLString, url()), referrer(), lockHistory(), lockBackForwardList(), true);
     }
 };
 
@@ -199,7 +199,7 @@ public:
         if (!m_historySteps) {
             // Special case for go(0) from a frame -> reload only the frame
             // To follow Firefox and IE's behavior, history reload can only navigate the self frame.
-            frame->loader()->urlSelected(frame->document()->url(), "_self", 0, lockHistory(), lockBackForwardList(), MaybeSendReferrer);
+            frame->loader().urlSelected(frame->document()->url(), "_self", 0, lockHistory(), lockBackForwardList(), MaybeSendReferrer);
             return;
         }
         // go(i!=0) from a frame navigates into the history of the frame only,
@@ -234,7 +234,7 @@ public:
             return;
         FrameLoadRequest frameRequest(requestingDocument->securityOrigin());
         m_submission->populateFrameLoadRequest(frameRequest);
-        frame->loader()->loadFrameRequest(frameRequest, lockHistory(), lockBackForwardList(), m_submission->event(), m_submission->state(), MaybeSendReferrer);
+        frame->loader().loadFrameRequest(frameRequest, lockHistory(), lockBackForwardList(), m_submission->event(), m_submission->state(), MaybeSendReferrer);
     }
     
     virtual void didStartTimer(Frame* frame, Timer<NavigationScheduler>* timer)
@@ -244,7 +244,7 @@ public:
         m_haveToldClient = true;
 
         UserGestureIndicator gestureIndicator(wasUserGesture() ? DefinitelyProcessingUserGesture : DefinitelyNotProcessingUserGesture);
-        frame->loader()->clientRedirected(m_submission->requestURL(), delay(), currentTime() + timer->nextFireInterval(), lockBackForwardList());
+        frame->loader().clientRedirected(m_submission->requestURL(), delay(), currentTime() + timer->nextFireInterval(), lockBackForwardList());
     }
 
     virtual void didStopTimer(Frame* frame, bool newLoadInProgress)
@@ -258,7 +258,7 @@ public:
         // fact unavailable. We need to be consistent with them, otherwise the
         // gesture state will sometimes be set and sometimes not within
         // dispatchDidCancelClientRedirect().
-        frame->loader()->clientRedirectCancelledOrFinished(newLoadInProgress);
+        frame->loader().clientRedirectCancelledOrFinished(newLoadInProgress);
     }
 
 private:
@@ -322,7 +322,7 @@ bool NavigationScheduler::mustLockBackForwardList(Frame* targetFrame)
 {
     // Non-user navigation before the page has finished firing onload should not create a new back/forward item.
     // See https://webkit.org/b/42861 for the original motivation for this.    
-    if (!ScriptController::processingUserGesture() && targetFrame->loader()->documentLoader() && !targetFrame->loader()->documentLoader()->wasOnloadHandled())
+    if (!ScriptController::processingUserGesture() && targetFrame->loader().documentLoader() && !targetFrame->loader().documentLoader()->wasOnloadHandled())
         return true;
     
     // Navigation of a subframe during loading of an ancestor frame does not create a new back/forward item.
@@ -330,7 +330,7 @@ bool NavigationScheduler::mustLockBackForwardList(Frame* targetFrame)
     // See https://bugs.webkit.org/show_bug.cgi?id=14957 for the original motivation for this.
     for (Frame* ancestor = targetFrame->tree()->parent(); ancestor; ancestor = ancestor->tree()->parent()) {
         Document* document = ancestor->document();
-        if (!ancestor->loader()->isComplete() || (document && document->processingLoadEvent()))
+        if (!ancestor->loader().isComplete() || (document && document->processingLoadEvent()))
             return true;
     }
     return false;
@@ -345,19 +345,19 @@ void NavigationScheduler::scheduleLocationChange(SecurityOrigin* securityOrigin,
 
     lockBackForwardList = lockBackForwardList || mustLockBackForwardList(m_frame);
 
-    FrameLoader* loader = m_frame->loader();
+    FrameLoader& loader = m_frame->loader();
 
     // If the URL we're going to navigate to is the same as the current one, except for the
     // fragment part, we don't need to schedule the location change.
     KURL parsedURL(ParsedURLString, url);
     if (parsedURL.hasFragmentIdentifier() && equalIgnoringFragmentIdentifier(m_frame->document()->url(), parsedURL)) {
-        loader->changeLocation(securityOrigin, m_frame->document()->completeURL(url), referrer, lockHistory, lockBackForwardList);
+        loader.changeLocation(securityOrigin, m_frame->document()->completeURL(url), referrer, lockHistory, lockBackForwardList);
         return;
     }
 
     // Handle a location change of a page with no document as a special case.
     // This may happen when a frame changes the location of another frame.
-    bool duringLoad = !loader->stateMachine()->committedFirstRealDocumentLoad();
+    bool duringLoad = !loader.stateMachine()->committedFirstRealDocumentLoad();
 
     schedule(adoptPtr(new ScheduledLocationChange(securityOrigin, url, referrer, lockHistory, lockBackForwardList, duringLoad)));
 }
@@ -371,7 +371,7 @@ void NavigationScheduler::scheduleFormSubmission(PassRefPtr<FormSubmission> subm
 
     // Handle a location change of a page with no document as a special case.
     // This may happen when a frame changes the location of another frame.
-    bool duringLoad = !m_frame->loader()->stateMachine()->committedFirstRealDocumentLoad();
+    bool duringLoad = !m_frame->loader().stateMachine()->committedFirstRealDocumentLoad();
 
     // If this is a child frame and the form submission was triggered by a script, lock the back/forward list
     // to match IE and Opera.
@@ -391,7 +391,7 @@ void NavigationScheduler::scheduleRefresh()
     if (url.isEmpty())
         return;
 
-    schedule(adoptPtr(new ScheduledRefresh(m_frame->document()->securityOrigin(), url.string(), m_frame->loader()->outgoingReferrer())));
+    schedule(adoptPtr(new ScheduledRefresh(m_frame->document()->securityOrigin(), url.string(), m_frame->loader().outgoingReferrer())));
 }
 
 void NavigationScheduler::scheduleHistoryNavigation(int steps)
@@ -437,16 +437,16 @@ void NavigationScheduler::schedule(PassOwnPtr<ScheduledNavigation> redirect)
     // Otherwise when the current load transitions from a provisional to a 
     // committed state, pending redirects may be cancelled. 
     if (redirect->wasDuringLoad()) {
-        if (DocumentLoader* provisionalDocumentLoader = m_frame->loader()->provisionalDocumentLoader())
+        if (DocumentLoader* provisionalDocumentLoader = m_frame->loader().provisionalDocumentLoader())
             provisionalDocumentLoader->stopLoading();
-        m_frame->loader()->stopLoading(UnloadEventPolicyUnloadAndPageHide);   
+        m_frame->loader().stopLoading(UnloadEventPolicyUnloadAndPageHide);   
     }
 
     cancel();
     m_redirect = redirect;
 
-    if (!m_frame->loader()->isComplete() && m_redirect->isLocationChange())
-        m_frame->loader()->completed();
+    if (!m_frame->loader().isComplete() && m_redirect->isLocationChange())
+        m_frame->loader().completed();
 
     if (!m_frame->page())
         return;
index dd5bbee..0fafe1b 100644 (file)
@@ -62,10 +62,10 @@ void PingLoader::loadImage(Frame* frame, const KURL& url)
     request.setTargetType(ResourceRequest::TargetIsImage);
 #endif
     request.setHTTPHeaderField("Cache-Control", "max-age=0");
-    String referrer = SecurityPolicy::generateReferrerHeader(frame->document()->referrerPolicy(), request.url(), frame->loader()->outgoingReferrer());
+    String referrer = SecurityPolicy::generateReferrerHeader(frame->document()->referrerPolicy(), request.url(), frame->loader().outgoingReferrer());
     if (!referrer.isEmpty())
         request.setHTTPReferrer(referrer);
-    frame->loader()->addExtraFieldsToSubresourceRequest(request);
+    frame->loader().addExtraFieldsToSubresourceRequest(request);
     OwnPtr<PingLoader> pingLoader = adoptPtr(new PingLoader(frame, request));
 
     // Leak the ping loader, since it will kill itself as soon as it receives a response.
@@ -84,19 +84,19 @@ void PingLoader::sendPing(Frame* frame, const KURL& pingURL, const KURL& destina
     request.setHTTPContentType("text/ping");
     request.setHTTPBody(FormData::create("PING"));
     request.setHTTPHeaderField("Cache-Control", "max-age=0");
-    frame->loader()->addExtraFieldsToSubresourceRequest(request);
+    frame->loader().addExtraFieldsToSubresourceRequest(request);
 
     SecurityOrigin* sourceOrigin = frame->document()->securityOrigin();
     RefPtr<SecurityOrigin> pingOrigin = SecurityOrigin::create(pingURL);
     FrameLoader::addHTTPOriginIfNeeded(request, sourceOrigin->toString());
     request.setHTTPHeaderField("Ping-To", destinationURL);
-    if (!SecurityPolicy::shouldHideReferrer(pingURL, frame->loader()->outgoingReferrer())) {
-      request.setHTTPHeaderField("Ping-From", frame->document()->url());
-      if (!sourceOrigin->isSameSchemeHostPort(pingOrigin.get())) {
-          String referrer = SecurityPolicy::generateReferrerHeader(frame->document()->referrerPolicy(), pingURL, frame->loader()->outgoingReferrer());
-          if (!referrer.isEmpty())
-              request.setHTTPReferrer(referrer);
-      }
+    if (!SecurityPolicy::shouldHideReferrer(pingURL, frame->loader().outgoingReferrer())) {
+        request.setHTTPHeaderField("Ping-From", frame->document()->url());
+        if (!sourceOrigin->isSameSchemeHostPort(pingOrigin.get())) {
+            String referrer = SecurityPolicy::generateReferrerHeader(frame->document()->referrerPolicy(), pingURL, frame->loader().outgoingReferrer());
+            if (!referrer.isEmpty())
+                request.setHTTPReferrer(referrer);
+        }
     }
     OwnPtr<PingLoader> pingLoader = adoptPtr(new PingLoader(frame, request));
 
@@ -114,9 +114,9 @@ void PingLoader::sendViolationReport(Frame* frame, const KURL& reportURL, PassRe
     request.setHTTPMethod("POST");
     request.setHTTPContentType("application/json");
     request.setHTTPBody(report);
-    frame->loader()->addExtraFieldsToSubresourceRequest(request);
+    frame->loader().addExtraFieldsToSubresourceRequest(request);
 
-    String referrer = SecurityPolicy::generateReferrerHeader(frame->document()->referrerPolicy(), reportURL, frame->loader()->outgoingReferrer());
+    String referrer = SecurityPolicy::generateReferrerHeader(frame->document()->referrerPolicy(), reportURL, frame->loader().outgoingReferrer());
     if (!referrer.isEmpty())
         request.setHTTPReferrer(referrer);
     OwnPtr<PingLoader> pingLoader = adoptPtr(new PingLoader(frame, request));
@@ -135,10 +135,10 @@ 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_handle = ResourceHandle::create(frame->loader()->networkingContext(), request, this, false, false);
+    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());
+    InspectorInstrumentation::continueAfterPingLoader(frame, identifier, frame->loader().activeDocumentLoader(), request, ResourceResponse());
 
     // If the server never responds, FrameLoader won't be able to cancel this load and
     // we'll sit here waiting forever. Set a very generous timeout, just in case.
index 4a17cc3..de01036 100644 (file)
@@ -54,7 +54,7 @@ PolicyChecker::PolicyChecker(Frame* frame)
 
 void PolicyChecker::checkNavigationPolicy(const ResourceRequest& newRequest, NavigationPolicyDecisionFunction function, void* argument)
 {
-    checkNavigationPolicy(newRequest, m_frame->loader()->activeDocumentLoader(), 0, function, argument);
+    checkNavigationPolicy(newRequest, m_frame->loader().activeDocumentLoader(), 0, function, argument);
 }
 
 void PolicyChecker::checkNavigationPolicy(const ResourceRequest& request, DocumentLoader* loader,
@@ -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,
-        response, m_frame->loader()->activeDocumentLoader()->request());
+    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,14 +137,14 @@ 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)
 {
     // See header file for an explaination of why this function
     // isn't like the others.
-    m_frame->loader()->continueLoadAfterWillSubmitForm();
+    m_frame->loader().continueLoadAfterWillSubmitForm();
 }
 
 void PolicyChecker::continueAfterNavigationPolicy(PolicyAction policy)
@@ -160,16 +160,16 @@ void PolicyChecker::continueAfterNavigationPolicy(PolicyAction policy)
             break;
         case PolicyDownload: {
             ResourceRequest request = callback.request();
-            m_frame->loader()->setOriginalURLForDownloadRequest(request);
-            m_frame->loader()->client()->startDownload(request);
+            m_frame->loader().setOriginalURLForDownloadRequest(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 7aefa21..2c8423b 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();
@@ -131,13 +131,13 @@ void ProgressTracker::progressStarted(Frame* frame)
         m_originatingProgressFrame = frame;
 
         m_progressHeartbeatTimer.startRepeating(progressHeartbeatInterval);
-        m_originatingProgressFrame->loader()->loadProgressingStatusChanged();
+        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,14 +167,14 @@ 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()->loadProgressingStatusChanged();
+    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;
@@ -221,7 +221,7 @@ void ProgressTracker::incrementProgress(unsigned long identifier, const char*, i
         item->estimatedLength = item->bytesReceived * 2;
     }
     
-    int numPendingOrLoadingRequests = frame->loader()->numPendingOrLoadingRequests(true);
+    int numPendingOrLoadingRequests = frame->loader().numPendingOrLoadingRequests(true);
     estimatedBytesForPendingRequests = progressItemDefaultEstimatedLength * numPendingOrLoadingRequests;
     remainingBytes = ((m_totalPageAndResourceBytesToLoad + estimatedBytesForPendingRequests) - m_totalBytesReceived);
     if (remainingBytes > 0)  // Prevent divide by 0.
@@ -231,8 +231,8 @@ 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()
-        && !frame->loader()->stateMachine()->firstLayoutDone();
+    bool useClampedMaxProgress = frame->loader().client()->hasHTMLView()
+        && !frame->loader().stateMachine()->firstLayoutDone();
     double maxProgressValue = useClampedMaxProgress ? 0.5 : finalProgressValue;
     increment = (maxProgressValue - m_progressValue) * percentOfRemainingBytes;
     m_progressValue += increment;
@@ -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)
@@ -302,7 +302,7 @@ void ProgressTracker::progressHeartbeatTimerFired(Timer<ProgressTracker>*)
 
     m_totalBytesReceivedBeforePreviousHeartbeat = m_totalBytesReceived;
 
-    m_originatingProgressFrame->loader()->loadProgressingStatusChanged();
+    m_originatingProgressFrame->loader().loadProgressingStatusChanged();
 
     if (m_progressValue >= finalProgressValue)
         m_progressHeartbeatTimer.stop();
index 196920c..9a9e018 100644 (file)
@@ -49,17 +49,17 @@ 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)
 {
-    m_frame->loader()->applyUserAgent(clientRequest);
+    m_frame->loader().applyUserAgent(clientRequest);
 
     dispatchWillSendRequest(loader->documentLoader(), loader->identifier(), clientRequest, redirectResponse);
 }
@@ -95,26 +95,26 @@ 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)
 {
     String oldRequestURL = request.url().string();
-    m_frame->loader()->documentLoader()->didTellClientAboutLoad(request.url());
+    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())
-        m_frame->loader()->documentLoader()->didTellClientAboutLoad(request.url());
+        m_frame->loader().documentLoader()->didTellClientAboutLoad(request.url());
 
     InspectorInstrumentation::willSendRequest(m_frame, identifier, loader, request, redirectResponse);
 
@@ -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 8fc4a84..fa2481c 100644 (file)
@@ -54,7 +54,7 @@ namespace WebCore {
 
 ResourceLoader::ResourceLoader(Frame* frame, ResourceLoaderOptions options)
     : m_frame(frame)
-    , m_documentLoader(frame->loader()->activeDocumentLoader())
+    , m_documentLoader(frame->loader().activeDocumentLoader())
     , m_identifier(0)
     , m_reachedTerminalState(false)
     , m_notifiedLoadComplete(false)
@@ -157,7 +157,7 @@ void ResourceLoader::start()
     }
 
     if (!m_reachedTerminalState)
-        m_handle = ResourceHandle::create(m_frame->loader()->networkingContext(), m_request, this, m_defersLoading, m_options.sniffContent == SniffContent);
+        m_handle = ResourceHandle::create(m_frame->loader().networkingContext(), m_request, this, m_defersLoading, m_options.sniffContent == SniffContent);
 }
 
 void ResourceLoader::setDefersLoading(bool defers)
@@ -176,7 +176,7 @@ FrameLoader* ResourceLoader::frameLoader() const
 {
     if (!m_frame)
         return 0;
-    return m_frame->loader();
+    return &m_frame->loader();
 }
 
 void ResourceLoader::setDataBufferingPolicy(DataBufferingPolicy dataBufferingPolicy)
@@ -243,7 +243,7 @@ void ResourceLoader::willSendRequest(ResourceRequest& request, const ResourceRes
     }
 #if ENABLE(INSPECTOR)
     else
-        InspectorInstrumentation::willSendRequest(m_frame.get(), m_identifier, m_frame->loader()->documentLoader(), request, redirectResponse);
+        InspectorInstrumentation::willSendRequest(m_frame.get(), m_identifier, m_frame->loader().documentLoader(), request, redirectResponse);
 #endif
 
     if (!redirectResponse.isNull())
index 16a3b8e..4f42a1c 100644 (file)
@@ -138,7 +138,7 @@ bool SubframeLoader::pluginIsLoadable(HTMLPlugInImageElement* pluginElement, con
             return false;
         }
 
-        if (m_frame->loader() && !m_frame->loader()->mixedContentChecker()->canRunInsecureContent(document()->securityOrigin(), url))
+        if (!m_frame->loader().mixedContentChecker()->canRunInsecureContent(document()->securityOrigin(), url))
             return false;
     }
 
@@ -270,10 +270,10 @@ PassRefPtr<Widget> SubframeLoader::loadMediaPlayerProxyPlugin(Node* node, const
     else if (mediaElement->isVideo())
         size = RenderVideo::defaultSize();
 
-    if (!m_frame->loader()->mixedContentChecker()->canRunInsecureContent(m_frame->document()->securityOrigin(), completedURL))
+    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) {
@@ -317,7 +317,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);
 
@@ -337,9 +337,9 @@ Frame* SubframeLoader::loadOrRedirectSubframe(HTMLFrameOwnerElement* ownerElemen
 {
     Frame* frame = ownerElement->contentFrame();
     if (frame)
-        frame->navigationScheduler()->scheduleLocationChange(m_frame->document()->securityOrigin(), url.string(), m_frame->loader()->outgoingReferrer(), lockHistory, lockBackForwardList);
+        frame->navigationScheduler()->scheduleLocationChange(m_frame->document()->securityOrigin(), url.string(), m_frame->loader().outgoingReferrer(), lockHistory, lockBackForwardList);
     else
-        frame = loadSubframe(ownerElement, url, frameName, m_frame->loader()->outgoingReferrer());
+        frame = loadSubframe(ownerElement, url, frameName, m_frame->loader().outgoingReferrer());
 
     ASSERT(ownerElement->contentFrame() == frame || !ownerElement->contentFrame());
     return ownerElement->contentFrame();
@@ -365,10 +365,10 @@ 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();
+        m_frame->loader().checkCallImplicitClose();
         return 0;
     }
     
@@ -378,14 +378,14 @@ Frame* SubframeLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const K
     // actually completed below. (Note that we set m_isComplete to false even for synchronous
     // loads, so that checkCompleted() below won't bail early.)
     // FIXME: Can we remove this entirely? m_isComplete normally gets set to false when a load is committed.
-    frame->loader()->started();
+    frame->loader().started();
    
     RenderObject* renderer = ownerElement->renderer();
     FrameView* view = frame->view();
     if (renderer && renderer->isWidget() && view)
         toRenderWidget(renderer)->setWidget(view);
     
-    m_frame->loader()->checkCallImplicitClose();
+    m_frame->loader().checkCallImplicitClose();
     
     // Some loads are performed synchronously (e.g., about:blank and loads
     // cancelled by returning a null ResourceRequest from requestFromDelegate).
@@ -396,8 +396,8 @@ Frame* SubframeLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const K
     // FIXME: In this case the Frame will have finished loading before 
     // it's being added to the child list. It would be a good idea to
     // create the child first, then invoke the loader separately.
-    if (frame->loader()->state() == FrameStateComplete && !frame->loader()->policyDocumentLoader())
-        frame->loader()->checkCompleted();
+    if (frame->loader().state() == FrameStateComplete && !frame->loader().policyDocumentLoader())
+        frame->loader().checkCompleted();
 
     return frame.get();
 }
@@ -405,15 +405,15 @@ Frame* SubframeLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const K
 bool SubframeLoader::allowPlugins(ReasonForCallingAllowPlugins reason)
 {
     Settings* settings = m_frame->settings();
-    bool allowed = m_frame->loader()->client()->allowPlugins(settings && settings->arePluginsEnabled());
+    bool allowed = m_frame->loader().client()->allowPlugins(settings && 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;
     }
@@ -427,7 +427,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;
@@ -452,7 +452,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 3a2fbe2..268cd89 100644 (file)
@@ -144,7 +144,7 @@ void ApplicationCacheGroup::selectCache(Frame* frame, const KURL& passedManifest
     if (!frame->document()->securityOrigin()->canAccessApplicationCache(frame->tree()->top()->document()->securityOrigin()))
         return;
     
-    DocumentLoader* documentLoader = frame->loader()->documentLoader();
+    DocumentLoader* documentLoader = frame->loader().documentLoader();
     ASSERT(!documentLoader->applicationCacheHost()->applicationCache());
 
     if (passedManifestURL.isNull()) {
@@ -179,14 +179,14 @@ void ApplicationCacheGroup::selectCache(Frame* frame, const KURL& passedManifest
             // Restart the current navigation from the top of the navigation algorithm, undoing any changes that were made
             // as part of the initial load.
             // The navigation will not result in the same resource being loaded, because "foreign" entries are never picked during navigation.
-            frame->navigationScheduler()->scheduleLocationChange(frame->document()->securityOrigin(), documentLoader->url(), frame->loader()->referrer());
+            frame->navigationScheduler()->scheduleLocationChange(frame->document()->securityOrigin(), documentLoader->url(), frame->loader().referrer());
         }
         
         return;
     }
     
     // The resource was loaded from the network, check if it is a HTTP/HTTPS GET.    
-    const ResourceRequest& request = frame->loader()->activeDocumentLoader()->request();
+    const ResourceRequest& request = frame->loader().activeDocumentLoader()->request();
 
     if (!ApplicationCache::requestIsHTTPOrHTTPSGet(request))
         return;
@@ -220,7 +220,7 @@ void ApplicationCacheGroup::selectCacheWithoutManifestURL(Frame* frame)
     if (!frame->document()->securityOrigin()->canAccessApplicationCache(frame->tree()->top()->document()->securityOrigin()))
         return;
 
-    DocumentLoader* documentLoader = frame->loader()->documentLoader();
+    DocumentLoader* documentLoader = frame->loader().documentLoader();
     ASSERT(!documentLoader->applicationCacheHost()->applicationCache());
 
     ApplicationCache* mainResourceCache = documentLoader->applicationCacheHost()->mainResourceApplicationCache();
@@ -432,9 +432,9 @@ void ApplicationCacheGroup::update(Frame* frame, ApplicationCacheUpdateOption up
 {
     if (m_updateStatus == Checking || m_updateStatus == Downloading) {
         if (updateOption == ApplicationCacheUpdateWithBrowsingContext) {
-            postListenerTask(ApplicationCacheHost::CHECKING_EVENT, frame->loader()->documentLoader());
+            postListenerTask(ApplicationCacheHost::CHECKING_EVENT, frame->loader().documentLoader());
             if (m_updateStatus == Downloading)
-                postListenerTask(ApplicationCacheHost::DOWNLOADING_EVENT, frame->loader()->documentLoader());
+                postListenerTask(ApplicationCacheHost::DOWNLOADING_EVENT, frame->loader().documentLoader());
         }
         return;
     }
@@ -444,8 +444,8 @@ void ApplicationCacheGroup::update(Frame* frame, ApplicationCacheUpdateOption up
         ASSERT(m_pendingMasterResourceLoaders.isEmpty());
         ASSERT(m_pendingEntries.isEmpty());
         ASSERT(!m_cacheBeingUpdated);
-        postListenerTask(ApplicationCacheHost::CHECKING_EVENT, frame->loader()->documentLoader());
-        postListenerTask(ApplicationCacheHost::NOUPDATE_EVENT, frame->loader()->documentLoader());
+        postListenerTask(ApplicationCacheHost::CHECKING_EVENT, frame->loader().documentLoader());
+        postListenerTask(ApplicationCacheHost::NOUPDATE_EVENT, frame->loader().documentLoader());
         return;
     }
 
@@ -457,7 +457,7 @@ void ApplicationCacheGroup::update(Frame* frame, ApplicationCacheUpdateOption up
     postListenerTask(ApplicationCacheHost::CHECKING_EVENT, m_associatedDocumentLoaders);
     if (!m_newestCache) {
         ASSERT(updateOption == ApplicationCacheUpdateWithBrowsingContext);
-        postListenerTask(ApplicationCacheHost::CHECKING_EVENT, frame->loader()->documentLoader());
+        postListenerTask(ApplicationCacheHost::CHECKING_EVENT, frame->loader().documentLoader());
     }
     
     ASSERT(!m_manifestHandle);
@@ -486,7 +486,7 @@ void ApplicationCacheGroup::abort(Frame* frame)
 PassRefPtr<ResourceHandle> ApplicationCacheGroup::createResourceHandle(const KURL& url, ApplicationCacheResource* newestCachedResource)
 {
     ResourceRequest request(url);
-    m_frame->loader()->applyUserAgent(request);
+    m_frame->loader().applyUserAgent(request);
     request.setHTTPHeaderField("Cache-Control", "max-age=0");
 
     if (newestCachedResource) {
@@ -518,13 +518,13 @@ PassRefPtr<ResourceHandle> ApplicationCacheGroup::createResourceHandle(const KUR
     request.setTargetType(target);
 #endif
 
-    RefPtr<ResourceHandle> handle = ResourceHandle::create(m_frame->loader()->networkingContext(), request, this, false, true);
+    RefPtr<ResourceHandle> handle = ResourceHandle::create(m_frame->loader().networkingContext(), request, this, false, true);
 #if ENABLE(INSPECTOR)
     // Because willSendRequest only gets called during redirects, we initialize
     // the identifier and the first willSendRequest here.
     m_currentResourceIdentifier = m_frame->page()->progress()->createUniqueIdentifier();
     ResourceResponse redirectResponse = ResourceResponse();
-    InspectorInstrumentation::willSendRequest(m_frame, m_currentResourceIdentifier, m_frame->loader()->documentLoader(), request, redirectResponse);
+    InspectorInstrumentation::willSendRequest(m_frame, m_currentResourceIdentifier, m_frame->loader().documentLoader(), request, redirectResponse);
 #endif
     return handle;
 }
@@ -532,7 +532,7 @@ PassRefPtr<ResourceHandle> ApplicationCacheGroup::createResourceHandle(const KUR
 void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const ResourceResponse& response)
 {
 #if ENABLE(INSPECTOR)
-    DocumentLoader* loader = (handle == m_manifestHandle) ? 0 : m_frame->loader()->documentLoader();
+    DocumentLoader* loader = (handle == m_manifestHandle) ? 0 : m_frame->loader().documentLoader();
     InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceResponse(m_frame, m_currentResourceIdentifier, response);
     InspectorInstrumentation::didReceiveResourceResponse(cookie, m_currentResourceIdentifier, loader, response, 0);
 #endif
@@ -625,7 +625,7 @@ void ApplicationCacheGroup::didReceiveData(ResourceHandle* handle, const char* d
 void ApplicationCacheGroup::didFinishLoading(ResourceHandle* handle, double finishTime)
 {
 #if ENABLE(INSPECTOR)
-    InspectorInstrumentation::didFinishLoading(m_frame, m_frame->loader()->documentLoader(), m_currentResourceIdentifier, finishTime);
+    InspectorInstrumentation::didFinishLoading(m_frame, m_frame->loader().documentLoader(), m_currentResourceIdentifier, finishTime);
 #else
     UNUSED_PARAM(finishTime);
 #endif
@@ -664,7 +664,7 @@ void ApplicationCacheGroup::didFinishLoading(ResourceHandle* handle, double fini
 void ApplicationCacheGroup::didFail(ResourceHandle* handle, const ResourceError& error)
 {
 #if ENABLE(INSPECTOR)
-    InspectorInstrumentation::didFailLoading(m_frame, m_frame->loader()->documentLoader(), m_currentResourceIdentifier, error);
+    InspectorInstrumentation::didFailLoading(m_frame, m_frame->loader().documentLoader(), m_currentResourceIdentifier, error);
 #else
     UNUSED_PARAM(error);
 #endif
@@ -1065,7 +1065,7 @@ void ApplicationCacheGroup::addEntry(const String& url, unsigned type)
     // (i.e., the main resource finished loading before the manifest).
     if (ApplicationCacheResource* resource = m_cacheBeingUpdated->resourceForURL(url)) {
         ASSERT(resource->type() & ApplicationCacheResource::Master);
-        ASSERT(!m_frame->loader()->documentLoader()->isLoadingMainResource());
+        ASSERT(!m_frame->loader().documentLoader()->isLoadingMainResource());
     
         resource->addType(type);
         return;
@@ -1140,7 +1140,7 @@ public:
         if (!frame)
             return;
     
-        ASSERT(frame->loader()->documentLoader() == m_documentLoader.get());
+        ASSERT(frame->loader().documentLoader() == m_documentLoader.get());
 
         m_documentLoader->applicationCacheHost()->notifyDOMApplicationCache(m_eventID, m_progressTotal, m_progressDone);
     }
@@ -1173,7 +1173,7 @@ void ApplicationCacheGroup::postListenerTask(ApplicationCacheHost::EventID event
     if (!frame)
         return;
     
-    ASSERT(frame->loader()->documentLoader() == loader);
+    ASSERT(frame->loader().documentLoader() == loader);
 
     frame->document()->postTask(CallCacheListenerTask::create(loader, eventID, progressTotal, progressDone));
 }
index 6681471..8d8af74 100644 (file)
@@ -70,9 +70,9 @@ void DOMApplicationCache::willDestroyGlobalObjectInFrame()
 
 ApplicationCacheHost* DOMApplicationCache::applicationCacheHost() const
 {
-    if (!m_frame || !m_frame->loader()->documentLoader())
+    if (!m_frame || !m_frame->loader().documentLoader())
         return 0;
-    return m_frame->loader()->documentLoader()->applicationCacheHost();
+    return m_frame->loader().documentLoader()->applicationCacheHost();
 }
 
 unsigned short DOMApplicationCache::status() const
index 298eadf..295c5dc 100644 (file)
@@ -454,7 +454,7 @@ PassRefPtr<LegacyWebArchive> LegacyWebArchive::create(Frame* frame)
 {
     ASSERT(frame);
     
-    DocumentLoader* documentLoader = frame->loader()->documentLoader();
+    DocumentLoader* documentLoader = frame->loader().documentLoader();
 
     if (!documentLoader)
         return 0;
@@ -503,7 +503,7 @@ PassRefPtr<LegacyWebArchive> LegacyWebArchive::create(const String& markupString
 {
     ASSERT(frame);
     
-    const ResourceResponse& response = frame->loader()->documentLoader()->response();
+    const ResourceResponse& response = frame->loader().documentLoader()->response();
     KURL responseURL = response.url();
     
     // it's possible to have a response without a URL here
@@ -536,7 +536,7 @@ PassRefPtr<LegacyWebArchive> LegacyWebArchive::create(const String& markupString
             ListHashSet<KURL> subresourceURLs;
             node->getSubresourceURLs(subresourceURLs);
             
-            DocumentLoader* documentLoader = frame->loader()->documentLoader();
+            DocumentLoader* documentLoader = frame->loader().documentLoader();
             ListHashSet<KURL>::iterator iterEnd = subresourceURLs.end();
             for (ListHashSet<KURL>::iterator iter = subresourceURLs.begin(); iter != iterEnd; ++iter) {
                 const KURL& subresourceURL = *iter;
@@ -601,8 +601,7 @@ PassRefPtr<LegacyWebArchive> LegacyWebArchive::createFromSelection(Frame* frame)
         
     // Wrap the frameset document in an iframe so it can be pasted into
     // another document (which will have a body or frameset of its own). 
-    String iframeMarkup = "<iframe frameborder=\"no\" marginwidth=\"0\" marginheight=\"0\" width=\"98%%\" height=\"98%%\" src=\"" +
-                          frame->loader()->documentLoader()->response().url().string() + "\"></iframe>";
+    String iframeMarkup = "<iframe frameborder=\"no\" marginwidth=\"0\" marginheight=\"0\" width=\"98%%\" height=\"98%%\" src=\"" + frame->loader().documentLoader()->response().url().string() + "\"></iframe>";
     RefPtr<ArchiveResource> iframeResource = ArchiveResource::create(utf8Buffer(iframeMarkup), blankURL(), "text/html", "UTF-8", String());
 
     Vector<PassRefPtr<ArchiveResource> > subresources;
index 8b3cddb..4c0c02f 100644 (file)
@@ -269,12 +269,12 @@ void CachedResource::addAdditionalRequestHeaders(CachedResourceLoader* cachedRes
     // the Content-Security-Policy at the CachedResourceLoader layer so we can
     // handle different resource types differently.
 
-    FrameLoader* frameLoader = cachedResourceLoader->frame()->loader();
+    FrameLoader& frameLoader = cachedResourceLoader->frame()->loader();
     String outgoingReferrer;
     String outgoingOrigin;
     if (m_resourceRequest.httpReferrer().isNull()) {
-        outgoingReferrer = frameLoader->outgoingReferrer();
-        outgoingOrigin = frameLoader->outgoingOrigin();
+        outgoingReferrer = frameLoader.outgoingReferrer();
+        outgoingOrigin = frameLoader.outgoingOrigin();
     } else {
         outgoingReferrer = m_resourceRequest.httpReferrer();
         outgoingOrigin = SecurityOrigin::createFromString(outgoingReferrer)->toString();
@@ -287,7 +287,7 @@ void CachedResource::addAdditionalRequestHeaders(CachedResourceLoader* cachedRes
         m_resourceRequest.setHTTPReferrer(outgoingReferrer);
     FrameLoader::addHTTPOriginIfNeeded(m_resourceRequest, outgoingOrigin);
 
-    frameLoader->addExtraFieldsToSubresourceRequest(m_resourceRequest);
+    frameLoader.addExtraFieldsToSubresourceRequest(m_resourceRequest);
 }
 
 void CachedResource::load(CachedResourceLoader* cachedResourceLoader, const ResourceLoaderOptions& options)
@@ -297,8 +297,8 @@ void CachedResource::load(CachedResourceLoader* cachedResourceLoader, const Reso
         return;
     }
 
-    FrameLoader* frameLoader = cachedResourceLoader->frame()->loader();
-    if (options.securityCheck == DoSecurityCheck && (frameLoader->state() == FrameStateProvisional || !frameLoader->activeDocumentLoader() || frameLoader->activeDocumentLoader()->isStopping())) {
+    FrameLoader& frameLoader = cachedResourceLoader->frame()->loader();
+    if (options.securityCheck == DoSecurityCheck && (frameLoader.state() == FrameStateProvisional || !frameLoader.activeDocumentLoader() || frameLoader.activeDocumentLoader()->isStopping())) {
         failBeforeStarting();
         return;
     }
index 80e2f8d..451d99b 100644 (file)
@@ -159,7 +159,7 @@ Frame* CachedResourceLoader::frame() const
 CachedResourceHandle<CachedImage> CachedResourceLoader::requestImage(CachedResourceRequest& request)
 {
     if (Frame* f = frame()) {
-        if (f->loader()->pageDismissalEventBeingDispatched() != FrameLoader::NoDismissal) {
+        if (f->loader().pageDismissalEventBeingDispatched() != FrameLoader::NoDismissal) {
             KURL requestURL = request.resourceRequest().url();
             if (requestURL.isValid() && canRequest(CachedResource::ImageResource, requestURL, request.options(), request.forPreload()))
                 PingLoader::loadImage(f, requestURL);
@@ -272,7 +272,7 @@ bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const
         // These resource can inject script into the current document (Script,
         // XSL) or exfiltrate the content of the current document (CSS).
         if (Frame* f = frame())
-            if (!f->loader()->mixedContentChecker()->canRunInsecureContent(m_document->securityOrigin(), url))
+            if (!f->loader().mixedContentChecker()->canRunInsecureContent(m_document->securityOrigin(), url))
                 return false;
         break;
 #if ENABLE(VIDEO_TRACK)
@@ -287,7 +287,7 @@ bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const
         // These resources can corrupt only the frame's pixels.
         if (Frame* f = frame()) {
             Frame* top = f->tree()->top();
-            if (!top->loader()->mixedContentChecker()->canDisplayInsecureContent(top->document()->securityOrigin(), url))
+            if (!top->loader().mixedContentChecker()->canDisplayInsecureContent(top->document()->securityOrigin(), url))
                 return false;
         }
         break;
@@ -366,8 +366,8 @@ bool CachedResourceLoader::canRequest(CachedResource::Type type, const KURL& url
 
         if (frame()) {
             Settings* settings = frame()->settings();
-            if (!frame()->loader()->client()->allowScriptFromSource(!settings || settings->isScriptEnabled(), url)) {
-                frame()->loader()->client()->didNotAllowScript();
+            if (!frame()->loader().client()->allowScriptFromSource(!settings || settings->isScriptEnabled(), url)) {
+                frame()->loader().client()->didNotAllowScript();
                 return false;
             }
         }
@@ -426,7 +426,7 @@ bool CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache(Cac
         return true;
 
     ResourceRequest newRequest;
-    frame()->loader()->loadedResourceFromMemoryCache(resource, newRequest);
+    frame()->loader().loadedResourceFromMemoryCache(resource, newRequest);
     
     // FIXME <http://webkit.org/b/113251>: If the delegate modifies the request's
     // URL, it is no longer appropriate to use this CachedResource.
@@ -449,7 +449,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());
@@ -705,7 +705,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
@@ -729,9 +729,9 @@ CachePolicy CachedResourceLoader::cachePolicy(CachedResource::Type type) const
         return CachePolicyVerify;
 
     if (type != CachedResource::MainResource)
-        return frame()->loader()->subresourceCachePolicy();
+        return frame()->loader().subresourceCachePolicy();
     
-    if (frame()->loader()->loadType() == FrameLoadTypeReloadFromOrigin || frame()->loader()->loadType() == FrameLoadTypeReload)
+    if (frame()->loader().loadType() == FrameLoadTypeReloadFromOrigin || frame()->loader().loadType() == FrameLoadTypeReload)
         return CachePolicyReload;
     return CachePolicyVerify;
 }
@@ -770,7 +770,7 @@ void CachedResourceLoader::loadDone(CachedResource* resource)
 #endif // ENABLE(RESOURCE_TIMING)
 
     if (frame())
-        frame()->loader()->loadDone();
+        frame()->loader().loadDone();
     performPostLoadActions();
 
     if (!m_garbageCollectDocumentResourcesTimer.isActive())
index 6ee5392..7eaf88d 100644 (file)
@@ -121,16 +121,16 @@ IconURLs IconController::urlsForTypes(int iconTypesMask)
 
 void IconController::commitToDatabase(const KURL& icon)
 {
-    LOG(IconDatabase, "Committing iconURL %s to database for pageURLs %s and %s", icon.string().ascii().data(), m_frame->document()->url().string().ascii().data(), m_frame->loader()->initialRequest().url().string().ascii().data());
+    LOG(IconDatabase, "Committing iconURL %s to database for pageURLs %s and %s", icon.string().ascii().data(), m_frame->document()->url().string().ascii().data(), m_frame->loader().initialRequest().url().string().ascii().data());
     iconDatabase().setIconURLForPageURL(icon.string(), m_frame->document()->url().string());
-    iconDatabase().setIconURLForPageURL(icon.string(), m_frame->loader()->initialRequest().url().string());
+    iconDatabase().setIconURLForPageURL(icon.string(), m_frame->loader().initialRequest().url().string());
 }
 
 void IconController::startLoader()
 {
     // FIXME: We kick off the icon loader when the frame is done receiving its main resource.
     // But we should instead do it when we're done parsing the head element.
-    if (!m_frame->loader()->isLoadingMainFrame())
+    if (!m_frame->loader().isLoadingMainFrame())
         return;
 
     if (!iconDatabase().isEnabled())
@@ -153,19 +153,19 @@ void IconController::startLoader()
 
     // If we're reloading the page, always start the icon load now.
     // FIXME: How can this condition ever be true?
-    if (m_frame->loader()->loadType() == FrameLoadTypeReload && m_frame->loader()->loadType() == FrameLoadTypeReloadFromOrigin) {
+    if (m_frame->loader().loadType() == FrameLoadTypeReload && m_frame->loader().loadType() == FrameLoadTypeReloadFromOrigin) {
         continueLoadWithDecision(IconLoadYes);
         return;
     }
 
     if (iconDatabase().supportsAsynchronousMode()) {
-        m_frame->loader()->documentLoader()->getIconLoadDecisionForIconURL(urlString);
+        m_frame->loader().documentLoader()->getIconLoadDecisionForIconURL(urlString);
         // Commit the icon url mapping to the database just in case we don't end up loading later.
         commitToDatabase(iconURL);
         return;
     }
 
-    IconLoadDecision decision = iconDatabase().synchronousLoadDecisionForIconURL(urlString, m_frame->loader()->documentLoader());
+    IconLoadDecision decision = iconDatabase().synchronousLoadDecisionForIconURL(urlString, m_frame->loader().documentLoader());
 
     if (decision == IconLoadUnknown) {
         // In this case, we may end up loading the icon later, but we still want to commit the icon url mapping to the database
@@ -174,7 +174,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;
     }
@@ -216,7 +216,7 @@ void IconController::continueLoadWithDecision(IconLoadDecision iconLoadDecision)
         commitToDatabase(iconURL);
 
         if (iconDatabase().supportsAsynchronousMode()) {
-            m_frame->loader()->documentLoader()->getIconDataForIconURL(urlString);
+            m_frame->loader().documentLoader()->getIconDataForIconURL(urlString);
             return;
         }
 
@@ -226,11 +226,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));
+            iconDatabase().synchronousIconForPageURL(m_frame->loader().initialRequest().url().string(), IntSize(0, 0));
         } else
-            m_frame->loader()->client()->dispatchDidReceiveIcon();
+            m_frame->loader().client()->dispatchDidReceiveIcon();
 
         return;
     } 
index c63344c..757c3ab 100644 (file)
@@ -62,7 +62,7 @@ void IconLoader::startLoading()
     if (m_resource || !m_frame->document())
         return;
 
-    CachedResourceRequest request(ResourceRequest(m_frame->loader()->icon()->url()), ResourceLoaderOptions(SendCallbacks, SniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForAnyCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType));
+    CachedResourceRequest request(ResourceRequest(m_frame->loader().icon()->url()), ResourceLoaderOptions(SendCallbacks, SniffContent, BufferData, DoNotAllowStoredCredentials, DoNotAskClientForAnyCredentials, DoSecurityCheck, UseDefaultOriginRestrictionsForType));
 
 #if PLATFORM(BLACKBERRY)
     request.mutableResourceRequest().setTargetType(ResourceRequest::TargetIsFavicon);
@@ -74,7 +74,7 @@ void IconLoader::startLoading()
     if (m_resource)
         m_resource->addClient(this);
     else
-        LOG_ERROR("Failed to start load for icon at url %s", m_frame->loader()->icon()->url().string().ascii().data());
+        LOG_ERROR("Failed to start load for icon at url %s", m_frame->loader().icon()->url().string().ascii().data());
 }
 
 void IconLoader::stopLoading()
@@ -104,12 +104,12 @@ void IconLoader::notifyFinished(CachedResource* resource)
     }
 
     LOG(IconDatabase, "IconLoader::finishLoading() - Committing iconURL %s to database", resource->url().string().ascii().data());
-    m_frame->loader()->icon()->commitToDatabase(resource->url());
+    m_frame->loader().icon()->commitToDatabase(resource->url());
     // Setting the icon data only after committing to the database ensures that the data is
     // 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 1835051..5190e47 100644 (file)
@@ -213,7 +213,7 @@ bool Chrome::canRunModal() const
 static bool canRunModalIfDuringPageDismissal(Page* page, ChromeClient::DialogType dialog, const String& message)
 {
     for (Frame* frame = page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
-        FrameLoader::PageDismissalType dismissal = frame->loader()->pageDismissalEventBeingDispatched();
+        FrameLoader::PageDismissalType dismissal = frame->loader().pageDismissalEventBeingDispatched();
         if (dismissal != FrameLoader::NoDismissal)
             return page->chrome().client()->shouldRunModalDialogDuringPageDismissal(dialog, message, dismissal);
     }
index 1bf2edf..9173845 100644 (file)
@@ -181,7 +181,7 @@ void ContextMenuController::showContextMenu(Event* event)
 static void openNewWindow(const KURL& urlToLoad, Frame* frame)
 {
     if (Page* oldPage = frame->page()) {
-        FrameLoadRequest request(frame->document()->securityOrigin(), ResourceRequest(urlToLoad, frame->loader()->outgoingReferrer()));
+        FrameLoadRequest request(frame->document()->securityOrigin(), ResourceRequest(urlToLoad, frame->loader().outgoingReferrer()));
         Page* newPage = oldPage;
         if (!frame->settings() || frame->settings()->supportsMultipleWindows()) {
             newPage = oldPage->chrome().createWindow(frame, request, WindowFeatures(), NavigationAction(request.resourceRequest()));
@@ -189,7 +189,7 @@ static void openNewWindow(const KURL& urlToLoad, Frame* frame)
                 return;
             newPage->chrome().show();
         }
-        newPage->mainFrame()->loader()->loadFrameRequest(request, false, false, 0, 0, MaybeSendReferrer);
+        newPage->mainFrame()->loader().loadFrameRequest(request, false, false, 0, 0, MaybeSendReferrer);
     }
 }
 
@@ -280,7 +280,7 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
         m_hitTestResult.toggleMediaMuteState();
         break;
     case ContextMenuItemTagOpenFrameInNewWindow: {
-        DocumentLoader* loader = frame->loader()->documentLoader();
+        DocumentLoader* loader = frame->loader().documentLoader();
         if (!loader->unreachableURL().isEmpty())
             openNewWindow(loader->unreachableURL(), frame);
         else
@@ -299,10 +299,10 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
             page->backForward()->goBackOrForward(1);
         break;
     case ContextMenuItemTagStop:
-        frame->loader()->stop();
+        frame->loader().stop();
         break;
     case ContextMenuItemTagReload:
-        frame->loader()->reload();
+        frame->loader().reload();
         break;
     case ContextMenuItemTagCut:
         frame->editor().command("Cut").execute();
@@ -387,12 +387,12 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
         break;
     case ContextMenuItemTagOpenLink:
         if (Frame* targetFrame = m_hitTestResult.targetFrame())
-            targetFrame->loader()->loadFrameRequest(FrameLoadRequest(frame->document()->securityOrigin(), ResourceRequest(m_hitTestResult.absoluteLinkURL(), frame->loader()->outgoingReferrer())), false, false, 0, 0, MaybeSendReferrer);
+            targetFrame->loader().loadFrameRequest(FrameLoadRequest(frame->document()->securityOrigin(), ResourceRequest(m_hitTestResult.absoluteLinkURL(), frame->loader().outgoingReferrer())), false, false, 0, 0, MaybeSendReferrer);
         else
             openNewWindow(m_hitTestResult.absoluteLinkURL(), frame);
         break;
     case ContextMenuItemTagOpenLinkInThisWindow:
-        frame->loader()->loadFrameRequest(FrameLoadRequest(frame->document()->securityOrigin(), ResourceRequest(m_hitTestResult.absoluteLinkURL(), frame->loader()->outgoingReferrer())), false, false, 0, 0, MaybeSendReferrer);
+        frame->loader().loadFrameRequest(FrameLoadRequest(frame->document()->securityOrigin(), ResourceRequest(m_hitTestResult.absoluteLinkURL(), frame->loader().outgoingReferrer())), false, false, 0, 0, MaybeSendReferrer);
         break;
     case ContextMenuItemTagBold:
         frame->editor().command("ToggleBold").execute();
@@ -833,10 +833,10 @@ void ContextMenuController::populate()
         return;
 
     if (!m_hitTestResult.isContentEditable()) {
-        FrameLoader* loader = frame->loader();
+        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());
@@ -879,7 +879,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());
         }
 
@@ -936,7 +936,7 @@ void ContextMenuController::populate()
 
                 // use isLoadingInAPISense rather than isLoading because Stop/Reload are
                 // intended to match WebKit's API, not WebCore's internal notion of loading status
-                if (loader->documentLoader()->isLoadingInAPISense())
+                if (loader.documentLoader()->isLoadingInAPISense())
                     appendItem(StopItem, m_contextMenu.get());
                 else
                     appendItem(ReloadItem, m_contextMenu.get());
@@ -1014,10 +1014,10 @@ void ContextMenuController::populate()
             }
         }
 
-        FrameLoader* loader = frame->loader();
+        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());
@@ -1325,10 +1325,10 @@ void ContextMenuController::checkOrEnableIfNeeded(ContextMenuItem& item) const
             shouldEnable = frame->page() && frame->page()->backForward()->canGoBackOrForward(1);
             break;
         case ContextMenuItemTagStop:
-            shouldEnable = frame->loader()->documentLoader()->isLoadingInAPISense();
+            shouldEnable = frame->loader().documentLoader()->isLoadingInAPISense();
             break;
         case ContextMenuItemTagReload:
-            shouldEnable = !frame->loader()->documentLoader()->isLoadingInAPISense();
+            shouldEnable = !frame->loader().documentLoader()->isLoadingInAPISense();
             break;
         case ContextMenuItemTagFontMenu:
             shouldEnable = frame->editor().canEditRichly();
index 729f641..2ae3b5e 100644 (file)
@@ -260,7 +260,7 @@ bool DOMWindow::dispatchAllPendingBeforeUnloadEvents()
         if (!frame)
             continue;
 
-        if (!frame->loader()->shouldClose())
+        if (!frame->loader().shouldClose())
             return false;
 
         window->enableSuddenTermination();
@@ -877,7 +877,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());
@@ -993,7 +993,7 @@ void DOMWindow::close(ScriptExecutionContext* context)
     if (!(page->openedByDOM() || page->backForward()->count() <= 1 || allowScriptsToCloseWindows))
         return;
 
-    if (!m_frame->loader()->shouldClose())
+    if (!m_frame->loader().shouldClose())
         return;
 
     page->chrome().closeWindowSoon();
@@ -1014,7 +1014,7 @@ void DOMWindow::print()
         return;
     }
 
-    if (m_frame->loader()->activeDocumentLoader()->isLoading()) {
+    if (m_frame->loader().activeDocumentLoader()->isLoading()) {
         m_shouldPrintWhenFinishedLoading = true;
         return;
     }
@@ -1029,7 +1029,7 @@ void DOMWindow::stop()
 
     // We must check whether the load is complete asynchronously, because we might still be parsing
     // the document until the callstack unwinds.
-    m_frame->loader()->stopForUserCancel(true);
+    m_frame->loader().stopForUserCancel(true);
 }
 
 void DOMWindow::alert(const String& message)
@@ -1273,7 +1273,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) 
@@ -1319,7 +1319,7 @@ DOMWindow* DOMWindow::opener() const
     if (!m_frame)
         return 0;
 
-    Frame* opener = m_frame->loader()->opener();
+    Frame* opener = m_frame->loader().opener();
     if (!opener)
         return 0;
 
@@ -1700,10 +1700,10 @@ bool DOMWindow::removeEventListener(const AtomicString& eventType, EventListener
 void DOMWindow::dispatchLoadEvent()
 {
     RefPtr<Event> loadEvent(Event::create(eventNames().loadEvent, false, false));
-    if (m_frame && m_frame->loader()->documentLoader() && !m_frame->loader()->documentLoader()->timing()->loadEventStart()) {
+    if (m_frame && m_frame->loader().documentLoader() && !m_frame->loader().documentLoader()->timing()->loadEventStart()) {
         // The DocumentLoader (and thus its DocumentLoadTiming) might get destroyed while dispatching
         // the event, so protect it to prevent writing the end time into freed memory.
-        RefPtr<DocumentLoader> documentLoader = m_frame->loader()->documentLoader();
+        RefPtr<DocumentLoader> documentLoader = m_frame->loader().documentLoader();
         DocumentLoadTiming* timing = documentLoader->timing();
         timing->markLoadEventStart();
         dispatchEvent(loadEvent, document());
@@ -1817,7 +1817,7 @@ void DOMWindow::setLocation(const String& urlString, DOMWindow* activeWindow, DO
     // We want a new history item if we are processing a user gesture.
     m_frame->navigationScheduler()->scheduleLocationChange(activeDocument->securityOrigin(),
         // FIXME: What if activeDocument()->frame() is 0?
-        completedURL, activeDocument->frame()->loader()->outgoingReferrer(),
+        completedURL, activeDocument->frame()->loader().outgoingReferrer(),
         locking != LockHistoryBasedOnGestureState || !ScriptController::processingUserGesture(),
         locking != LockHistoryBasedOnGestureState);
 }
@@ -1908,10 +1908,10 @@ PassRefPtr<Frame> DOMWindow::createWindow(const String& urlString, const AtomicS
     }
 
     // For whatever reason, Firefox uses the first frame to determine the outgoingReferrer. We replicate that behavior here.
-    String referrer = SecurityPolicy::generateReferrerHeader(firstFrame->document()->referrerPolicy(), completedURL, firstFrame->loader()->outgoingReferrer());
+    String referrer = SecurityPolicy::generateReferrerHeader(firstFrame->document()->referrerPolicy(), completedURL, firstFrame->loader().outgoingReferrer());
 
     ResourceRequest request(completedURL, referrer);
-    FrameLoader::addHTTPOriginIfNeeded(request, firstFrame->loader()->outgoingOrigin());
+    FrameLoader::addHTTPOriginIfNeeded(request, firstFrame->loader().outgoingOrigin());
     FrameLoadRequest frameRequest(activeWindow->document()->securityOrigin(), request, frameName);
 
     // We pass the opener frame for the lookupFrame in case the active frame is different from
@@ -1921,7 +1921,7 @@ PassRefPtr<Frame> DOMWindow::createWindow(const String& urlString, const AtomicS
     if (!newFrame)
         return 0;
 
-    newFrame->loader()->setOpener(openerFrame);
+    newFrame->loader().setOpener(openerFrame);
     newFrame->page()->setOpenedByDOM();
 
     if (newFrame->document()->domWindow()->isInsecureScriptAccess(activeWindow, completedURL))
@@ -1931,7 +1931,7 @@ PassRefPtr<Frame> DOMWindow::createWindow(const String& urlString, const AtomicS
         function(newFrame->document()->domWindow(), functionContext);
 
     if (created)
-        newFrame->loader()->changeLocation(activeWindow->document()->securityOrigin(), completedURL, referrer, false, false);
+        newFrame->loader().changeLocation(activeWindow->document()->securityOrigin(), completedURL, referrer, false, false);
     else if (!urlString.isEmpty()) {
         bool lockHistory = !ScriptController::processingUserGesture();
         newFrame->navigationScheduler()->scheduleLocationChange(activeWindow->document()->securityOrigin(), completedURL.string(), referrer, lockHistory, false);
@@ -1992,7 +1992,7 @@ PassRefPtr<DOMWindow> DOMWindow::open(const String& urlString, const AtomicStrin
         targetFrame->navigationScheduler()->scheduleLocationChange(
             activeDocument->securityOrigin(),
             completedURL,
-            firstFrame->loader()->outgoingReferrer(),
+            firstFrame->loader().outgoingReferrer(),
             lockHistory,
             false);
         return targetFrame->document()->domWindow();
index 0b0779e..c0d15eb 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 e60e82f..c83df93 100644 (file)
@@ -243,7 +243,7 @@ bool DragController::performDrag(DragData* dragData)
         return false;
 
     m_client->willPerformDragDestinationAction(DragDestinationActionLoad, dragData);
-    m_page->mainFrame()->loader()->load(FrameLoadRequest(m_page->mainFrame(), ResourceRequest(dragData->asURL(m_page->mainFrame()))));
+    m_page->mainFrame()->loader().load(FrameLoadRequest(m_page->mainFrame(), ResourceRequest(dragData->asURL(m_page->mainFrame()))));
     return true;
 }
 
index 7492017..832cbbb 100644 (file)
@@ -1517,7 +1517,7 @@ bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
     UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
 
     // FIXME (bug 68185): this call should be made at another abstraction layer
-    m_frame->loader()->resetMultipleFormSubmissionProtection();
+    m_frame->loader().resetMultipleFormSubmissionProtection();
     
     cancelFakeMouseMoveEvent();
     m_mousePressed = true;
@@ -3202,7 +3202,7 @@ bool EventHandler::keyEvent(const PlatformKeyboardEvent& initialKeyEvent)
         view->resetDeferredRepaintDelay();
 
     // FIXME (bug 68185): this call should be made at another abstraction layer
-    m_frame->loader()->resetMultipleFormSubmissionProtection();
+    m_frame->loader().resetMultipleFormSubmissionProtection();
 
     // In IE, access keys are special, they are handled after default keydown processing, but cannot be canceled - this is hard to match.
     // On Mac OS X, we process them before dispatching keydown, as the default keydown handler implements Emacs key bindings, which may conflict
index 86d7b35..3405ec1 100644 (file)
@@ -211,7 +211,7 @@ PassRefPtr<Frame> Frame::create(Page* page, HTMLFrameOwnerElement* ownerElement,
 Frame::~Frame()
 {
     setView(0);
-    loader()->cancelAndClear();
+    loader().cancelAndClear();
 
     // FIXME: We should not be doing all this work inside the destructor
 
@@ -274,7 +274,7 @@ void Frame::setView(PassRefPtr<FrameView> view)
     // Only one form submission is allowed per view of a part.
     // Since this part may be getting reused as a result of being
     // pulled from the back/forward cache, reset this flag.
-    loader()->resetMultipleFormSubmissionProtection();
+    loader().resetMultipleFormSubmissionProtection();
     
 #if USE(TILED_BACKING_STORE)
     if (m_view && tiledBackingStore())
@@ -560,7 +560,7 @@ void Frame::injectUserScripts(UserScriptInjectionTime injectionTime)
     if (!m_page)
         return;
 
-    if (loader()->stateMachine()->creatingInitialEmptyDocument() && !settings()->shouldInjectUserScriptsInInitialEmptyDocument())
+    if (loader().stateMachine()->creatingInitialEmptyDocument() && !settings()->shouldInjectUserScriptsInInitialEmptyDocument())
         return;
 
     // Walk the hashtable. Inject by world.
@@ -663,7 +663,7 @@ void Frame::dispatchVisibilityStateChangeEvent()
 void Frame::willDetachPage()
 {
     if (Frame* parent = tree()->parent())
-        parent->loader()->checkLoadComplete();
+        parent->loader().checkLoadComplete();
 
     HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.end();
     for (HashSet<FrameDestructionObserver*>::iterator it = m_destructionObservers.begin(); it != stop; ++it)
index 8e55dd0..b0f0dca 100644 (file)
@@ -116,7 +116,7 @@ namespace WebCore {
 
         Editor& editor() const;
         EventHandler* eventHandler() const;
-        FrameLoader* loader() const;
+        FrameLoader& loader() const;
         NavigationScheduler* navigationScheduler() const;
         FrameSelection* selection() const;
         FrameTree* tree() const;
@@ -260,9 +260,9 @@ namespace WebCore {
         m_loader.init();
     }
 
-    inline FrameLoader* Frame::loader() const
+    inline FrameLoader& Frame::loader() const
     {
-        return &m_loader;
+        return m_loader;
     }
 
     inline NavigationScheduler* Frame::navigationScheduler() const
index 28f8c3d..d41dd1d 100644 (file)
@@ -1465,7 +1465,7 @@ void FrameView::setMediaType(const String& mediaType)
 String FrameView::mediaType() const
 {
     // See if we have an override type.
-    String overrideType = m_frame->loader()->client()->overrideMediaType();
+    String overrideType = m_frame->loader().client()->overrideMediaType();
     InspectorInstrumentation::applyEmulatedMedia(m_frame.get(), &overrideType);
     if (!overrideType.isNull())
         return overrideType;
@@ -1990,7 +1990,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()
@@ -2319,7 +2319,7 @@ void FrameView::doDeferredRepaints()
 bool FrameView::shouldUseLoadTimeDeferredRepaintDelay() const
 {
     // Don't defer after the initial load of the page has been completed.
-    if (m_frame->tree()->top()->loader()->isComplete())
+    if (m_frame->tree()->top()->loader().isComplete())
         return false;
     Document* document = m_frame->document();
     if (!document)
@@ -2768,7 +2768,7 @@ void FrameView::performPostLayoutTasks()
     if (m_nestedLayoutCount <= 1 && m_frame->document()->documentElement()) {
         if (m_firstLayoutCallbackPending) {
             m_firstLayoutCallbackPending = false;
-            m_frame->loader()->didFirstLayout();
+            m_frame->loader().didFirstLayout();
             if (requestedMilestones & DidFirstLayout)
                 milestonesAchieved |= DidFirstLayout;
             if (isMainFrameView())
@@ -2785,7 +2785,7 @@ void FrameView::performPostLayoutTasks()
     }
 
     if (milestonesAchieved && page && page->mainFrame() == m_frame)
-        m_frame->loader()->didLayout(milestonesAchieved);
+        m_frame->loader().didLayout(milestonesAchieved);
 #if ENABLE(FONT_LOAD_EVENTS)
     if (RuntimeEnabledFeatures::fontLoadEventsEnabled())
         m_frame->document()->fontloader()->didLayout();
@@ -2793,7 +2793,7 @@ void FrameView::performPostLayoutTasks()
     
     // FIXME: We should consider adding DidLayout as a LayoutMilestone. That would let us merge this
     // with didLayout(LayoutMilestones).
-    m_frame->loader()->client()->dispatchDidLayout();
+    m_frame->loader().client()->dispatchDidLayout();
 
     if (RenderView* renderView = this->renderView())
         renderView->updateWidgetPositions();
@@ -2962,7 +2962,7 @@ void FrameView::autoSizeIfEnabled()
         // While loading only allow the size to increase (to avoid twitching during intermediate smaller states)
         // unless autoresize has just been turned on or the maximum size is smaller than the current size.
         if (m_didRunAutosize && size.height() <= m_maxAutoSize.height() && size.width() <= m_maxAutoSize.width()
-            && !frame()->loader()->isComplete() && (newSize.height() < size.height() || newSize.width() < size.width()))
+            && !frame()->loader().isComplete() && (newSize.height() < size.height() || newSize.width() < size.width()))
             break;
 
         resize(newSize.width(), newSize.height());
@@ -3095,7 +3095,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)
@@ -3215,7 +3215,7 @@ void FrameView::updateScrollableAreaSet()
 
 bool FrameView::shouldSuspendScrollAnimations() const
 {
-    return m_frame->loader()->state() != FrameStateComplete;
+    return m_frame->loader().state() != FrameStateComplete;
 }
 
 void FrameView::scrollbarStyleChanged(int newStyle, bool forceUpdate)
@@ -3757,7 +3757,7 @@ bool FrameView::qualifiesAsVisuallyNonEmpty() const
         return false;
 
     // Ensure that we always get marked visually non-empty eventually.
-    if (!m_frame->document()->parsing() && m_frame->loader()->stateMachine()->committedFirstRealDocumentLoad())
+    if (!m_frame->document()->parsing() && m_frame->loader().stateMachine()->committedFirstRealDocumentLoad())
         return true;
 
     // Require the document to grow a bit.
@@ -4152,7 +4152,7 @@ bool FrameView::wheelEvent(const PlatformWheelEvent& wheelEvent)
         if (offset != newOffset) {
             ScrollView::scrollTo(newOffset);
             scrollPositionChanged();
-            frame()->loader()->client()->didChangeScrollOffset();
+            frame()->loader().client()->didChangeScrollOffset();
         }
         return true;
     }
@@ -4264,7 +4264,7 @@ void FrameView::firePaintRelatedMilestones()
 
     if (milestonesAchieved) {
         if (Frame* frame = page->mainFrame())
-            frame->loader()->didLayout(milestonesAchieved);
+            frame->loader().didLayout(milestonesAchieved);
     }
 }
 
index 79bf90b..be3f84c 100644 (file)
@@ -67,7 +67,7 @@ PassRefPtr<SerializedScriptValue> History::stateInternal() const
     if (!m_frame)
         return 0;
 
-    if (HistoryItem* historyItem = m_frame->loader()->history()->currentItem())
+    if (HistoryItem* historyItem = m_frame->loader().history()->currentItem())
         return historyItem->stateObject();
 
     return 0;
@@ -148,17 +148,17 @@ void History::stateObjectAdded(PassRefPtr<SerializedScriptValue> data, const Str
     }
 
     if (stateObjectType == StateObjectPush)
-        m_frame->loader()->history()->pushState(data, title, fullURL.string());
+        m_frame->loader().history()->pushState(data, title, fullURL.string());
     else if (stateObjectType == StateObjectReplace)
-        m_frame->loader()->history()->replaceState(data, title, fullURL.string());
+        m_frame->loader().history()->replaceState(data, title, fullURL.string());
             
     if (!urlString.isEmpty())
         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 36b35c4..2e2b75e 100644 (file)
@@ -265,7 +265,7 @@ void Location::setLocation(const String& url, DOMWindow* activeWindow, DOMWindow
 {
     ASSERT(m_frame);
     // We call findFrameForNavigation to handle the case of a seamless iframe correctly.
-    Frame* frame = m_frame->loader()->findFrameForNavigation(String(), activeWindow->document());
+    Frame* frame = m_frame->loader().findFrameForNavigation(String(), activeWindow->document());
     if (!frame)
         return;
     frame->document()->domWindow()->setLocation(url, activeWindow, firstWindow);
index c56f0ec..11f1f71 100644 (file)
@@ -94,7 +94,7 @@ String Navigator::userAgent() const
     if (!m_frame->page())
         return String();
         
-    return m_frame->loader()->userAgent(m_frame->document()->url());
+    return m_frame->loader().userAgent(m_frame->document()->url());
 }
 
 DOMPluginArray* Navigator::plugins() const
index 8910d2b..87010ea 100644 (file)
@@ -426,10 +426,10 @@ void Page::goToItem(HistoryItem* item, FrameLoadType type)
     // being deref()-ed. Make sure we can still use it with HistoryController::goToItem later.
     RefPtr<HistoryItem> protector(item);
 
-    if (m_mainFrame->loader()->history()->shouldStopLoadingForHistoryItem(item))
-        m_mainFrame->loader()->stopAllLoaders();
+    if (m_mainFrame->loader().history()->shouldStopLoadingForHistoryItem(item))
+        m_mainFrame->loader().stopAllLoaders();
 
-    m_mainFrame->loader()->history()->goToItem(item, type);
+    m_mainFrame->loader().history()->goToItem(item, type);
 }
 
 int Page::getHistoryLength()
@@ -510,13 +510,13 @@ void Page::refreshPlugins(bool reload)
             continue;
         
         for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
-            if (frame->loader()->subframeLoader()->containsPlugins())
+            if (frame->loader().subframeLoader()->containsPlugins())
                 framesNeedingReload.append(frame);
         }
     }
 
     for (size_t i = 0; i < framesNeedingReload.size(); ++i)
-        framesNeedingReload[i]->loader()->reload();
+        framesNeedingReload[i]->loader().reload();
 }
 
 PluginData* Page::pluginData() const
@@ -727,7 +727,7 @@ void Page::setDefersLoading(bool defers)
 
     m_defersLoading = defers;
     for (Frame* frame = mainFrame(); frame; frame = frame->tree()->traverseNext())
-        frame->loader()->setDefersLoading(defers);
+        frame->loader().setDefersLoading(defers);
 }
 
 void Page::clearUndoRedoOperations()
@@ -1153,7 +1153,7 @@ void Page::setMemoryCacheClientCallsEnabled(bool enabled)
         return;
 
     for (RefPtr<Frame> frame = mainFrame(); frame; frame = frame->tree()->traverseNext())
-        frame->loader()->tellClientAboutPastMemoryCacheLoads();
+        frame->loader().tellClientAboutPastMemoryCacheLoads();
 }
 
 void Page::setMinimumTimerInterval(double minimumTimerInterval)
@@ -1461,7 +1461,7 @@ void Page::addRelevantRepaintedObject(RenderObject* object, const LayoutRect& ob
         m_isCountingRelevantRepaintedObjects = false;
         resetRelevantPaintedObjectCounter();
         if (Frame* frame = mainFrame())
-            frame->loader()->didLayout(DidHitRelevantRepaintedObjectsAreaThreshold);
+            frame->loader().didLayout(DidHitRelevantRepaintedObjectsAreaThreshold);
     }
 }
 
index d764b62..2cb3aef 100644 (file)
@@ -49,7 +49,7 @@ unsigned short PerformanceNavigation::type() const
     if (!m_frame)
         return TYPE_NAVIGATE;
 
-    DocumentLoader* documentLoader = m_frame->loader()->documentLoader();
+    DocumentLoader* documentLoader = m_frame->loader().documentLoader();
     if (!documentLoader)
         return TYPE_NAVIGATE;
 
@@ -69,7 +69,7 @@ unsigned short PerformanceNavigation::redirectCount() const
     if (!m_frame)
         return 0;
 
-    DocumentLoader* loader = m_frame->loader()->documentLoader();
+    DocumentLoader* loader = m_frame->loader().documentLoader();
     if (!loader)
         return 0;
 
index 4f992a8..c14080f 100644 (file)
@@ -315,7 +315,7 @@ DocumentLoader* PerformanceTiming::documentLoader() const
     if (!m_frame)
         return 0;
 
-    return m_frame->loader()->documentLoader();
+    return m_frame->loader().documentLoader();
 }
 
 const DocumentTiming* PerformanceTiming::documentTiming() const
index 573dae5..ea12672 100644 (file)
@@ -44,9 +44,9 @@ void Page::addSchedulePair(PassRefPtr<SchedulePair> prpPair)
     m_scheduledRunLoopPairs->add(pair);
 
     for (Frame* frame = m_mainFrame.get(); frame; frame = frame->tree()->traverseNext()) {
-        if (DocumentLoader* documentLoader = frame->loader()->documentLoader())
+        if (DocumentLoader* documentLoader = frame->loader().documentLoader())
             documentLoader->schedule(pair.get());
-        if (DocumentLoader* documentLoader = frame->loader()->provisionalDocumentLoader())
+        if (DocumentLoader* documentLoader = frame->loader().provisionalDocumentLoader())
             documentLoader->schedule(pair.get());
     }
 
@@ -63,9 +63,9 @@ void Page::removeSchedulePair(PassRefPtr<SchedulePair> prpPair)
     m_scheduledRunLoopPairs->remove(pair);
 
     for (Frame* frame = m_mainFrame.get(); frame; frame = frame->tree()->traverseNext()) {
-        if (DocumentLoader* documentLoader = frame->loader()->documentLoader())
+        if (DocumentLoader* documentLoader = frame->loader().documentLoader())
             documentLoader->unschedule(pair.get());
-        if (DocumentLoader* documentLoader = frame->loader()->provisionalDocumentLoader())
+        if (DocumentLoader* documentLoader = frame->loader().provisionalDocumentLoader())
             documentLoader->unschedule(pair.get());
     }
 }
index 3153d24..ba47e2a 100644 (file)
@@ -93,21 +93,21 @@ ResourceError downloadDestinationError(const ResourceResponse& response, const S
 
 ResourceError printError(const PrintContext* printContext, const String& errorMessage)
 {
-    DocumentLoader* documentLoader = printContext->frame()->loader()->documentLoader();
+    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
     return ResourceError(errorDomainPrint, PrintErrorGeneral,
                          documentLoader ? documentLoader->url() : KURL(), errorMessage);
 }
 
 ResourceError printerNotFoundError(const PrintContext* printContext)
 {
-    DocumentLoader* documentLoader = printContext->frame()->loader()->documentLoader();
+    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
     return ResourceError(errorDomainPrint, PrintErrorPrinterNotFound,
                          documentLoader ? documentLoader->url() : KURL(), _("Printer not found"));
 }
 
 ResourceError invalidPageRangeToPrint(const PrintContext* printContext)
 {
-    DocumentLoader* documentLoader = printContext->frame()->loader()->documentLoader();
+    DocumentLoader* documentLoader = printContext->frame()->loader().documentLoader();
     return ResourceError(errorDomainPrint, PrintErrorInvalidPageRange,
                          documentLoader ? documentLoader->url() : KURL(), _("Invalid page range"));
 }
index 7b9fc1a..79f9962 100644 (file)
@@ -254,7 +254,7 @@ static PassRefPtr<DocumentFragment> documentFragmentWithImageResource(Frame* fra
 {
     RefPtr<Element> imageElement = frame->document()->createElement(HTMLNames::imgTag, false);
 
-    if (DocumentLoader* loader = frame->loader()->documentLoader())
+    if (DocumentLoader* loader = frame->loader().documentLoader())
         loader->addArchiveResource(resource.get());
 
     NSURL *URL = resource->url();
@@ -300,7 +300,7 @@ static PassRefPtr<DocumentFragment> documentFragmentWithRTF(Frame* frame, NSStri
 
     size_t size = resources.size();
     if (size) {
-        DocumentLoader* loader = frame->loader()->documentLoader();
+        DocumentLoader* loader = frame->loader().documentLoader();
         for (size_t i = 0; i < size; ++i)
             loader->addArchiveResource(resources[i]);
     }
@@ -342,9 +342,9 @@ 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())
+                        if (DocumentLoader* loader = frame->loader().documentLoader())
                             loader->addAllArchiveResources(coreArchive.get());
 
                         fragment = createFragmentFromMarkup(frame->document(), markupString.get(), mainResource->url(), DisallowScriptingContent);
index a0f50b6..691f72d 100644 (file)
@@ -786,7 +786,7 @@ static inline NSShadow *_shadowForShadowStyle(NSString *shadowStyle)
     NSFileWrapper *fileWrapper = nil;
     static NSImage *missingImage = nil;
     Frame* frame = core([element ownerDocument])->frame();
-    DocumentLoader *dataSource = frame->loader()->frameHasLoaded() ? frame->loader()->documentLoader() : 0;
+    DocumentLoader *dataSource = frame->loader().frameHasLoaded() ? frame->loader().documentLoader() : 0;
     BOOL ignoreOrientation = YES;
 
     if (_flags.isIndexing) return NO;
@@ -1564,7 +1564,7 @@ static NSInteger _colCompare(id block1, id block2, void *)
             ancestorContainer = [ancestorContainer parentNode];
         }
         _document = [commonAncestorContainer ownerDocument];
-        _dataSource = (DocumentLoader *)core(_document)->frame()->loader()->documentLoader();
+        _dataSource = (DocumentLoader *)core(_document)->frame()->loader().documentLoader();
         if (_textSizeMultiplier <= 0.0) _textSizeMultiplier = 1;
         if (_defaultFontSize <= 0.0) _defaultFontSize = 12;
         if (_minimumFontSize < 1.0) _minimumFontSize = 1;
index 6750852..c3e627e 100644 (file)
@@ -415,7 +415,7 @@ static PassRefPtr<DocumentFragment> documentFragmentWithImageResource(Frame* fra
     if (!resource)
         return 0;
     
-    if (DocumentLoader* loader = frame->loader()->documentLoader())
+    if (DocumentLoader* loader = frame->loader().documentLoader())
         loader->addArchiveResource(resource.get());
 
     RefPtr<Element> imageElement = frame->document()->createElement(HTMLNames::imgTag, false);
@@ -460,7 +460,7 @@ static PassRefPtr<DocumentFragment> documentFragmentWithRTF(Frame* frame, NSStri
 
     size_t size = resources.size();
     if (size) {
-        DocumentLoader* loader = frame->loader()->documentLoader();
+        DocumentLoader* loader = frame->loader().documentLoader();
         for (size_t i = 0; i < size; ++i)
             loader->addArchiveResource(resources[i]);    
     }
@@ -495,10 +495,10 @@ 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())
+        if (DocumentLoader* loader = frame->loader().documentLoader())
             loader->addAllArchiveResources(coreArchive.get());
         return createFragmentFromMarkup(frame->document(), markupString.get(), mainResource->url(), DisallowScriptingAndPluginContent);
     }
index 2a49629..aba731f 100644 (file)
@@ -66,7 +66,7 @@ const String &DOMMimeType::description() const
 
 PassRefPtr<DOMPlugin> DOMMimeType::enabledPlugin() const
 {
-    if (!m_frame || !m_frame->page() || !m_frame->page()->mainFrame()->loader()->subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
+    if (!m_frame || !m_frame->page() || !m_frame->page()->mainFrame()->loader().subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin))
         return 0;
 
     return DOMPlugin::create(m_pluginData.get(), m_frame, m_pluginData->mimePluginIndices()[m_index]);
index 042551d..5059adb 100644 (file)
@@ -105,11 +105,11 @@ void PluginStream::stop()
     if (m_loadManually) {
         ASSERT(!m_loader);
 
-        DocumentLoader* documentLoader = m_frame->loader()->activeDocumentLoader();
+        DocumentLoader* documentLoader = m_frame->loader().activeDocumentLoader();
         ASSERT(documentLoader);
 
         if (documentLoader->isLoadingMainResource())
-            documentLoader->cancelMainResourceLoad(m_frame->loader()->cancelledError(m_resourceRequest));
+            documentLoader->cancelMainResourceLoad(m_frame->loader().cancelledError(m_resourceRequest));
 
         return;
     }
index f57a234..01401d2 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()
@@ -422,8 +422,7 @@ void PluginView::performRequest(PluginRequest* request)
     // don't let a plugin start any loads if it is no longer part of a document that is being 
     // displayed unless the loads are in the same frame as the plugin.
     const String& targetFrameName = request->frameLoadRequest().frameName();
-    if (m_parentFrame->loader()->documentLoader() != m_parentFrame->loader()->activeDocumentLoader() &&
-        (targetFrameName.isNull() || m_parentFrame->tree()->find(targetFrameName) != m_parentFrame))
+    if (m_parentFrame->loader().documentLoader() != m_parentFrame->loader().activeDocumentLoader() && (targetFrameName.isNull() || m_parentFrame->tree()->find(targetFrameName) != m_parentFrame))
         return;
 
     KURL requestURL = request->frameLoadRequest().resourceRequest().url();
@@ -444,7 +443,7 @@ void PluginView::performRequest(PluginRequest* request)
             FrameLoadRequest frameRequest(m_parentFrame.get(), request->frameLoadRequest().resourceRequest());
             frameRequest.setFrameName(targetFrameName);
             frameRequest.setShouldCheckNewWindowPolicy(true);
-            m_parentFrame->loader()->load(frameRequest);
+            m_parentFrame->loader().load(frameRequest);
 
             // FIXME: <rdar://problem/4807469> This should be sent when the document has finished loading
             if (request->sendNotification()) {
@@ -516,7 +515,7 @@ NPError PluginView::load(const FrameLoadRequest& frameLoadRequest, bool sendNoti
         return NPERR_INVALID_URL;
 
     // Don't allow requests to be made when the document loader is stopping all loaders.
-    DocumentLoader* loader = m_parentFrame->loader()->documentLoader();
+    DocumentLoader* loader = m_parentFrame->loader().documentLoader();
     if (!loader || loader->isStopping())
         return NPERR_GENERIC_ERROR;
 
@@ -889,7 +888,7 @@ void PluginView::didReceiveResponse(const ResourceResponse& response)
     ASSERT(m_loadManually);
     ASSERT(!m_manualStream);
 
-    m_manualStream = PluginStream::create(this, m_parentFrame.get(), m_parentFrame->loader()->activeDocumentLoader()->request(), false, 0, plugin()->pluginFuncs(), instance(), m_plugin->quirks());
+    m_manualStream = PluginStream::create(this, m_parentFrame.get(), m_parentFrame->loader().activeDocumentLoader()->request(), false, 0, plugin()->pluginFuncs(), instance(), m_plugin->quirks());
     m_manualStream->setLoadManually(true);
 
     m_manualStream->didReceiveResponse(0, response);
@@ -1256,7 +1255,7 @@ const char* PluginView::userAgent()
     else if (m_plugin->quirks().contains(PluginQuirkWantsChromeUserAgent))
         return ChromeUserAgent;
     if (m_userAgent.isNull())
-        m_userAgent = m_parentFrame->loader()->userAgent(m_url).utf8();
+        m_userAgent = m_parentFrame->loader().userAgent(m_url).utf8();
 
     return m_userAgent.data();
 }
@@ -1411,7 +1410,7 @@ NPError PluginView::getValueForURL(NPNURLVariable variable, const char* url, cha
         KURL u(m_parentFrame->document()->baseURL(), url);
         if (u.isValid()) {
             Frame* frame = getFrame(parentFrame(), m_element);
-            const FrameLoader* frameLoader = frame ? frame->loader() : 0;
+            const FrameLoader* frameLoader = frame ? &frame->loader() : 0;
             const NetworkingContext* context = frameLoader ? frameLoader->networkingContext() : 0;
             const CString proxyStr = toString(proxyServersForURL(u, context)).utf8();
             if (!proxyStr.isNull()) {
index 9f44173..b6a1282 100644 (file)
@@ -2261,7 +2261,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 4e36cf6..f1e3f07 100644 (file)
@@ -180,7 +180,7 @@ void SVGAElement::defaultEventHandler(Event* event)
             Frame* frame = document()->frame();
             if (!frame)
                 return;
-            frame->loader()->urlSelected(document()->completeURL(url), target, event, false, false, MaybeSendReferrer);
+            frame->loader().urlSelected(document()->completeURL(url), target, event, false, false, MaybeSendReferrer);
             return;
         }
     }
index eb8dccd..0bf6efc 100644 (file)
@@ -56,7 +56,7 @@ SVGImage::~SVGImage()
     if (m_page) {
         // Store m_page in a local variable, clearing m_page, so that SVGImageChromeClient knows we're destructed.
         OwnPtr<Page> currentPage = m_page.release();
-        currentPage->mainFrame()->loader()->frameDetached(); // Break both the loader and view references to the frame
+        currentPage->mainFrame()->loader().frameDetached(); // Break both the loader and view references to the frame
     }
 
     // Verify that page teardown destroyed the Chrome
@@ -370,17 +370,17 @@ bool SVGImage::dataChanged(bool allDataReceived)
         RefPtr<Frame> frame = Frame::create(m_page.get(), 0, dummyFrameLoaderClient);
         frame->setView(FrameView::create(frame.get()));
         frame->init();
-        FrameLoader* loader = frame->loader();
-        loader->forceSandboxFlags(SandboxAll);
+        FrameLoader& loader = frame->loader();
+        loader.forceSandboxFlags(SandboxAll);
 
         frame->view()->setCanHaveScrollbars(false); // SVG Images will always synthesize a viewBox, if it's not available, and thus never see scrollbars.
         frame->view()->setTransparent(true); // SVG Images are transparent.
 
-        ASSERT(loader->activeDocumentLoader()); // DocumentLoader should have been created by frame->init().
-        loader->activeDocumentLoader()->writer()->setMIMEType("image/svg+xml");
-        loader->activeDocumentLoader()->writer()->begin(KURL()); // create the empty document
-        loader->activeDocumentLoader()->writer()->addData(data()->data(), data()->size());
-        loader->activeDocumentLoader()->writer()->end();
+        ASSERT(loader.activeDocumentLoader()); // DocumentLoader should have been created by frame->init().
+        loader.activeDocumentLoader()->writer()->setMIMEType("image/svg+xml");
+        loader.activeDocumentLoader()->writer()->begin(KURL()); // create the empty document
+        loader.activeDocumentLoader()->writer()->addData(data()->data(), data()->size());
+        loader.activeDocumentLoader()->writer()->end();
 
         // Set the intrinsic size before a container size is available.
         m_intrinsicSize = containerSize();