Changeset 53272 in webkit


Ignore:
Timestamp:
Jan 14, 2010 10:47:50 AM (14 years ago)
Author:
bweinstein@apple.com
Message:

Roll out r53270 because it broke 5 layout tests.

Location:
trunk
Files:
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r53270 r53272  
    1 2010-01-14  Brian Weinstein  <bweinstein@apple.com>
    2 
    3         Reviewed by Oliver Hunt.
    4 
    5         [DnD] effectAllowed and dropEffect can be set to bogus values.
    6         Fixes <https://bugs.webkit.org/show_bug.cgi?id=33635>.
    7        
    8         Added a test to check the handling of setting effectAllowed and
    9         dropEffect to bogus values (that it gets ignored), and updated results
    10         to drag-and-drop because it uses a dummy value.
    11 
    12         * fast/events/bogus-dropEffect-effectAllowed-expected.txt: Added.
    13         * fast/events/bogus-dropEffect-effectAllowed.html: Added.
    14         * fast/events/drag-and-drop-expected.txt:
    15         * fast/events/drag-and-drop.html:
    16 
    1712010-01-14  Adam Roben  <aroben@apple.com>
    182
  • trunk/LayoutTests/fast/events/drag-and-drop-expected.txt

    r53270 r53272  
    9393When effectAllowed == "dummy"
    9494
    95 PASS event.dataTransfer.effectAllowed is "uninitialized"
    9695PASS event.dataTransfer.dropEffect is "none"
    97 PASS event.dataTransfer.effectAllowed is "uninitialized"
    98 PASS event.dataTransfer.dropEffect is "copy"
    99 PASS event.dataTransfer.effectAllowed is "uninitialized"
    100 PASS event.dataTransfer.dropEffect is "move"
    101 PASS event.dataTransfer.effectAllowed is "uninitialized"
    102 PASS event.dataTransfer.dropEffect is "link"
    103 PASS event.dataTransfer.effectAllowed is "uninitialized"
     96PASS event.dataTransfer.dropEffect is "none"
     97PASS event.dataTransfer.dropEffect is "none"
     98PASS event.dataTransfer.dropEffect is "none"
    10499PASS event.dataTransfer.dropEffect is "none"
    105100
  • trunk/LayoutTests/fast/events/drag-and-drop.html

    r53270 r53272  
    100100        }
    101101       
    102         if (chosenEffectAllowed === "dummy") {
    103             // If a bad effectAllowed is attempted to be set, it should never be set, and the
    104             // effectAllowed should be uninitialized.
    105             shouldBeEqualToString("event.dataTransfer.effectAllowed", "uninitialized");
    106            
    107             // Then set the chosenEffectAllowed so isDropEffectAllowed matches the HTML5 spec, and
    108             // doesn't need special cases for undefined.
    109             chosenEffectAllowed = "uninitialized";
    110         }
    111        
    112102        if (isDropEffectAllowed(chosenDropEffect, chosenEffectAllowed))
    113103            shouldBeEqualToString('event.dataTransfer.dropEffect', dropEffectElem.options[dropEffectElem.selectedIndex].value);
  • trunk/WebCore/ChangeLog

    r53271 r53272  
    6363        * bindings/v8/custom/V8XMLHttpRequestUploadCustom.cpp:
    6464        * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
    65 
    66 2010-01-14  Brian Weinstein  <bweinstein@apple.com>
    67 
    68         Reviewed by Oliver Hunt.
    69 
    70         [DnD] effectAllowed and dropEffect can be set to bogus values.
    71         Fixes <https://bugs.webkit.org/show_bug.cgi?id=33635>.
    72        
    73         Test to make aure dropEffect and effectAllowed are being set to valid values
    74         when they are being set (list of valid values given by HTML5 specification).
    75        
    76         Also, drive by change to initialize dropEffect to none (as described in spec).
    77 
    78         Test: fast/events/bogus-dropEffect-effectAllowed.html
    79 
    80         * dom/Clipboard.cpp:
    81         (WebCore::Clipboard::Clipboard): Initialize m_dropEffect to "none".
    82         (WebCore::Clipboard::setDropEffect): Check if dropEffect is being set to a valid value.
    83         (WebCore::Clipboard::setEffectAllowed): Check if effectAllowed is being set to a valid value.
    8465
    85662010-01-14  Martin Robinson  <martin.james.robinson@gmail.com>
  • trunk/WebCore/dom/Clipboard.cpp

    r53270 r53272  
    3636
    3737Clipboard::Clipboard(ClipboardAccessPolicy policy, bool isForDragging)
    38     : m_policy(policy)
    39     , m_dropEffect("none")
     38    : m_policy(policy)
    4039    , m_effectAllowed("uninitialized")
    4140    , m_dragStarted(false)
     
    132131        return;
    133132
    134     // The attribute must ignore any attempts to set it to a value other than none, copy, link, and move.
    135     if (effect != "none" && effect != "copy"  && effect != "link" && effect != "move")
    136         return;
    137 
    138133    if (m_policy == ClipboardReadable || m_policy == ClipboardTypesReadable)
    139134        m_dropEffect = effect;
     
    145140        return;
    146141
    147     if (dragOpFromIEOp(effect) == DragOperationPrivate) {
    148         // This means that there was no conversion, and the effectAllowed that
    149         // we are passed isn't a valid effectAllowed, so we should ignore it,
    150         // and not set m_effectAllowed.
    151 
    152         // The attribute must ignore any attempts to set it to a value other than
    153         // none, copy, copyLink, copyMove, link, linkMove, move, all, and uninitialized.
    154         return;
    155     }
    156 
    157 
    158142    if (m_policy == ClipboardWritable)
    159143        m_effectAllowed = effect;
Note: See TracChangeset for help on using the changeset viewer.