Index: Source/WebCore/page/SecurityOrigin.cpp |
diff --git a/Source/WebCore/page/SecurityOrigin.cpp b/Source/WebCore/page/SecurityOrigin.cpp |
index 4436694fc6014ca73f4ed1950ea8bbc2ae1766e9..ab87da6e907b26887aba61304bbeb9ea64c0d444 100644 |
--- a/Source/WebCore/page/SecurityOrigin.cpp |
+++ b/Source/WebCore/page/SecurityOrigin.cpp |
@@ -84,6 +84,10 @@ static KURL extractInnerURL(const KURL& url) |
{ |
// FIXME: Update this callsite to use the innerURL member function when |
// we finish implementing it. |
+#if ENABLE(FILE_SYSTEM) |
+ if (url.inner_url()) |
+ return *url.inner_url(); |
+#endif |
return KURL(ParsedURLString, decodeURLEscapeSequences(url.path())); |
abarth-chromium
2011/12/20 07:03:15
This shouldn't be conditional on ENABLE(FILE_SYSTE
ericu
2011/12/20 23:55:34
Currently innerURL only exists if ENABLE(FILE_SYST
|
} |
@@ -124,6 +128,33 @@ SecurityOrigin::SecurityOrigin(const KURL& url) |
, m_enforceFilePathSeparation(false) |
, m_needsDatabaseIdentifierQuirkForFiles(false) |
{ |
+ // These protocols do not create security origins; the owner frame provides the origin |
+ if (m_protocol == "about" || m_protocol == "javascript") |
+ m_protocol = ""; |
+ |
+#if ENABLE(BLOB) |
+ if (m_protocol == BlobURL::blobProtocol()) { |
+ KURL originURL(ParsedURLString, decodeURLEscapeSequences(url.path())); |
+ if (originURL.isValid()) { |
+ m_protocol = originURL.protocol().lower(); |
+ m_host = originURL.host().lower(); |
+ m_port = originURL.port(); |
+ } else |
+ m_isUnique = true; |
+ } |
+#endif |
+ |
+#if ENABLE(FILE_SYSTEM) |
+ if (m_protocol == "filesystem") { |
+ if (url.inner_url() && url.inner_url()->isValid()) { |
+ m_protocol = url.inner_url()->protocol().lower(); |
+ m_host = url.inner_url()->host().lower(); |
+ m_port = url.inner_url()->port(); |
+ } else |
+ m_isUnique = true; |
+ } |
+#endif |
+ |
abarth-chromium
2011/12/20 07:03:15
None of this code should be here anymore. It all
ericu
2011/12/20 23:55:34
I took out the non-FILE_SYSTEM code, but left my s
|
// document.domain starts as m_host, but can be set by the DOM. |
m_domain = m_host; |