[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

inferno at chromium.org inferno at chromium.org
Wed Dec 22 14:43:56 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 78094717a5b51b008cdace09d469fcfb5b2f8099
Author: inferno at chromium.org <inferno at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 18 21:15:11 2010 +0000

    2010-10-18  Johnny Ding  <jnd at chromium.org>
    
            Reviewed by Adam Barth.
    
            Set the right referent sourceURL for the script with force user gesture.
            https://bugs.webkit.org/show_bug.cgi?id=37138
    
            Because empty sourceURL indicates running script with force user gesture,
            make WebKit use document.url() as referent sourceURL (Since it uses blank
            URL instead empty if the input URL is empty) if WebKit isn't running the
            script from a hyper-link.
    
            Test: fast/events/popup-blocked-from-window-open.html
    
            * bindings/ScriptControllerBase.cpp:
            (WebCore::ScriptController::executeScript):
            * bindings/js/ScriptController.cpp:
            (WebCore::ScriptController::executeScriptInWorld):
    2010-10-18  Johnny Ding  <jnd at chromium.org>
    
            Reviewed by Adam Barth.
    
            Set the right referent sourceURL for the script with force user gesture.
            https://bugs.webkit.org/show_bug.cgi?id=37138
    
            * fast/events/popup-blocked-from-window-open-expected.txt: Added.
            * fast/events/popup-blocked-from-window-open.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69990 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b8da392..d99b741 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-18  Johnny Ding  <jnd at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Set the right referent sourceURL for the script with force user gesture.
+        https://bugs.webkit.org/show_bug.cgi?id=37138
+
+        * fast/events/popup-blocked-from-window-open-expected.txt: Added.
+        * fast/events/popup-blocked-from-window-open.html: Added.
+
 2010-10-18  James Robinson  <jamesr at chromium.org>
 
         Update chromium expectations and baselines.
diff --git a/LayoutTests/fast/events/popup-blocked-from-window-open-expected.txt b/LayoutTests/fast/events/popup-blocked-from-window-open-expected.txt
new file mode 100644
index 0000000..72503ce
--- /dev/null
+++ b/LayoutTests/fast/events/popup-blocked-from-window-open-expected.txt
@@ -0,0 +1,3 @@
+If the inner pop-up was not blocked then there will be one additional windows generated. Otherwise, the test passes.
+For more details, please refer to https://bugs.webkit.org/show_bug.cgi?id=37138.
+PASSED
diff --git a/LayoutTests/fast/events/popup-blocked-from-window-open.html b/LayoutTests/fast/events/popup-blocked-from-window-open.html
new file mode 100644
index 0000000..7d035eb
--- /dev/null
+++ b/LayoutTests/fast/events/popup-blocked-from-window-open.html
@@ -0,0 +1,30 @@
+<html>
+<head>
+<script>
+if (window.layoutTestController) {
+  layoutTestController.dumpAsText();
+  layoutTestController.setCanOpenWindows();
+  layoutTestController.setPopupBlockingEnabled(true);
+  layoutTestController.setCloseRemainingWindowsWhenComplete(true);
+  layoutTestController.waitUntilDone();
+    // Record current window count.
+    window.windowCount = window.layoutTestController.windowCount();
+}
+
+function test() {
+    if (window.layoutTestController && window.layoutTestController.windowCount() == window.windowCount)
+        document.getElementById("console").innerText = "PASSED";
+    // Close the test.
+    layoutTestController.notifyDone();
+}
+</script>
+</head>
+<body onload="test()">
+<script>
+window.open("javascript:window.open('about:blank', '_blank', 'height=600,width=720')");
+</script>
+If the inner pop-up was not blocked then there will be one additional windows generated. Otherwise, the test passes.<br>
+For more details, please refer to https://bugs.webkit.org/show_bug.cgi?id=37138.
+<div id="console">FAILED</div>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 54ff022..2018539 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-10-18  Johnny Ding  <jnd at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Set the right referent sourceURL for the script with force user gesture.
+        https://bugs.webkit.org/show_bug.cgi?id=37138
+
+        Because empty sourceURL indicates running script with force user gesture,
+        make WebKit use document.url() as referent sourceURL (Since it uses blank
+        URL instead empty if the input URL is empty) if WebKit isn't running the
+        script from a hyper-link.
+
+        Test: fast/events/popup-blocked-from-window-open.html
+
+        * bindings/ScriptControllerBase.cpp:
+        (WebCore::ScriptController::executeScript):
+        * bindings/js/ScriptController.cpp:
+        (WebCore::ScriptController::executeScriptInWorld):
+
 2010-10-18  Darin Adler  <darin at apple.com>
 
         * dom/Node.h: Fix ancient typo in just-modified comment.
diff --git a/WebCore/bindings/ScriptControllerBase.cpp b/WebCore/bindings/ScriptControllerBase.cpp
index 1ac16a5..a77ff9c 100644
--- a/WebCore/bindings/ScriptControllerBase.cpp
+++ b/WebCore/bindings/ScriptControllerBase.cpp
@@ -46,7 +46,7 @@ bool ScriptController::canExecuteScripts(ReasonForCallingCanExecuteScripts reaso
 
 ScriptValue ScriptController::executeScript(const String& script, bool forceUserGesture, ShouldAllowXSS shouldAllowXSS)
 {
-    return executeScript(ScriptSourceCode(script, forceUserGesture ? KURL() : m_frame->loader()->url()), shouldAllowXSS);
+    return executeScript(ScriptSourceCode(script, forceUserGesture ? KURL() : m_frame->document()->url()), shouldAllowXSS);
 }
 
 ScriptValue ScriptController::executeScript(const ScriptSourceCode& sourceCode, ShouldAllowXSS shouldAllowXSS)
diff --git a/WebCore/bindings/js/ScriptController.cpp b/WebCore/bindings/js/ScriptController.cpp
index 97f2310..e03c822 100644
--- a/WebCore/bindings/js/ScriptController.cpp
+++ b/WebCore/bindings/js/ScriptController.cpp
@@ -494,7 +494,7 @@ void ScriptController::clearScriptObjects()
 
 ScriptValue ScriptController::executeScriptInWorld(DOMWrapperWorld* world, const String& script, bool forceUserGesture, ShouldAllowXSS shouldAllowXSS)
 {
-    ScriptSourceCode sourceCode(script, forceUserGesture ? KURL() : m_frame->loader()->url());
+    ScriptSourceCode sourceCode(script, forceUserGesture ? KURL() : m_frame->document()->url());
 
     if (!canExecuteScripts(AboutToExecuteScript) || isPaused())
         return ScriptValue();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list