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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
278 if (!equalIgnoringFragmentIdentifier(m_documentLoader->url(), m_currentI tem->url())) | 278 if (!equalIgnoringFragmentIdentifier(m_documentLoader->url(), m_currentI tem->url())) |
279 m_currentItem->generateNewDocumentSequenceNumber(); | 279 m_currentItem->generateNewDocumentSequenceNumber(); |
280 } | 280 } |
281 | 281 |
282 m_currentItem->setURL(m_documentLoader->urlForHistory()); | 282 m_currentItem->setURL(m_documentLoader->urlForHistory()); |
283 m_currentItem->setDocumentState(m_frame->document()->formElementsState()); | 283 m_currentItem->setDocumentState(m_frame->document()->formElementsState()); |
284 m_currentItem->setTarget(m_frame->tree().uniqueName()); | 284 m_currentItem->setTarget(m_frame->tree().uniqueName()); |
285 if (isPushOrReplaceState) | 285 if (isPushOrReplaceState) |
286 m_currentItem->setStateObject(stateObject); | 286 m_currentItem->setStateObject(stateObject); |
287 m_currentItem->setReferrer(Referrer(m_documentLoader->request().httpReferrer (), m_documentLoader->request().referrerPolicy())); | 287 m_currentItem->setReferrer(Referrer(m_documentLoader->request().httpReferrer (), m_documentLoader->request().referrerPolicy())); |
288 m_currentItem->setFormInfoFromRequest(isPushOrReplaceState ? ResourceRequest () : m_documentLoader->request()); | 288 m_currentItem->setFormInfoFromRequest(m_documentLoader->request()); |
Nate Chapin
2014/05/28 21:26:16
This special case is no longer necessary, as setFo
| |
289 } | 289 } |
290 | 290 |
291 static HistoryCommitType loadTypeToCommitType(FrameLoadType type) | 291 static HistoryCommitType loadTypeToCommitType(FrameLoadType type) |
292 { | 292 { |
293 switch (type) { | 293 switch (type) { |
294 case FrameLoadTypeStandard: | 294 case FrameLoadTypeStandard: |
295 return StandardCommit; | 295 return StandardCommit; |
296 case FrameLoadTypeInitialInChildFrame: | 296 case FrameLoadTypeInitialInChildFrame: |
297 return InitialCommitInChildFrame; | 297 return InitialCommitInChildFrame; |
298 case FrameLoadTypeBackForward: | 298 case FrameLoadTypeBackForward: |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
525 bool allowed = client()->allowPlugins(settings && settings->pluginsEnabled() ); | 525 bool allowed = client()->allowPlugins(settings && settings->pluginsEnabled() ); |
526 if (!allowed && reason == AboutToInstantiatePlugin) | 526 if (!allowed && reason == AboutToInstantiatePlugin) |
527 client()->didNotAllowPlugins(); | 527 client()->didNotAllowPlugins(); |
528 return allowed; | 528 return allowed; |
529 } | 529 } |
530 | 530 |
531 void FrameLoader::updateForSameDocumentNavigation(const KURL& newURL, SameDocume ntNavigationSource sameDocumentNavigationSource, PassRefPtr<SerializedScriptValu e> data, FrameLoadType type) | 531 void FrameLoader::updateForSameDocumentNavigation(const KURL& newURL, SameDocume ntNavigationSource sameDocumentNavigationSource, PassRefPtr<SerializedScriptValu e> data, FrameLoadType type) |
532 { | 532 { |
533 // Update the data source's request with the new URL to fake the URL change | 533 // Update the data source's request with the new URL to fake the URL change |
534 m_frame->document()->setURL(newURL); | 534 m_frame->document()->setURL(newURL); |
535 documentLoader()->updateForSameDocumentNavigation(newURL); | 535 documentLoader()->updateForSameDocumentNavigation(newURL, sameDocumentNaviga tionSource); |
536 | 536 |
537 // Generate start and stop notifications only when loader is completed so th at we | 537 // Generate start and stop notifications only when loader is completed so th at we |
538 // don't fire them for fragment redirection that happens in window.onload ha ndler. | 538 // don't fire them for fragment redirection that happens in window.onload ha ndler. |
539 // See https://bugs.webkit.org/show_bug.cgi?id=31838 | 539 // See https://bugs.webkit.org/show_bug.cgi?id=31838 |
540 if (m_frame->document()->loadEventFinished()) | 540 if (m_frame->document()->loadEventFinished()) |
541 client()->didStartLoading(NavigationWithinSameDocument); | 541 client()->didStartLoading(NavigationWithinSameDocument); |
542 | 542 |
543 HistoryCommitType historyCommitType = loadTypeToCommitType(type); | 543 HistoryCommitType historyCommitType = loadTypeToCommitType(type); |
544 if (!m_currentItem) | 544 if (!m_currentItem) |
545 historyCommitType = HistoryInertCommit; | 545 historyCommitType = HistoryInertCommit; |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1439 { | 1439 { |
1440 SandboxFlags flags = m_forcedSandboxFlags; | 1440 SandboxFlags flags = m_forcedSandboxFlags; |
1441 if (LocalFrame* parentFrame = m_frame->tree().parent()) | 1441 if (LocalFrame* parentFrame = m_frame->tree().parent()) |
1442 flags |= parentFrame->document()->sandboxFlags(); | 1442 flags |= parentFrame->document()->sandboxFlags(); |
1443 if (FrameOwner* frameOwner = m_frame->ownerElement()) | 1443 if (FrameOwner* frameOwner = m_frame->ownerElement()) |
1444 flags |= frameOwner->sandboxFlags(); | 1444 flags |= frameOwner->sandboxFlags(); |
1445 return flags; | 1445 return flags; |
1446 } | 1446 } |
1447 | 1447 |
1448 } // namespace WebCore | 1448 } // namespace WebCore |
OLD | NEW |