Changeset 103303 in webkit


Ignore:
Timestamp:
Dec 19, 2011 9:26:56 PM (12 years ago)
Author:
yael.aharon@nokia.com
Message:

Update dropzone implementation per spec update
https://bugs.webkit.org/show_bug.cgi?id=74834

Reviewed by Tony Chang.

Source/WebCore:

Update support for dropzone attribute to use file: and string: instead of f: and s:.
http://www.whatwg.org/specs/web-apps/current-work/#the-dropzone-attribute

No new tests. Existing tests cover this and were updated.

  • dom/Clipboard.cpp:

(WebCore::Clipboard::hasDropZoneType):

LayoutTests:

Update the tests per spec change.

  • fast/events/dropzone-001.html:
  • fast/events/dropzone-002.html:
  • fast/events/dropzone-003.html:
  • fast/events/dropzone-004.html:
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r103294 r103303  
     12011-12-19  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Update dropzone implementation per spec update
     4        https://bugs.webkit.org/show_bug.cgi?id=74834
     5
     6        Reviewed by Tony Chang.
     7
     8        Update the tests per spec change.
     9
     10        * fast/events/dropzone-001.html:
     11        * fast/events/dropzone-002.html:
     12        * fast/events/dropzone-003.html:
     13        * fast/events/dropzone-004.html:
     14
    1152011-12-16  Gavin Barraclough  <barraclough@apple.com>
    216
  • trunk/LayoutTests/fast/events/dropzone-001.html

    r98407 r103303  
    3535function changeDropZone()
    3636{
    37     dropTarget.setAttribute("webkitdropzone", dropEffectElem.options[dropEffectElem.selectedIndex].value + " s:text/plain");
     37    dropTarget.setAttribute("webkitdropzone", dropEffectElem.options[dropEffectElem.selectedIndex].value + " string:text/plain");
    3838}
    3939
  • trunk/LayoutTests/fast/events/dropzone-002.html

    r98407 r103303  
    3333function changeDropZone()
    3434{
    35     dropTarget.setAttribute("webkitdropzone", " S:text/plain s:url " + dropEffectElem.options[dropEffectElem.selectedIndex].value);
     35    dropTarget.setAttribute("webkitdropzone", " StRinG:text/plain sTrING:url " + dropEffectElem.options[dropEffectElem.selectedIndex].value);
    3636}
    3737
  • trunk/LayoutTests/fast/events/dropzone-003.html

    r98407 r103303  
    3333function changeDropZone()
    3434{
    35     dropTarget.setAttribute("webkitdropzone", dropEffectElem.options[dropEffectElem.selectedIndex].value + " s:text/plain s:any/type");
     35    dropTarget.setAttribute("webkitdropzone", dropEffectElem.options[dropEffectElem.selectedIndex].value + " string:text/plain string:any/type");
    3636}
    3737
  • trunk/LayoutTests/fast/events/dropzone-004.html

    r98407 r103303  
    3030function changeDropZone()
    3131{
    32     dropTarget.setAttribute("webkitdropzone", dropEffectElem.options[dropEffectElem.selectedIndex].value + " f:text/html");
     32    dropTarget.setAttribute("webkitdropzone", dropEffectElem.options[dropEffectElem.selectedIndex].value + " file:text/html");
    3333}
    3434
  • trunk/Source/WebCore/ChangeLog

    r103302 r103303  
     12011-12-19  Yael Aharon  <yael.aharon@nokia.com>
     2
     3        Update dropzone implementation per spec update
     4        https://bugs.webkit.org/show_bug.cgi?id=74834
     5
     6        Reviewed by Tony Chang.
     7
     8        Update support for dropzone attribute to use file: and string: instead of f: and s:.
     9        http://www.whatwg.org/specs/web-apps/current-work/#the-dropzone-attribute
     10
     11        No new tests. Existing tests cover this and were updated.
     12
     13        * dom/Clipboard.cpp:
     14        (WebCore::Clipboard::hasDropZoneType):
     15
    1162011-12-19  Sam Weinig  <sam@webkit.org>
    217
  • trunk/Source/WebCore/dom/Clipboard.cpp

    r87499 r103303  
    211211bool Clipboard::hasDropZoneType(const String& keyword)
    212212{
    213     if (keyword.length() < 3 || keyword[1] != ':')
    214         return false;
    215        
    216     switch (keyword[0]) {
    217     case 'f':
    218         return hasFileOfType(keyword.substring(2));
    219     case 's':
    220         return hasStringOfType(keyword.substring(2));
    221     default:
    222         return false;
    223     }
     213    if (keyword.startsWith("file:"))
     214        return hasFileOfType(keyword.substring(5));
     215                             
     216    if (keyword.startsWith("string:"))
     217        return hasStringOfType(keyword.substring(7));
     218
     219    return false;
    224220}
    225221
Note: See TracChangeset for help on using the changeset viewer.