| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
      ed. | 2  * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
      ed. | 
| 3  * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3  * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 
| 4  * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
      orchmobile.com/) | 4  * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
      orchmobile.com/) | 
| 5  * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5  * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 
| 6  * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6  * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 
| 7  * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7  * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 
| 8  * Copyright (C) 2011 Google Inc. All rights reserved. | 8  * Copyright (C) 2011 Google Inc. All rights reserved. | 
| 9  * | 9  * | 
| 10  * Redistribution and use in source and binary forms, with or without | 10  * Redistribution and use in source and binary forms, with or without | 
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 79 #include "core/page/CreateWindow.h" | 79 #include "core/page/CreateWindow.h" | 
| 80 #include "core/page/FrameTree.h" | 80 #include "core/page/FrameTree.h" | 
| 81 #include "core/page/Page.h" | 81 #include "core/page/Page.h" | 
| 82 #include "core/page/WindowFeatures.h" | 82 #include "core/page/WindowFeatures.h" | 
| 83 #include "core/page/scrolling/ScrollingCoordinator.h" | 83 #include "core/page/scrolling/ScrollingCoordinator.h" | 
| 84 #include "core/svg/graphics/SVGImage.h" | 84 #include "core/svg/graphics/SVGImage.h" | 
| 85 #include "core/xml/parser/XMLDocumentParser.h" | 85 #include "core/xml/parser/XMLDocumentParser.h" | 
| 86 #include "platform/Logging.h" | 86 #include "platform/Logging.h" | 
| 87 #include "platform/PluginScriptForbiddenScope.h" | 87 #include "platform/PluginScriptForbiddenScope.h" | 
| 88 #include "platform/ScriptForbiddenScope.h" | 88 #include "platform/ScriptForbiddenScope.h" | 
|  | 89 #include "platform/TraceEvent.h" | 
| 89 #include "platform/UserGestureIndicator.h" | 90 #include "platform/UserGestureIndicator.h" | 
| 90 #include "platform/network/HTTPParsers.h" | 91 #include "platform/network/HTTPParsers.h" | 
| 91 #include "platform/network/ResourceRequest.h" | 92 #include "platform/network/ResourceRequest.h" | 
| 92 #include "platform/scroll/ScrollAnimatorBase.h" | 93 #include "platform/scroll/ScrollAnimatorBase.h" | 
| 93 #include "platform/weborigin/SecurityOrigin.h" | 94 #include "platform/weborigin/SecurityOrigin.h" | 
| 94 #include "platform/weborigin/SecurityPolicy.h" | 95 #include "platform/weborigin/SecurityPolicy.h" | 
| 95 #include "platform/weborigin/Suborigin.h" | 96 #include "platform/weborigin/Suborigin.h" | 
| 96 #include "public/platform/WebCachePolicy.h" | 97 #include "public/platform/WebCachePolicy.h" | 
| 97 #include "public/platform/WebURLRequest.h" | 98 #include "public/platform/WebURLRequest.h" | 
| 98 #include "wtf/TemporaryChange.h" | 99 #include "wtf/TemporaryChange.h" | 
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 166     , m_progressTracker(ProgressTracker::create(frame)) | 167     , m_progressTracker(ProgressTracker::create(frame)) | 
| 167     , m_loadType(FrameLoadTypeStandard) | 168     , m_loadType(FrameLoadTypeStandard) | 
| 168     , m_inStopAllLoaders(false) | 169     , m_inStopAllLoaders(false) | 
| 169     , m_checkTimer(this, &FrameLoader::checkTimerFired) | 170     , m_checkTimer(this, &FrameLoader::checkTimerFired) | 
| 170     , m_didAccessInitialDocument(false) | 171     , m_didAccessInitialDocument(false) | 
| 171     , m_didAccessInitialDocumentTimer(this, &FrameLoader::didAccessInitialDocume
      ntTimerFired) | 172     , m_didAccessInitialDocumentTimer(this, &FrameLoader::didAccessInitialDocume
      ntTimerFired) | 
