diff options
Diffstat (limited to 'WebCore/loader/FrameLoader.cpp')
-rw-r--r-- | WebCore/loader/FrameLoader.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp index 6fcdcbe..8920b6a 100644 --- a/WebCore/loader/FrameLoader.cpp +++ b/WebCore/loader/FrameLoader.cpp @@ -60,7 +60,6 @@ #include "FrameLoaderClient.h" #include "FrameTree.h" #include "FrameView.h" -#include "Geolocation.h" #include "HTMLAnchorElement.h" #include "HTMLAppletElement.h" #include "HTMLFormElement.h" @@ -78,7 +77,6 @@ #include "Logging.h" #include "MIMETypeRegistry.h" #include "MainResourceLoader.h" -#include "Navigator.h" #include "Page.h" #include "PageCache.h" #include "PageGroup.h" @@ -624,11 +622,6 @@ void FrameLoader::stopLoading(UnloadEventPolicy unloadEventPolicy, DatabasePolic #endif } - // Stop the Geolocation object, if present. This call is made after the unload - // event has fired, so no new Geolocation activity is possible. - if (m_frame->domWindow()->navigator()->optionalGeolocation()) - m_frame->domWindow()->navigator()->optionalGeolocation()->stop(); - // tell all subframes to stop as well for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tree()->nextSibling()) child->loader()->stopLoading(unloadEventPolicy); @@ -2196,6 +2189,7 @@ static bool canAccessAncestor(const SecurityOrigin* activeSecurityOrigin, Frame* if (!targetFrame) return false; + const bool isLocalActiveOrigin = activeSecurityOrigin->isLocal(); for (Frame* ancestorFrame = targetFrame; ancestorFrame; ancestorFrame = ancestorFrame->tree()->parent()) { Document* ancestorDocument = ancestorFrame->document(); if (!ancestorDocument) @@ -2204,6 +2198,10 @@ static bool canAccessAncestor(const SecurityOrigin* activeSecurityOrigin, Frame* const SecurityOrigin* ancestorSecurityOrigin = ancestorDocument->securityOrigin(); if (activeSecurityOrigin->canAccess(ancestorSecurityOrigin)) return true; + + // Allow file URL descendant navigation even when allowFileAccessFromFileURLs is false. + if (isLocalActiveOrigin && ancestorSecurityOrigin->isLocal()) + return true; } return false; |