[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

bweinstein at apple.com bweinstein at apple.com
Thu Apr 8 01:03:51 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 2d214e7aa91134ee6247c117686e9a95c5362e73
Author: bweinstein at apple.com <bweinstein at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 13 21:59:28 2010 +0000

    WebCore: REGRESSION (r49268): DHTML drag not allowed unless event.dataTransfer.effectAllowed
    is set (differs from HTML5).
    Fixes <https://bugs.webkit.org/show_bug.cgi?id=33607> and <rdar://7507114>.
    
    Reviewed by Adam Roben.
    
    If no effectAllowed is set in the dragStart operation, we should default to
    uninitialized instead of none, so the user doesn't have to manually set the
    effectAllowed to enable drag and drop.
    
    * dom/Clipboard.cpp:
    (WebCore::Clipboard::Clipboard):
    
    LayoutTests: REGRESSION (r49268): DHTML drag not allowed unless event.dataTransfer.effectAllowed
    is set (differs from HTML5).
    Fixes <https://bugs.webkit.org/show_bug.cgi?id=33607> and <rdar://7507114>.
    
    Reviewed by Adam Roben.
    
    Updated the drag and drop test to test if effectAllowed isn't set, in addition
    to its other tests.
    
    * fast/events/drag-and-drop-expected.txt:
    * fast/events/drag-and-drop.html:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53203 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 69b468f..3d7ca85 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-13  Brian Weinstein  <bweinstein at apple.com>
+
+        Reviewed by Adam Roben.
+
+        REGRESSION (r49268): DHTML drag not allowed unless event.dataTransfer.effectAllowed 
+        is set (differs from HTML5).
+        Fixes <https://bugs.webkit.org/show_bug.cgi?id=33607> and <rdar://7507114>.
+        
+        Updated the drag and drop test to test if effectAllowed isn't set, in addition
+        to its other tests.
+
+        * fast/events/drag-and-drop-expected.txt:
+        * fast/events/drag-and-drop.html:
+
 2010-01-13  Dirk Schulze  <krit at webkit.org>
 
         Reviewed by Beth Dakin.
diff --git a/LayoutTests/fast/events/drag-and-drop-expected.txt b/LayoutTests/fast/events/drag-and-drop-expected.txt
index 6453365..6ed7061 100644
--- a/LayoutTests/fast/events/drag-and-drop-expected.txt
+++ b/LayoutTests/fast/events/drag-and-drop-expected.txt
@@ -13,6 +13,19 @@ PASS event.dataTransfer.dropEffect is "move"
 PASS event.dataTransfer.dropEffect is "link"
 PASS event.dataTransfer.dropEffect is "none"
 
+When effectAllowed == "undefined"
+
+PASS event.dataTransfer.effectAllowed is "uninitialized"
+PASS event.dataTransfer.dropEffect is "none"
+PASS event.dataTransfer.effectAllowed is "uninitialized"
+PASS event.dataTransfer.dropEffect is "copy"
+PASS event.dataTransfer.effectAllowed is "uninitialized"
+PASS event.dataTransfer.dropEffect is "move"
+PASS event.dataTransfer.effectAllowed is "uninitialized"
+PASS event.dataTransfer.dropEffect is "link"
+PASS event.dataTransfer.effectAllowed is "uninitialized"
+PASS event.dataTransfer.dropEffect is "none"
+
 When effectAllowed == "none"
 
 PASS event.dataTransfer.dropEffect is "none"
diff --git a/LayoutTests/fast/events/drag-and-drop.html b/LayoutTests/fast/events/drag-and-drop.html
index 14fed6d..842b607 100644
--- a/LayoutTests/fast/events/drag-and-drop.html
+++ b/LayoutTests/fast/events/drag-and-drop.html
@@ -39,7 +39,9 @@
     function dragStart(e)
     {
         event = e;
-        e.dataTransfer.effectAllowed = effectAllowedElem.options[effectAllowedElem.selectedIndex].value;
+        if (effectAllowedElem.options[effectAllowedElem.selectedIndex].value != "undefined")
+            e.dataTransfer.effectAllowed = effectAllowedElem.options[effectAllowedElem.selectedIndex].value;
+
         e.dataTransfer.setData('Text', e.target.textContent);
     }
     
@@ -88,6 +90,15 @@
         var chosenEffectAllowed = effectAllowedElem.options[effectAllowedElem.selectedIndex].value;
         var actualDropEffect = e.dataTransfer.dropEffect;
         
+        if (chosenEffectAllowed === "undefined") {
+            // If no effectAllowed is set, we should default to uninitialized. Make sure that's the case.
+            shouldBeEqualToString("event.dataTransfer.effectAllowed", "uninitialized");
+            
+            // Then set the chosenEffectAllowed so isDropEffectAllowed matches the HTML5 spec, and
+            // doesn't need special cases for undefined.
+            chosenEffectAllowed = "uninitialized";
+        }
+        
         if (isDropEffectAllowed(chosenDropEffect, chosenEffectAllowed))
             shouldBeEqualToString('event.dataTransfer.dropEffect', dropEffectElem.options[dropEffectElem.selectedIndex].value);
         else
@@ -148,6 +159,7 @@
     <div id="test-container">
         <label for="effectAllowed">effectAllowed</label> <select id="effectAllowed">
             <option value="uninitialized">Uninitialized</option>
+            <option value="undefined">Undefined</option>
             <option value="none">None</option>
             <option value="all">All</option>
             <option value="copy">Copy</option>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5dfd82f..4c6b404 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-01-13  Brian Weinstein  <bweinstein at apple.com>
+
+        Reviewed by Adam Roben.
+
+        REGRESSION (r49268): DHTML drag not allowed unless event.dataTransfer.effectAllowed 
+        is set (differs from HTML5).
+        Fixes <https://bugs.webkit.org/show_bug.cgi?id=33607> and <rdar://7507114>.
+
+        If no effectAllowed is set in the dragStart operation, we should default to
+        uninitialized instead of none, so the user doesn't have to manually set the 
+        effectAllowed to enable drag and drop.
+
+        * dom/Clipboard.cpp:
+        (WebCore::Clipboard::Clipboard):
+
 2010-01-13  Dave Hyatt  <hyatt at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/WebCore/dom/Clipboard.cpp b/WebCore/dom/Clipboard.cpp
index 2aea90a..b272f5d 100644
--- a/WebCore/dom/Clipboard.cpp
+++ b/WebCore/dom/Clipboard.cpp
@@ -36,6 +36,7 @@ namespace WebCore {
 
 Clipboard::Clipboard(ClipboardAccessPolicy policy, bool isForDragging) 
     : m_policy(policy) 
+    , m_effectAllowed("uninitialized")
     , m_dragStarted(false)
     , m_forDragging(isForDragging)
     , m_dragImage(0)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list