| 172     , m_forcedSandboxFlags(SandboxNone) | 173     , m_forcedSandboxFlags(SandboxNone) | 
| 173     , m_dispatchingDidClearWindowObjectInMainWorld(false) | 174     , m_dispatchingDidClearWindowObjectInMainWorld(false) | 
| 174     , m_protectProvisionalLoader(false) | 175     , m_protectProvisionalLoader(false) | 
| 175 { | 176 { | 
|  | 177     TRACE_EVENT_OBJECT_CREATED_WITH_ID("loading", "FrameLoader", this); | 
|  | 178     takeObjectSnapshot(); | 
| 176 } | 179 } | 
| 177 | 180 | 
| 178 FrameLoader::~FrameLoader() | 181 FrameLoader::~FrameLoader() | 
| 179 { | 182 { | 
| 180     // Verify that this FrameLoader has been detached. | 183     // Verify that this FrameLoader has been detached. | 
| 181     ASSERT(!m_progressTracker); | 184     ASSERT(!m_progressTracker); | 
| 182 } | 185 } | 
| 183 | 186 | 
| 184 DEFINE_TRACE(FrameLoader) | 187 DEFINE_TRACE(FrameLoader) | 
| 185 { | 188 { | 
| 186     visitor->trace(m_frame); | 189     visitor->trace(m_frame); | 
| 187     visitor->trace(m_progressTracker); | 190     visitor->trace(m_progressTracker); | 
| 188     visitor->trace(m_documentLoader); | 191     visitor->trace(m_documentLoader); | 
| 189     visitor->trace(m_provisionalDocumentLoader); | 192     visitor->trace(m_provisionalDocumentLoader); | 
| 190     visitor->trace(m_currentItem); | 193     visitor->trace(m_currentItem); | 
| 191     visitor->trace(m_provisionalItem); | 194     visitor->trace(m_provisionalItem); | 
| 192     visitor->trace(m_deferredHistoryLoad); | 195     visitor->trace(m_deferredHistoryLoad); | 
| 193 } | 196 } | 
| 194 | 197 | 
| 195 void FrameLoader::init() | 198 void FrameLoader::init() | 
| 196 { | 199 { | 
| 197     ResourceRequest initialRequest(KURL(ParsedURLString, emptyString())); | 200     ResourceRequest initialRequest(KURL(ParsedURLString, emptyString())); | 
| 198     initialRequest.setRequestContext(WebURLRequest::RequestContextInternal); | 201     initialRequest.setRequestContext(WebURLRequest::RequestContextInternal); | 
| 199     initialRequest.setFrameType(m_frame->isMainFrame() ? WebURLRequest::FrameTyp
      eTopLevel : WebURLRequest::FrameTypeNested); | 202     initialRequest.setFrameType(m_frame->isMainFrame() ? WebURLRequest::FrameTyp
      eTopLevel : WebURLRequest::FrameTypeNested); | 
| 200     m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, initia
      lRequest, SubstituteData()); | 203     m_provisionalDocumentLoader = client()->createDocumentLoader(m_frame, initia
      lRequest, SubstituteData()); | 
| 201     m_provisionalDocumentLoader->startLoadingMainResource(); | 204     m_provisionalDocumentLoader->startLoadingMainResource(); | 
| 202     m_frame->document()->cancelParsing(); | 205     m_frame->document()->cancelParsing(); | 
| 203     m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocu
      ment); | 206     m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocu
      ment); | 
|  | 207     takeObjectSnapshot(); | 
| 204 } | 208 } | 
| 205 | 209 | 
| 206 FrameLoaderClient* FrameLoader::client() const | 210 FrameLoaderClient* FrameLoader::client() const | 
| 207 { | 211 { | 
| 208     return static_cast<FrameLoaderClient*>(m_frame->client()); | 212     return static_cast<FrameLoaderClient*>(m_frame->client()); | 
| 209 } | 213 } | 
| 210 | 214 | 
| 211 void FrameLoader::setDefersLoading(bool defers) | 215 void FrameLoader::setDefersLoading(bool defers) | 
| 212 { | 216 { | 
| 213     if (m_provisionalDocumentLoader) | 217     if (m_provisionalDocumentLoader) | 
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 304         m_frame->view()->clear(); | 308         m_frame->view()->clear(); | 
| 305 | 309 | 
| 306     m_frame->script().enableEval(); | 310     m_frame->script().enableEval(); | 
| 307 | 311 | 
| 308     m_frame->navigationScheduler().cancel(); | 312     m_frame->navigationScheduler().cancel(); | 
| 309 | 313 | 
| 310     m_checkTimer.stop(); | 314     m_checkTimer.stop(); | 
| 311 | 315 | 
| 312     if (m_stateMachine.isDisplayingInitialEmptyDocument()) | 316     if (m_stateMachine.isDisplayingInitialEmptyDocument()) | 
| 313         m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad
      ); | 317         m_stateMachine.advanceTo(FrameLoaderStateMachine::CommittedFirstRealLoad
      ); | 
|  | 318 | 
|  | 319     takeObjectSnapshot(); | 
| 314 } | 320 } | 
| 315 | 321 | 
| 316 // This is only called by ScriptController::executeScriptIfJavaScriptURL | 322 // This is only called by ScriptController::executeScriptIfJavaScriptURL | 
| 317 // and always contains the result of evaluating a javascript: url. | 323 // and always contains the result of evaluating a javascript: url. | 
| 318 // This is the <iframe src="javascript:'html'"> case. | 324 // This is the <iframe src="javascript:'html'"> case. | 
| 319 void FrameLoader::replaceDocumentWhileExecutingJavaScriptURL(const String& sourc
      e, Document* ownerDocument) | 325 void FrameLoader::replaceDocumentWhileExecutingJavaScriptURL(const String& sourc
      e, Document* ownerDocument) | 
