Unreviewed, rolling out r100213.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Nov 2011 11:14:49 +0000 (11:14 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Nov 2011 11:14:49 +0000 (11:14 +0000)
http://trac.webkit.org/changeset/100213
https://bugs.webkit.org/show_bug.cgi?id=72371

"Breaks test_shell_tests" (Requested by tonyg-cr on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-11-15

Source/WebCore:

* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::SecurityOrigin):
* platform/SchemeRegistry.cpp:
(WebCore::schemesWithUniqueOrigins):

LayoutTests:

* fast/filesystem/async-operations-expected.txt:
* fast/filesystem/not-enough-arguments-expected.txt:
* fast/filesystem/read-directory-expected.txt:
* fast/filesystem/simple-persistent-expected.txt:
* fast/filesystem/simple-readonly-expected.txt:
* fast/filesystem/simple-temporary-expected.txt:
* fast/frames/resources/sandboxed-iframe-storage-disallowed.html:
* fast/frames/sandboxed-iframe-attribute-parsing.html:
* fast/frames/sandboxed-iframe-forms-dynamic.html:
* fast/frames/sandboxed-iframe-forms.html:
* fast/frames/sandboxed-iframe-navigation-top-by-constant-name.html:
* fast/frames/sandboxed-iframe-navigation-top-by-constant-name2.html:
* fast/frames/sandboxed-iframe-navigation-top-by-name.html:
* fast/frames/sandboxed-iframe-navigation-top.html:
* media/video-controls-no-scripting.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100262 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/filesystem/async-operations-expected.txt
LayoutTests/fast/filesystem/not-enough-arguments-expected.txt
LayoutTests/fast/filesystem/read-directory-expected.txt
LayoutTests/fast/filesystem/simple-persistent-expected.txt
LayoutTests/fast/filesystem/simple-readonly-expected.txt
LayoutTests/fast/filesystem/simple-temporary-expected.txt
LayoutTests/fast/frames/resources/sandboxed-iframe-storage-disallowed.html
LayoutTests/fast/frames/sandboxed-iframe-attribute-parsing.html
LayoutTests/fast/frames/sandboxed-iframe-forms-dynamic.html
LayoutTests/fast/frames/sandboxed-iframe-forms.html
LayoutTests/fast/frames/sandboxed-iframe-navigation-top-by-constant-name.html
LayoutTests/fast/frames/sandboxed-iframe-navigation-top-by-constant-name2.html
LayoutTests/fast/frames/sandboxed-iframe-navigation-top-by-name.html
LayoutTests/fast/frames/sandboxed-iframe-navigation-top.html
LayoutTests/media/video-controls-no-scripting.html
Source/WebCore/ChangeLog
Source/WebCore/page/SecurityOrigin.cpp
Source/WebCore/platform/SchemeRegistry.cpp

index 91eb0063f4d69441c5dd3dffcfa4b65c099b2bb1..fe2528437b72d859abc5791e17b2ecfcc92762ee 100644 (file)
@@ -1,3 +1,27 @@
+2011-11-15  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r100213.
+        http://trac.webkit.org/changeset/100213
+        https://bugs.webkit.org/show_bug.cgi?id=72371
+
+        "Breaks test_shell_tests" (Requested by tonyg-cr on #webkit).
+
+        * fast/filesystem/async-operations-expected.txt:
+        * fast/filesystem/not-enough-arguments-expected.txt:
+        * fast/filesystem/read-directory-expected.txt:
+        * fast/filesystem/simple-persistent-expected.txt:
+        * fast/filesystem/simple-readonly-expected.txt:
+        * fast/filesystem/simple-temporary-expected.txt:
+        * fast/frames/resources/sandboxed-iframe-storage-disallowed.html:
+        * fast/frames/sandboxed-iframe-attribute-parsing.html:
+        * fast/frames/sandboxed-iframe-forms-dynamic.html:
+        * fast/frames/sandboxed-iframe-forms.html:
+        * fast/frames/sandboxed-iframe-navigation-top-by-constant-name.html:
+        * fast/frames/sandboxed-iframe-navigation-top-by-constant-name2.html:
+        * fast/frames/sandboxed-iframe-navigation-top-by-name.html:
+        * fast/frames/sandboxed-iframe-navigation-top.html:
+        * media/video-controls-no-scripting.html:
+
 2011-11-15  Csaba Osztrogonác  <ossy@webkit.org>
 
         [Qt] Unviewed fix after r100254, because committed results was incorrect.
index 10cae9df2c1a038746100491c80cf8cf2679b52b..3ec41749fef3b75fcbff1a3ad6ccb54e5a5fcbb3 100644 (file)
@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 requested FileSystem.
-Got FileSystem:__0:Temporary
+Got FileSystem:file__0:Temporary
 Starting async test stage 1.
 Starting async test stage 2.
 Verifying the FileSystem status.
index b37c549f6085cbf4e2d24e471fbdeaf5f8f45476..c146d10fcc48f11a62b888461fc83655f8961a34 100644 (file)
@@ -3,7 +3,7 @@ This test tries calling various filesystem functions with too few arguments.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-Successfully obtained Persistent FileSystem:__0:Temporary
+Successfully obtained Persistent FileSystem:file__0:Temporary
 PASS fileSystem.root.moveTo() threw exception TypeError: Not enough arguments.
 PASS fileSystem.root.copyTo() threw exception TypeError: Not enough arguments.
 PASS reader.readEntries() threw exception TypeError: Not enough arguments.
index b22715184e20f5cdbf73b626677e9e915fb2e1c0..92d1487cea2cf734f89efa39260f702c128b6977 100644 (file)
@@ -3,7 +3,7 @@ DirectoryReader.readEntries() test.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-Successfully obtained Persistent FileSystem:__0:Temporary
+Successfully obtained Persistent FileSystem:file__0:Temporary
 PASS readEntriesCount is entriesCallbackCount
 PASS resultEntries.length is testEntriesCount
 Entry:/a isDirectory:true
index a96d1dadf9033fb1656ad77d39206a380672ee48..7dbcca90541bc0b105d83dfb99c4a4585cc0516a 100644 (file)
@@ -3,7 +3,7 @@ requestFileSystem PERSISTENT test.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-Successfully obtained PERSISTENT FileSystem:__0:Persistent
+Successfully obtained PERSISTENT FileSystem:file__0:Persistent
 PASS fileSystem.name.length > 0 is true
 PASS fileSystem.root.fullPath is "/"
 PASS successfullyParsed is true
index 36ceaa66ce69f1e11285467d675ca03c81d1f2b2..0ae04b649b804410f489e1e86d2b5d87037aa78d 100644 (file)
@@ -6,7 +6,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 webkitRequestFileSystem(TEMPORARY, 100, successCallback, errorCallback)
 trying to set readonly property fileSystem.name
 fileSystem.name = 'bar'
-PASS fileSystem.name is still __0:Temporary
+PASS fileSystem.name is still file__0:Temporary
 root = fileSystem.root
 root.getFile('foo', {create:true}, getFileCallback, errorCallback)
 trying to set readonly property fileEntry.isFile
index 596ef530c7288f88df4c27557ae1bc9d2b0c8069..3917761748a603fb32d02debb611052d2f4560d5 100644 (file)
@@ -3,7 +3,7 @@ requestFileSystem TEMPORARY test.
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-Successfully obtained TEMPORARY FileSystem:__0:Temporary
+Successfully obtained TEMPORARY FileSystem:file__0:Temporary
 PASS fileSystem.name.length > 0 is true
 PASS fileSystem.root.fullPath is "/"
 PASS successfullyParsed is true
index 16d1f6cf3080138803dd3dd621d75cbe8c0feba4..19f4e2e9ab0f47090ecf53f5989aa49f973975dc 100644 (file)
@@ -1,59 +1,6 @@
 <html>
 <head>
-<script>
-// This code is inlined from js-test-pre.js because this document is displayed
-// in a sandboxed iframe and cannot load local resources.
-
-if (window.layoutTestController)
-    layoutTestController.dumpAsText();
-
-function debug(msg)
-{
-    var span = document.createElement("span");
-    document.getElementById("console").appendChild(span);
-    span.innerHTML = msg + '<br />';
-}
-
-function escapeHTML(text)
-{
-    return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\0/g, "\\0");
-}
-
-function testPassed(msg)
-{
-    debug('<span><span class="pass">PASS</span> ' + escapeHTML(msg) + '</span>');
-}
-
-function testFailed(msg)
-{
-    debug('<span><span class="fail">FAIL</span> ' + escapeHTML(msg) + '</span>');
-}
-
-function shouldThrow(_a, _e)
-{
-  var exception;
-  var _av;
-  try {
-     _av = eval(_a);
-  } catch (e) {
-     exception = e;
-  }
-
-  var _ev;
-  if (_e)
-      _ev =  eval(_e);
-
-  if (exception) {
-    if (typeof _e == "undefined" || exception == _ev)
-      testPassed(_a + " threw exception " + exception + ".");
-    else
-      testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception" : _ev) + ". Threw exception " + exception + ".");
-  } else if (typeof _av == "undefined")
-    testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception" : _ev) + ". Was undefined.");
-  else
-    testFailed(_a + " should throw " + (typeof _e == "undefined" ? "an exception" : _ev) + ". Was " + _av + ".");
-}
-</script>
+<script src="../../js/resources/js-test-pre.js"></script>
 <script>
 
 window.onload = function() {
index 10ffbb8dee356d6fac29dcfcca6edb144cc17dcc..7ced36434612a22a86c00438173c800be4b8aab8 100644 (file)
@@ -56,7 +56,7 @@ window.onload = function()
     <!-- iframes where script execution is allowed, but origin is not shared -->
 
     <!-- plain, proper attribute value -->
-    <iframe sandbox="allow-scripts allow-same-origin"
+    <iframe sandbox="allow-scripts"
             name="f1"
             src="resources/sandboxed-iframe-attribute-parsing-allowed.html">
     </iframe>
@@ -66,7 +66,7 @@ window.onload = function()
 
 allow-scripts
 
-allow-same-origin"
+"
             name="f2"
             src="resources/sandboxed-iframe-attribute-parsing-allowed.html">
     </iframe>
@@ -103,7 +103,7 @@ allow-same-origin"
         
         'Kyssarna' ('The kisses'), Esaias Tegnér, 1782-1846
 
-    allow-scripts allow-same-origin
+    allow-scripts
     
         int main(void)
         {
@@ -114,44 +114,44 @@ allow-same-origin"
     </iframe>
 
     <!-- tab characters before and after attribute value -->
-    <iframe sandbox="          allow-scripts           allow-same-origin"
+    <iframe sandbox="          allow-scripts           "
             name="f4"
             src="resources/sandboxed-iframe-attribute-parsing-allowed.html">
     </iframe>
 
     <!-- mixed case -->
-    <iframe sandbox="AlLoW-sCrIpTs allow-same-origin"
+    <iframe sandbox="AlLoW-sCrIpTs"
             name="f5"
             src="resources/sandboxed-iframe-attribute-parsing-allowed.html">
     </iframe>
 
     <!-- iframes where script execution is disallowed -->
 
-    <iframe sandbox="allowscripts allow-same-origin"
+    <iframe sandbox="allowscripts"
             src="resources/sandboxed-iframe-attribute-parsing-disallowed.html">
     </iframe>
 
-    <iframe sandbox="allows-cripts allow-same-origin"
+    <iframe sandbox="allows-cripts"
             src="resources/sandboxed-iframe-attribute-parsing-disallowed.html">
     </iframe>
 
-    <iframe sandbox="-allow-scripts allow-same-origin"
+    <iframe sandbox="-allow-scripts"
             src="resources/sandboxed-iframe-attribute-parsing-disallowed.html">
     </iframe>
 
-    <iframe sandbox="allow_scripts allow-same-origin"
+    <iframe sandbox="allow_scripts"
             src="resources/sandboxed-iframe-attribute-parsing-disallowed.html">
     </iframe>
 
-    <iframe sandbox="allowScripts allow-same-origin"
+    <iframe sandbox="allowScripts"
             src="resources/sandboxed-iframe-attribute-parsing-disallowed.html">
     </iframe>
 
-    <iframe sandbox="aallow-scripts allow-same-origin"
+    <iframe sandbox="aallow-scripts"
             src="resources/sandboxed-iframe-attribute-parsing-disallowed.html">
     </iframe>
 
-    <iframe sandbox="allow-scriptss allow-same-origin"
+    <iframe sandbox="allow-scriptss"
             src="resources/sandboxed-iframe-attribute-parsing-disallowed.html">
     </iframe>
 
index 77b5cb859eb98cf49aac1f7dd5584960b58add6c..15fd4a52c35e82b709645300dd657c821196b626 100644 (file)
@@ -30,9 +30,9 @@ function disallowedFormSubmitted()
 window.onload = function() {
     frameElements = document.getElementsByTagName("iframe");
 
-    frameElements[0].sandbox = "allow-scripts allow-same-origin";
-    frameElements[1].sandbox = "allow-scripts allow-forms allow-same-origin";
-    frameElements[2].sandbox = "allow-scripts allow-same-origin";
+    frameElements[0].sandbox = "allow-scripts";
+    frameElements[1].sandbox = "allow-scripts allow-forms";
+    frameElements[2].sandbox = "allow-scripts";
 
     frames[0].postMessage("go", "*");
     frames[1].postMessage("go", "*");
@@ -45,15 +45,15 @@ window.onload = function() {
 <body>
 
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-forms allow-same-origin"
+        sandbox="allow-scripts allow-forms"
         src="resources/sandboxed-iframe-form-dynamic-allowed.html">
     </iframe>
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-same-origin"
+        sandbox="allow-scripts"
         src="resources/sandboxed-iframe-form-dynamic-disallowed.html">
     </iframe>
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-forms allow-same-origin"
+        sandbox="allow-scripts allow-forms"
         src="resources/sandboxed-iframe-form-dynamic-allowed.html">
     </iframe>
 
index 1d83b3455cfcca1d7e4cbd5fd8925d0d956b0c12..c2f8e61eef582fa0ee271f6323ca5ac48c4e4ae6 100644 (file)
@@ -41,53 +41,53 @@ function disallowedFormSubmitted()
     <!-- five IFrames with forms allowed -->
 
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-forms allow-same-origin"
+        sandbox="allow-scripts allow-forms"
         src="resources/sandboxed-iframe-form-allowed.html">
     </iframe>
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-forms allow-same-origin"
+        sandbox="allow-scripts allow-forms"
         src="resources/sandboxed-iframe-form-allowed.html">
     </iframe>
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-forms allow-same-origin"
+        sandbox="allow-scripts allow-forms"
         src="resources/sandboxed-iframe-form-allowed.html">
     </iframe>
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-forms allow-same-origin"
+        sandbox="allow-scripts allow-forms"
         src="resources/sandboxed-iframe-form-allowed.html">
     </iframe>
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-forms allow-same-origin"
+        sandbox="allow-scripts allow-forms"
         src="resources/sandboxed-iframe-form-allowed.html">
     </iframe>
 
     <!-- one IFrame with forms disallowed -->
 
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-same-origin"
+        sandbox="allow-scripts"
         src="resources/sandboxed-iframe-form-disallowed.html">
     </iframe>
 
     <!-- five more IFrames with forms allowed -->
 
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-forms allow-same-origin"
+        sandbox="allow-scripts allow-forms"
         src="resources/sandboxed-iframe-form-allowed.html">
     </iframe>
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-forms allow-same-origin"
+        sandbox="allow-scripts allow-forms"
         src="resources/sandboxed-iframe-form-allowed.html">
     </iframe>
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-forms allow-same-origin"
+        sandbox="allow-scripts allow-forms"
         src="resources/sandboxed-iframe-form-allowed.html">
     </iframe>
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-forms allow-same-origin"
+        sandbox="allow-scripts allow-forms"
         src="resources/sandboxed-iframe-form-allowed.html">
     </iframe>
     <iframe style="width: 60px; height: 60px;"
-        sandbox="allow-scripts allow-forms allow-same-origin"
+        sandbox="allow-scripts allow-forms"
         src="resources/sandboxed-iframe-form-allowed.html">
     </iframe>
     
index 1855ee4f57c2c2b42362d673789d435d479e298d..983b04dad4fc307e869866afe87b3b0575c8c138 100644 (file)
@@ -9,7 +9,7 @@ if (window.layoutTestController) {
 </head>
 <body>
 <p>This test verifies that a sandboxed IFrame can navigate the top-level frame with allow-top-navigation.</p>
-<iframe sandbox="allow-scripts allow-top-navigation allow-same-origin"
+<iframe sandbox="allow-scripts allow-top-navigation"
         src="resources/navigate-top-by-constant-name-to-pass.html">
 </body>
 </html>
index 1e5dd6264eeed347b543755e3c2fcc56a5216c38..288898b34052bfee37eb519bac6a751a015c4961 100644 (file)
@@ -9,7 +9,7 @@ if (window.layoutTestController) {
 </head>
 <body>
 <p>This test verifies that a sandboxed IFrame can navigate the top-level frame with allow-top-navigation.</p>
-<iframe sandbox="allow-scripts allow-top-navigation allow-same-origin"
+<iframe sandbox="allow-scripts allow-top-navigation"
         src="resources/navigate-top-by-constant-name2-to-pass.html">
 </body>
 </html>
index 09d39ed81f816cd709f994cebaff780b157b66b4..0d86d904b4dded1562e15f0b1b9a1ffb64c83731 100644 (file)
@@ -10,7 +10,7 @@ window.name = "target";
 </head>
 <body>
 <p>This test verifies that a sandboxed IFrame can navigate the top-level frame with allow-top-navigation.</p>
-<iframe sandbox="allow-scripts allow-top-navigation allow-same-origin"
+<iframe sandbox="allow-scripts allow-top-navigation"
         src="resources/navigate-top-by-name-to-pass.html">
 </body>
 </html>
index 5e1016165863f3bad393a3e1deedb4168d8781b7..eb57d953c454413720d1e005a575d6b36879d7cd 100644 (file)
@@ -9,7 +9,7 @@ if (window.layoutTestController) {
 </head>
 <body>
 <p>This test verifies that a sandboxed IFrame can navigate the top-level frame with allow-top-navigation.</p>
-<iframe sandbox="allow-scripts allow-top-navigation allow-same-origin"
+<iframe sandbox="allow-scripts allow-top-navigation"
         src="resources/navigate-top-to-pass.html">
 </body>
 </html>
index d2431ddc827a245a0d4f4d877108b8b49e5e9c8c..b7089356c08712f19abef9bce4605e98bd360eba 100644 (file)
@@ -27,7 +27,7 @@
 
     <body>
 
-        <iframe sandbox="allow-same-origin" src="resources/video-controls-no-scripting-iframe.html" id="fr" style="width: 400px; height: 320px; border: 1px solid black;"></iframe>
+        <iframe sandbox src="resources/video-controls-no-scripting-iframe.html" id="fr" style="width: 400px; height: 320px; border: 1px solid black;"></iframe>
 
         <p>Tests that the built-in controls are always enabled when JavaScript is disabled.</p>
         <pre id="console"></pre>
index 394d9d9c537810d61d2f2329f19ab344fb9d37dc..1c571093b640d3fcd5f850d7edb2534956ed94f4 100644 (file)
@@ -1,3 +1,16 @@
+2011-11-15  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r100213.
+        http://trac.webkit.org/changeset/100213
+        https://bugs.webkit.org/show_bug.cgi?id=72371
+
+        "Breaks test_shell_tests" (Requested by tonyg-cr on #webkit).
+
+        * page/SecurityOrigin.cpp:
+        (WebCore::SecurityOrigin::SecurityOrigin):
+        * platform/SchemeRegistry.cpp:
+        (WebCore::schemesWithUniqueOrigins):
+
 2011-11-15  Alpha Lam  <hclam@chromium.org>
 
         [chromium] scroll deltas are cleared during commit to the main thread
index f1a7d685f68411f5c7bdc25f8d54991745e0438f..d86e56500a2e809b0f605dbc2ddc82d0eb95c6b1 100644 (file)
@@ -41,7 +41,6 @@
 
 namespace WebCore {
 
-const int InvalidPort = 0;
 const int MaxAllowedPort = 65535;
 
 static bool schemeRequiresAuthority(const String& scheme)
@@ -66,6 +65,10 @@ SecurityOrigin::SecurityOrigin(const KURL& url, bool forceUnique)
     , m_domainWasSetInDOM(false)
     , m_enforceFilePathSeparation(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) || ENABLE(FILE_SYSTEM)
     bool isBlobOrFileSystemProtocol = false;
 #if ENABLE(BLOB)
@@ -90,7 +93,6 @@ SecurityOrigin::SecurityOrigin(const KURL& url, bool forceUnique)
     // For edge case URLs that were probably misparsed, make sure that the origin is unique.
     if (schemeRequiresAuthority(m_protocol) && m_host.isEmpty())
         m_isUnique = true;
-
     if (m_protocol.isEmpty())
         m_isUnique = true;
 
@@ -114,14 +116,7 @@ SecurityOrigin::SecurityOrigin(const KURL& url, bool forceUnique)
     }
 
     if (isDefaultPortForProtocol(m_port, m_protocol))
-        m_port = InvalidPort;
-
-    // Don't leak details from URLs into unique origins.
-    if (m_isUnique) {
-        m_protocol = "";
-        m_host = "";
-        m_port = InvalidPort;
-    }
+        m_port = 0;
 }
 
 SecurityOrigin::SecurityOrigin(const SecurityOrigin* other)
index 5cdeb33750a1cba0013cd1177d0093a67a00b42c..67f427584e6300e3e9a3a842388757e67cbc2b1c 100644 (file)
@@ -68,13 +68,10 @@ static URLSchemesMap& schemesWithUniqueOrigins()
 {
     DEFINE_STATIC_LOCAL(URLSchemesMap, schemesWithUniqueOrigins, ());
 
-    if (schemesWithUniqueOrigins.isEmpty()) {
-        schemesWithUniqueOrigins.add("about");
-        schemesWithUniqueOrigins.add("javascript");
-        // This is a willful violation of HTML5.
-        // See https://bugs.webkit.org/show_bug.cgi?id=11885
+    // This is a willful violation of HTML5.
+    // See https://bugs.webkit.org/show_bug.cgi?id=11885
+    if (schemesWithUniqueOrigins.isEmpty())
         schemesWithUniqueOrigins.add("data");
-    }
 
     return schemesWithUniqueOrigins;
 }