[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 16:27:50 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 199b8da48c8efd9f37c4877002bd0095060824e4
Author: inferno at chromium.org <inferno at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 24 04:14:40 2010 +0000

    2010-11-22  Abhishek Arya  <inferno at chromium.org>
    
            Reviewed by Adam Barth.
    
            r71925 broke the chrome new tab page. r71925 blocked drag and drop
            of same security origin objects onto themselves if their origin is
            marked unique. We need to allow drag and drop in that scenario.
            https://bugs.webkit.org/show_bug.cgi?id=49098
    
            Test: http/tests/security/drag-drop-same-unique-origin.html
    
            * page/SecurityOrigin.cpp:
            (WebCore::SecurityOrigin::canReceiveDragData):
    2010-11-23  Abhishek Arya  <inferno at chromium.org>
    
            Reviewed by Adam Barth.
    
            Tests that drag and drop is allowed across the same security origin object,
            even if they are marked unique.
    
            * http/tests/security/drag-drop-same-unique-origin-expected.txt: Added.
            * http/tests/security/drag-drop-same-unique-origin.html: Added.
            * http/tests/security/resources/drag-drop-allowed.html: Added.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72644 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index dc60983..cf7e24d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-23  Abhishek Arya  <inferno at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Tests that drag and drop is allowed across the same security origin object,
+        even if they are marked unique.
+
+        * http/tests/security/drag-drop-same-unique-origin-expected.txt: Added.
+        * http/tests/security/drag-drop-same-unique-origin.html: Added.
+        * http/tests/security/resources/drag-drop-allowed.html: Added.
+
 2010-11-23  Ryosuke Niwa  <rniwa at webkit.org>
 
         Unreviewed update of GTK's skipped list.
diff --git a/LayoutTests/fast/events/resize-subframe-expected.txt b/LayoutTests/http/tests/security/drag-drop-same-unique-origin-expected.txt
similarity index 100%
copy from LayoutTests/fast/events/resize-subframe-expected.txt
copy to LayoutTests/http/tests/security/drag-drop-same-unique-origin-expected.txt
diff --git a/LayoutTests/http/tests/security/drag-drop-same-unique-origin.html b/LayoutTests/http/tests/security/drag-drop-same-unique-origin.html
new file mode 100644
index 0000000..1216336
--- /dev/null
+++ b/LayoutTests/http/tests/security/drag-drop-same-unique-origin.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<script>
+if (window.layoutTestController) {
+    layoutTestController.waitUntilDone();
+    layoutTestController.dumpAsText();
+}
+</script>
+</head>
+<body>
+<iframe src="http://127.0.0.1:8000/security/resources/drag-drop-allowed.html" sandbox="allow-scripts"></iframe>
+</body>
+</html>
diff --git a/LayoutTests/http/tests/security/resources/drag-drop-allowed.html b/LayoutTests/http/tests/security/resources/drag-drop-allowed.html
new file mode 100644
index 0000000..87aa354
--- /dev/null
+++ b/LayoutTests/http/tests/security/resources/drag-drop-allowed.html
@@ -0,0 +1,30 @@
+<html>
+<body onload="runTest()">
+<div contenteditable>drag<img src=abe.png id=dragme>me<span id=target>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></div>
+<script>
+function moveToCenter(element) {
+    var x, y;
+    x = element.offsetLeft + element.offsetWidth / 2;
+    y = element.offsetTop + element.offsetHeight / 2;
+    eventSender.mouseMoveTo(x, y);
+}
+
+function runTest() {
+    e = document.getElementById("dragme");
+    moveToCenter(e);
+    eventSender.mouseDown();
+
+    e = document.getElementById("target");
+    moveToCenter(e);
+    eventSender.mouseUp();
+
+    if (document.getElementById("dragme").parentNode.tagName == "SPAN" && document.getElementById("dragme").src.length > 10)
+        alert("PASS");
+    else
+        alert("FAIL");
+
+    layoutTestController.notifyDone();
+}
+</script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d3aa029..9a9acd5 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-11-22  Abhishek Arya  <inferno at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        r71925 broke the chrome new tab page. r71925 blocked drag and drop
+        of same security origin objects onto themselves if their origin is
+        marked unique. We need to allow drag and drop in that scenario.
+        https://bugs.webkit.org/show_bug.cgi?id=49098
+
+        Test: http/tests/security/drag-drop-same-unique-origin.html
+
+        * page/SecurityOrigin.cpp:
+        (WebCore::SecurityOrigin::canReceiveDragData):
+
 2010-11-23  Cris Neckar  <cdn at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebCore/page/SecurityOrigin.cpp b/WebCore/page/SecurityOrigin.cpp
index 9ad23c6..82af42a 100644
--- a/WebCore/page/SecurityOrigin.cpp
+++ b/WebCore/page/SecurityOrigin.cpp
@@ -275,6 +275,9 @@ bool SecurityOrigin::taintsCanvas(const KURL& url) const
 
 bool SecurityOrigin::canReceiveDragData(const SecurityOrigin* dragInitiator) const
 {
+    if (this == dragInitiator)
+        return true;
+
     // FIXME: Currently we treat data URLs as having a unique origin, contrary to the
     // current (9/19/2009) draft of the HTML5 specification. We still want to allow
     // drop across data URLs, so we special case data URLs below. If we change to

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list