| 320 { | 326 { | 
| 321     if (!m_frame->document()->loader() || m_frame->document()->pageDismissalEven
      tBeingDispatched() != Document::NoDismissal) | 327     if (!m_frame->document()->loader() || m_frame->document()->pageDismissalEven
      tBeingDispatched() != Document::NoDismissal) | 
| 322         return; | 328         return; | 
| 323 | 329 | 
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 431     client()->dispatchDidCommitLoad(m_currentItem.get(), historyCommitType); | 437     client()->dispatchDidCommitLoad(m_currentItem.get(), historyCommitType); | 
| 432 | 438 | 
| 433     // didObserveLoadingBehavior() must be called after dispatchDidCommitLoad() 
      is called for the metrics tracking logic to handle it properly. | 439     // didObserveLoadingBehavior() must be called after dispatchDidCommitLoad() 
      is called for the metrics tracking logic to handle it properly. | 
| 434     if (client()->isControlledByServiceWorker(*m_documentLoader)) | 440     if (client()->isControlledByServiceWorker(*m_documentLoader)) | 
| 435         client()->didObserveLoadingBehavior(WebLoadingBehaviorServiceWorkerContr
      olled); | 441         client()->didObserveLoadingBehavior(WebLoadingBehaviorServiceWorkerContr
      olled); | 
| 436 | 442 | 
| 437     TRACE_EVENT1("devtools.timeline", "CommitLoad", "data", InspectorCommitLoadE
      vent::data(m_frame)); | 443     TRACE_EVENT1("devtools.timeline", "CommitLoad", "data", InspectorCommitLoadE
      vent::data(m_frame)); | 
| 438     InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get()); | 444     InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get()); | 
| 439     m_frame->page()->didCommitLoad(m_frame); | 445     m_frame->page()->didCommitLoad(m_frame); | 
| 440     dispatchDidClearDocumentOfWindowObject(); | 446     dispatchDidClearDocumentOfWindowObject(); | 
|  | 447 | 
|  | 448     takeObjectSnapshot(); | 
| 441 } | 449 } | 
| 442 | 450 | 
| 443 void FrameLoader::didInstallNewDocument(bool dispatchWindowObjectAvailable) | 451 void FrameLoader::didInstallNewDocument(bool dispatchWindowObjectAvailable) | 
| 444 { | 452 { | 
| 445     ASSERT(m_frame); | 453     ASSERT(m_frame); | 
| 446     ASSERT(m_frame->document()); | 454     ASSERT(m_frame->document()); | 
| 447 | 455 | 
| 448     m_frame->document()->setReadyState(Document::Loading); | 456     m_frame->document()->setReadyState(Document::Loading); | 
| 449 | 457 | 
| 450     if (dispatchWindowObjectAvailable) | 458     if (dispatchWindowObjectAvailable) | 
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 741     checkCompleted(); | 749     checkCompleted(); | 
| 742 | 750 | 
| 743     m_frame->localDOMWindow()->statePopped(stateObject ? stateObject : Serialize
      dScriptValue::nullValue()); | 751     m_frame->localDOMWindow()->statePopped(stateObject ? stateObject : Serialize
      dScriptValue::nullValue()); | 
| 744 | 752 | 
| 745     if (historyLoadType == HistorySameDocumentLoad) | 753     if (historyLoadType == HistorySameDocumentLoad) | 
| 746         restoreScrollPositionAndViewState(); | 754         restoreScrollPositionAndViewState(); | 
| 747 | 755 | 
| 748     // We need to scroll to the fragment whether or not a hash change occurred, 
      since | 756     // We need to scroll to the fragment whether or not a hash change occurred, 
      since | 
| 749     // the user might have scrolled since the previous navigation. | 757     // the user might have scrolled since the previous navigation. | 
| 750     processFragment(url, NavigationWithinSameDocument); | 758     processFragment(url, NavigationWithinSameDocument); | 
|  | 759     takeObjectSnapshot(); | 
| 751 } | 760 } | 
| 752 | 761 | 
| 753 void FrameLoader::setReferrerForFrameRequest(ResourceRequest& request, ShouldSen
      dReferrer shouldSendReferrer, Document* originDocument) | 762 void FrameLoader::setReferrerForFrameRequest(ResourceRequest& request, ShouldSen
      dReferrer shouldSendReferrer, Document* originDocument) | 
