| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "core/frame/LocalFrame.h" | 31 #include "core/frame/LocalFrame.h" |
| 32 #include "core/loader/DocumentLoader.h" | 32 #include "core/loader/DocumentLoader.h" |
| 33 #include "core/loader/FrameLoader.h" | 33 #include "core/loader/FrameLoader.h" |
| 34 #include "core/loader/FrameLoaderClient.h" | 34 #include "core/loader/FrameLoaderClient.h" |
| 35 #include "core/loader/HistoryItem.h" | 35 #include "core/loader/HistoryItem.h" |
| 36 #include "core/loader/NavigationScheduler.h" | 36 #include "core/loader/NavigationScheduler.h" |
| 37 #include "core/page/Page.h" | 37 #include "core/page/Page.h" |
| 38 #include "platform/RuntimeEnabledFeatures.h" | 38 #include "platform/RuntimeEnabledFeatures.h" |
| 39 #include "platform/weborigin/KURL.h" | 39 #include "platform/weborigin/KURL.h" |
| 40 #include "platform/weborigin/SecurityOrigin.h" | 40 #include "platform/weborigin/SecurityOrigin.h" |
| 41 #include "wtf/MainThread.h" | |
| 42 | 41 |
| 43 namespace blink { | 42 namespace blink { |
| 44 | 43 |
| 45 namespace { | 44 namespace { |
| 46 | 45 |
| 47 bool equalIgnoringPathQueryAndFragment(const KURL& a, const KURL& b) | 46 bool equalIgnoringPathQueryAndFragment(const KURL& a, const KURL& b) |
| 48 { | 47 { |
| 49 int aLength = a.pathStart(); | 48 int aLength = a.pathStart(); |
| 50 int bLength = b.pathStart(); | 49 int bLength = b.pathStart(); |
| 51 | 50 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 if (!canChangeToUrl(fullURL, m_frame->document()->getSecurityOrigin(), m_fra
me->document()->url())) { | 214 if (!canChangeToUrl(fullURL, m_frame->document()->getSecurityOrigin(), m_fra
me->document()->url())) { |
| 216 // We can safely expose the URL to JavaScript, as a) no redirection take
s place: JavaScript already had this URL, b) JavaScript can only access a same-o
rigin History object. | 215 // We can safely expose the URL to JavaScript, as a) no redirection take
s place: JavaScript already had this URL, b) JavaScript can only access a same-o
rigin History object. |
| 217 exceptionState.throwSecurityError("A history state object with URL '" +
fullURL.elidedString() + "' cannot be created in a document with origin '" + m_f
rame->document()->getSecurityOrigin()->toString() + "' and URL '" + m_frame->doc
ument()->url().elidedString() + "'."); | 216 exceptionState.throwSecurityError("A history state object with URL '" +
fullURL.elidedString() + "' cannot be created in a document with origin '" + m_f
rame->document()->getSecurityOrigin()->toString() + "' and URL '" + m_frame->doc
ument()->url().elidedString() + "'."); |
| 218 return; | 217 return; |
| 219 } | 218 } |
| 220 | 219 |
| 221 m_frame->loader().updateForSameDocumentNavigation(fullURL, SameDocumentNavig
ationHistoryApi, data, restorationType, type); | 220 m_frame->loader().updateForSameDocumentNavigation(fullURL, SameDocumentNavig
ationHistoryApi, data, restorationType, type); |
| 222 } | 221 } |
| 223 | 222 |
| 224 } // namespace blink | 223 } // namespace blink |
| OLD | NEW |