Title: [105800] trunk
Revision
105800
Author
dch...@chromium.org
Date
2012-01-24 13:32:39 -0800 (Tue, 24 Jan 2012)

Log Message

dropzone does not normalize type strings
https://bugs.webkit.org/show_bug.cgi?id=76925

Source/WebCore:

Per the HTML spec, we are supposed to normalize types during dropzone processing by
lowercasing them.

Reviewed by Tony Chang.

Tests: fast/events/dropzone-002.html

* dom/Clipboard.cpp:
(WebCore::Clipboard::hasDropZoneType):

LayoutTests:

Reviewed by Tony Chang.

* fast/events/dropzone-002.html: Update layout test to check case normalization as well.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (105799 => 105800)


--- trunk/LayoutTests/ChangeLog	2012-01-24 21:31:35 UTC (rev 105799)
+++ trunk/LayoutTests/ChangeLog	2012-01-24 21:32:39 UTC (rev 105800)
@@ -1,3 +1,12 @@
+2012-01-24  Daniel Cheng  <dch...@chromium.org>
+
+        dropzone does not normalize type strings
+        https://bugs.webkit.org/show_bug.cgi?id=76925
+
+        Reviewed by Tony Chang.
+
+        * fast/events/dropzone-002.html: Update layout test to check case normalization as well.
+
 2012-01-24  Robert Hogan  <rob...@webkit.org>
 
         Qt and Gtk results for tests added in r105775

Modified: trunk/LayoutTests/fast/events/dropzone-002.html (105799 => 105800)


--- trunk/LayoutTests/fast/events/dropzone-002.html	2012-01-24 21:31:35 UTC (rev 105799)
+++ trunk/LayoutTests/fast/events/dropzone-002.html	2012-01-24 21:32:39 UTC (rev 105800)
@@ -32,7 +32,7 @@
 
 function changeDropZone()
 {
-    dropTarget.setAttribute("webkitdropzone", " StRinG:text/plain sTrING:url " + dropEffectElem.options[dropEffectElem.selectedIndex].value);
+    dropTarget.setAttribute("webkitdropzone", " StRinG:tExT/pLaIn sTrING:UrL " + dropEffectElem.options[dropEffectElem.selectedIndex].value);
 }
 
 function printDropEvent(e)

Modified: trunk/Source/WebCore/ChangeLog (105799 => 105800)


--- trunk/Source/WebCore/ChangeLog	2012-01-24 21:31:35 UTC (rev 105799)
+++ trunk/Source/WebCore/ChangeLog	2012-01-24 21:32:39 UTC (rev 105800)
@@ -1,3 +1,18 @@
+2012-01-24  Daniel Cheng  <dch...@chromium.org>
+
+        dropzone does not normalize type strings
+        https://bugs.webkit.org/show_bug.cgi?id=76925
+
+        Per the HTML spec, we are supposed to normalize types during dropzone processing by
+        lowercasing them.
+
+        Reviewed by Tony Chang.
+
+        Tests: fast/events/dropzone-002.html
+
+        * dom/Clipboard.cpp:
+        (WebCore::Clipboard::hasDropZoneType):
+
 2012-01-24  Mario Sanchez Prada  <msanc...@igalia.com>
 
         [GTK] Refactor GTK's accessibilitity code to be more modular

Modified: trunk/Source/WebCore/dom/Clipboard.cpp (105799 => 105800)


--- trunk/Source/WebCore/dom/Clipboard.cpp	2012-01-24 21:31:35 UTC (rev 105799)
+++ trunk/Source/WebCore/dom/Clipboard.cpp	2012-01-24 21:32:39 UTC (rev 105800)
@@ -211,10 +211,10 @@
 bool Clipboard::hasDropZoneType(const String& keyword)
 {
     if (keyword.startsWith("file:"))
-        return hasFileOfType(keyword.substring(5));
-                             
+        return hasFileOfType(keyword.substring(5).lower());
+
     if (keyword.startsWith("string:"))
-        return hasStringOfType(keyword.substring(7));
+        return hasStringOfType(keyword.substring(7).lower());
 
     return false;
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to