Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2720463002: Remove webkitdropzone. (Closed)
Patch Set: Addressed one more bit of feedback from jsbell. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLElement.idl ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/input/EventHandler.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index 39d1f5e2a2cc5f06d17066e9f31afd7c2641ff91..71b4a48ea622332d2911343b8b551e290fa73d30 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1006,48 +1006,6 @@ static bool targetIsFrame(Node* target, LocalFrame*& frame) {
return true;
}
-static bool findDropZone(Node* target, DataTransfer* dataTransfer) {
- Element* element =
- target->isElementNode() ? toElement(target) : target->parentElement();
- for (; element; element = element->parentElement()) {
- bool matched = false;
- AtomicString dropZoneStr = element->fastGetAttribute(webkitdropzoneAttr);
-
- if (dropZoneStr.isEmpty())
- continue;
-
- UseCounter::count(element->document(),
- UseCounter::PrefixedHTMLElementDropzone);
-
- dropZoneStr = dropZoneStr.lower();
-
- SpaceSplitString keywords(dropZoneStr, SpaceSplitString::ShouldNotFoldCase);
- if (keywords.isNull())
- continue;
-
- DragOperation dragOperation = DragOperationNone;
- for (unsigned i = 0; i < keywords.size(); i++) {
- DragOperation op = convertDropZoneOperationToDragOperation(keywords[i]);
- if (op != DragOperationNone) {
- if (dragOperation == DragOperationNone)
- dragOperation = op;
- } else {
- matched =
- matched || dataTransfer->hasDropZoneType(keywords[i].getString());
- }
-
- if (matched && dragOperation != DragOperationNone)
- break;
- }
- if (matched) {
- dataTransfer->setDropEffect(
- convertDragOperationToDropZoneOperation(dragOperation));
- return true;
- }
- }
- return false;
-}
-
WebInputEventResult EventHandler::updateDragAndDrop(
const WebMouseEvent& event,
DataTransfer* dataTransfer) {
@@ -1095,9 +1053,6 @@ WebInputEventResult EventHandler::updateDragAndDrop(
}
eventResult = m_mouseEventManager->dispatchDragEvent(
EventTypeNames::dragenter, newTarget, event, dataTransfer);
- if (eventResult == WebInputEventResult::NotHandled &&
- findDropZone(newTarget, dataTransfer))
- eventResult = WebInputEventResult::HandledSystem;
}
if (targetIsFrame(m_dragTarget.get(), targetFrame)) {
@@ -1133,9 +1088,6 @@ WebInputEventResult EventHandler::updateDragAndDrop(
}
eventResult = m_mouseEventManager->dispatchDragEvent(
EventTypeNames::dragover, newTarget, event, dataTransfer);
- if (eventResult == WebInputEventResult::NotHandled &&
- findDropZone(newTarget, dataTransfer))
- eventResult = WebInputEventResult::HandledSystem;
m_shouldOnlyFireDragOverEvent = false;
}
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLElement.idl ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698