| 754 { | 763 { | 
| 755     if (!originDocument) | 764     if (!originDocument) | 
| 756         return; | 765         return; | 
| 757     // Anchor elements with the 'referrerpolicy' attribute will have | 766     // Anchor elements with the 'referrerpolicy' attribute will have | 
| 758     // already set the referrer on the request. | 767     // already set the referrer on the request. | 
| 759     if (request.didSetHTTPReferrer()) | 768     if (request.didSetHTTPReferrer()) | 
| 760         return; | 769         return; | 
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1020     m_checkTimer.stop(); | 1029     m_checkTimer.stop(); | 
| 1021     m_frame->navigationScheduler().cancel(); | 1030     m_frame->navigationScheduler().cancel(); | 
| 1022 | 1031 | 
| 1023     // It's possible that the above actions won't have stopped loading if load | 1032     // It's possible that the above actions won't have stopped loading if load | 
| 1024     // completion had been blocked on parsing or if we were in the middle of | 1033     // completion had been blocked on parsing or if we were in the middle of | 
| 1025     // committing an empty document. In that case, emulate a failed navigation. | 1034     // committing an empty document. In that case, emulate a failed navigation. | 
| 1026     if (!m_provisionalDocumentLoader && m_documentLoader && m_frame->isLoading()
      ) | 1035     if (!m_provisionalDocumentLoader && m_documentLoader && m_frame->isLoading()
      ) | 
| 1027         loadFailed(m_documentLoader.get(), ResourceError::cancelledError(m_docum
      entLoader->url())); | 1036         loadFailed(m_documentLoader.get(), ResourceError::cancelledError(m_docum
      entLoader->url())); | 
| 1028 | 1037 | 
| 1029     m_inStopAllLoaders = false; | 1038     m_inStopAllLoaders = false; | 
|  | 1039     takeObjectSnapshot(); | 
| 1030 } | 1040 } | 
| 1031 | 1041 | 
| 1032 void FrameLoader::didAccessInitialDocument() | 1042 void FrameLoader::didAccessInitialDocument() | 
| 1033 { | 1043 { | 
| 1034     // We only need to notify the client once, and only for the main frame. | 1044     // We only need to notify the client once, and only for the main frame. | 
| 1035     if (isLoadingMainFrame() && !m_didAccessInitialDocument) { | 1045     if (isLoadingMainFrame() && !m_didAccessInitialDocument) { | 
| 1036         m_didAccessInitialDocument = true; | 1046         m_didAccessInitialDocument = true; | 
| 1037         // Notify asynchronously, since this is called within a JavaScript secur
      ity check. | 1047         // Notify asynchronously, since this is called within a JavaScript secur
      ity check. | 
| 1038         m_didAccessInitialDocumentTimer.startOneShot(0, BLINK_FROM_HERE); | 1048         m_didAccessInitialDocumentTimer.startOneShot(0, BLINK_FROM_HERE); | 
| 1039     } | 1049     } | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1098     } | 1108     } | 
| 1099     // 'abort' listeners can also detach the frame. | 1109     // 'abort' listeners can also detach the frame. | 
| 1100     if (!m_frame->client()) | 1110     if (!m_frame->client()) | 
| 1101         return false; | 1111         return false; | 
| 1102     ASSERT(m_provisionalDocumentLoader == pdl); | 1112     ASSERT(m_provisionalDocumentLoader == pdl); | 
| 1103     // No more events will be dispatched so detach the Document. | 1113     // No more events will be dispatched so detach the Document. | 
| 1104     // TODO(yoav): Should we also be nullifying domWindow's document (or domWind
      ow) since the doc is now detached? | 1114     // TODO(yoav): Should we also be nullifying domWindow's document (or domWind
      ow) since the doc is now detached? | 
