WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
WIP PATCH 3 - No ChangeLogs - But Code Finished
drag_and_drop.patch (text/plain), 3.48 KB, created by
Brian Weinstein
on 2010-01-13 12:56:18 PST
(
hide
)
Description:
WIP PATCH 3 - No ChangeLogs - But Code Finished
Filename:
MIME Type:
Creator:
Brian Weinstein
Created:
2010-01-13 12:56:18 PST
Size:
3.48 KB
patch
obsolete
>Index: WebCore/dom/Clipboard.cpp >=================================================================== >--- WebCore/dom/Clipboard.cpp (revision 53148) >+++ WebCore/dom/Clipboard.cpp (working copy) >@@ -100,9 +100,7 @@ static String IEOpFromDragOp(DragOperati > > bool Clipboard::sourceOperation(DragOperation& op) const > { >- if (m_effectAllowed.isNull()) >- return false; >- op = dragOpFromIEOp(m_effectAllowed); >+ op = dragOpFromIEOp(!m_effectAllowed.isNull() ? m_effectAllowed : String("uninitialized")); > return true; > } > >Index: LayoutTests/fast/events/drag-and-drop-expected.txt >=================================================================== >--- LayoutTests/fast/events/drag-and-drop-expected.txt (revision 53148) >+++ LayoutTests/fast/events/drag-and-drop-expected.txt (working copy) >@@ -13,6 +13,14 @@ PASS event.dataTransfer.dropEffect is "m > PASS event.dataTransfer.dropEffect is "link" > PASS event.dataTransfer.dropEffect is "none" > >+When effectAllowed == "undefined" >+ >+PASS event.dataTransfer.dropEffect is "none" >+PASS event.dataTransfer.dropEffect is "copy" >+PASS event.dataTransfer.dropEffect is "move" >+PASS event.dataTransfer.dropEffect is "link" >+PASS event.dataTransfer.dropEffect is "none" >+ > When effectAllowed == "none" > > PASS event.dataTransfer.dropEffect is "none" >Index: LayoutTests/fast/events/drag-and-drop.html >=================================================================== >--- LayoutTests/fast/events/drag-and-drop.html (revision 53148) >+++ LayoutTests/fast/events/drag-and-drop.html (working copy) >@@ -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); > } > >@@ -99,11 +101,11 @@ > // Extracted from the HTML 5 drag-and-drop section, http://dev.w3.org/html5/spec/Overview.html#dnd > if (chosenDropEffect == "none") > return true; >- if (chosenDropEffect == "copy" && ["copy", "copyLink", "copyMove", "uninitialized", "all"].indexOf(allowedDropEffect) != -1) >+ if (chosenDropEffect == "copy" && ["copy", "copyLink", "copyMove", "uninitialized", "all", "undefined"].indexOf(allowedDropEffect) != -1) > return true; >- if (chosenDropEffect == "move" && ["move", "copyMove", "linkMove", "uninitialized", "all"].indexOf(allowedDropEffect) != -1) >+ if (chosenDropEffect == "move" && ["move", "copyMove", "linkMove", "uninitialized", "all", "undefined"].indexOf(allowedDropEffect) != -1) > return true; >- if (chosenDropEffect == "link" && ["link", "copyLink", "linkMove", "uninitialized", "all"].indexOf(allowedDropEffect) != -1) >+ if (chosenDropEffect == "link" && ["link", "copyLink", "linkMove", "uninitialized", "all", "undefined"].indexOf(allowedDropEffect) != -1) > return true; > return false; > } >@@ -148,6 +150,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>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 33607
:
46473
|
46474
|
46484
|
46485
|
46494
|
46497
|
46500