| 1105     if (m_frame->document()) | 1115     if (m_frame->document()) | 
| 1106         m_frame->document()->detach(); | 1116         m_frame->document()->detach(); | 
| 1107     m_documentLoader = m_provisionalDocumentLoader.release(); | 1117     m_documentLoader = m_provisionalDocumentLoader.release(); | 
|  | 1118     takeObjectSnapshot(); | 
| 1108 | 1119 | 
| 1109     return true; | 1120     return true; | 
| 1110 } | 1121 } | 
| 1111 | 1122 | 
| 1112 void FrameLoader::commitProvisionalLoad() | 1123 void FrameLoader::commitProvisionalLoad() | 
| 1113 { | 1124 { | 
| 1114     ASSERT(client()->hasWebView()); | 1125     ASSERT(client()->hasWebView()); | 
| 1115 | 1126 | 
| 1116     // Check if the destination page is allowed to access the previous page's ti
      ming information. | 1127     // Check if the destination page is allowed to access the previous page's ti
      ming information. | 
| 1117     if (m_frame->document()) { | 1128     if (m_frame->document()) { | 
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1224     detachDocumentLoader(m_documentLoader); | 1235     detachDocumentLoader(m_documentLoader); | 
| 1225     detachDocumentLoader(m_provisionalDocumentLoader); | 1236     detachDocumentLoader(m_provisionalDocumentLoader); | 
| 1226 | 1237 | 
| 1227     Frame* parent = m_frame->tree().parent(); | 1238     Frame* parent = m_frame->tree().parent(); | 
| 1228     if (parent && parent->isLocalFrame()) | 1239     if (parent && parent->isLocalFrame()) | 
| 1229         toLocalFrame(parent)->loader().scheduleCheckCompleted(); | 1240         toLocalFrame(parent)->loader().scheduleCheckCompleted(); | 
| 1230     if (m_progressTracker) { | 1241     if (m_progressTracker) { | 
| 1231         m_progressTracker->dispose(); | 1242         m_progressTracker->dispose(); | 
| 1232         m_progressTracker.clear(); | 1243         m_progressTracker.clear(); | 
| 1233     } | 1244     } | 
|  | 1245 | 
|  | 1246     TRACE_EVENT_OBJECT_DELETED_WITH_ID("loading", "FrameLoader", this); | 
| 1234 } | 1247 } | 
| 1235 | 1248 | 
| 1236 void FrameLoader::loadFailed(DocumentLoader* loader, const ResourceError& error) | 1249 void FrameLoader::loadFailed(DocumentLoader* loader, const ResourceError& error) | 
| 1237 { | 1250 { | 
| 1238     if (!error.isCancellation() && m_frame->owner()) { | 1251     if (!error.isCancellation() && m_frame->owner()) { | 
| 1239         // FIXME: For now, fallback content doesn't work cross process. | 1252         // FIXME: For now, fallback content doesn't work cross process. | 
| 1240         if (m_frame->owner()->isLocal()) | 1253         if (m_frame->owner()->isLocal()) | 
| 1241             m_frame->deprecatedLocalOwner()->renderFallbackContent(); | 1254             m_frame->deprecatedLocalOwner()->renderFallbackContent(); | 
| 1242     } | 1255     } | 
| 1243 | 1256 | 
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1415         client()->dispatchWillSubmitForm(frameLoadRequest.form()); | 1428         client()->dispatchWillSubmitForm(frameLoadRequest.form()); | 
| 1416 | 1429 | 
| 1417     m_progressTracker->progressStarted(); | 1430     m_progressTracker->progressStarted(); | 
| 1418     if (m_provisionalDocumentLoader->isClientRedirect()) | 1431     if (m_provisionalDocumentLoader->isClientRedirect()) | 
| 1419         m_provisionalDocumentLoader->appendRedirect(m_frame->document()->url()); | 1432         m_provisionalDocumentLoader->appendRedirect(m_frame->document()->url()); | 
| 1420     m_provisionalDocumentLoader->appendRedirect(m_provisionalDocumentLoader->req
      uest().url()); | 1433     m_provisionalDocumentLoader->appendRedirect(m_provisionalDocumentLoader->req
      uest().url()); | 
| 1421     double triggeringEventTime = frameLoadRequest.triggeringEvent() ? frameLoadR
      equest.triggeringEvent()->platformTimeStamp() : 0; | 1434     double triggeringEventTime = frameLoadRequest.triggeringEvent() ? frameLoadR
      equest.triggeringEvent()->platformTimeStamp() : 0; | 
| 1422     client()->dispatchDidStartProvisionalLoad(triggeringEventTime); | 1435     client()->dispatchDidStartProvisionalLoad(triggeringEventTime); | 
| 1423     ASSERT(m_provisionalDocumentLoader); | 1436     ASSERT(m_provisionalDocumentLoader); | 
| 1424     m_provisionalDocumentLoader->startLoadingMainResource(); | 1437     m_provisionalDocumentLoader->startLoadingMainResource(); | 
|  | 1438 | 
|  | 1439     takeObjectSnapshot(); | 
| 1425 } | 1440 } | 
| 1426 | 1441 | 
| 1427 void FrameLoader::applyUserAgent(ResourceRequest& request) | 1442 void FrameLoader::applyUserAgent(ResourceRequest& request) | 
| 1428 { | 1443 { | 
| 1429     String userAgent = this->userAgent(); | 1444     String userAgent = this->userAgent(); | 
| 1430     ASSERT(!userAgent.isNull()); | 1445     ASSERT(!userAgent.isNull()); | 
| 1431     request.setHTTPUserAgent(AtomicString(userAgent)); | 1446     request.setHTTPUserAgent(AtomicString(userAgent)); | 
| 1432 } | 1447 } | 
| 1433 | 1448 | 
| 1434 bool FrameLoader::shouldTreatURLAsSameAsCurrent(const KURL& url) const | 1449 bool FrameLoader::shouldTreatURLAsSameAsCurrent(const KURL& url) const | 
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1530 | 1545 | 
| 1531     // FIXME: We need a way to propagate insecure requests policy flags to | 1546     // FIXME: We need a way to propagate insecure requests policy flags to | 
| 1532     // out-of-process frames. For now, we'll always use default behavior. | 1547     // out-of-process frames. For now, we'll always use default behavior. | 
| 1533     if (!parentFrame->isLocalFrame()) | 1548     if (!parentFrame->isLocalFrame()) | 
| 1534         return nullptr; | 1549         return nullptr; | 
| 1535 | 1550 | 
| 1536     ASSERT(toLocalFrame(parentFrame)->document()); | 1551     ASSERT(toLocalFrame(parentFrame)->document()); | 
| 1537     return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
      ; | 1552     return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
      ; | 
| 1538 } | 1553 } | 
| 1539 | 1554 | 
|  | 1555 PassOwnPtr<TracedValue> FrameLoader::toTracedValue() const | 
|  | 1556 { | 
|  | 1557     OwnPtr<TracedValue> tracedValue = TracedValue::create(); | 
|  | 1558     tracedValue->beginDictionary("frame"); | 
|  | 1559     tracedValue->setString("id_ref", String::format("0x%" PRIx64, static_cast<ui
      nt64_t>(reinterpret_cast<uintptr_t>(m_frame.get())))); | 
|  | 1560     tracedValue->endDictionary(); | 
|  | 1561     tracedValue->setBoolean("isLoadingMainFrame", isLoadingMainFrame()); | 
|  | 1562     tracedValue->setString("stateMachine", m_stateMachine.toString()); | 
|  | 1563     tracedValue->setString("provisionalDocumentLoaderURL", m_provisionalDocument
      Loader ? m_provisionalDocumentLoader->url() : String()); | 
|  | 1564     tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
      der->url() : String()); | 
|  | 1565     return tracedValue.release(); | 
|  | 1566 } | 
|  | 1567 | 
|  | 1568 inline void FrameLoader::takeObjectSnapshot() const | 
|  | 1569 { | 
|  | 1570     TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
      Value()); | 
|  | 1571 } | 
|  | 1572 | 
| 1540 } // namespace blink | 1573 } // namespace blink | 
| OLD | NEW | 
|---|