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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionController.cpp

Issue 2407193003: draggable=true elements should drag even if shift-key is pressed
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/SelectionController.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionController.cpp b/third_party/WebKit/Source/core/editing/SelectionController.cpp
index 75736a6e7713c34ce2d3b098d4fe5694386a7ac6..b9e9be1662646a62751fc309e3afdbb7cb70a81f 100644
--- a/third_party/WebKit/Source/core/editing/SelectionController.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp
@@ -821,9 +821,17 @@ bool isLinkSelection(const MouseEventWithHitTestResults& event) {
}
bool isExtendingSelection(const MouseEventWithHitTestResults& event) {
+ bool isDraggable = false;
+ Node* innerNode = event.innerNode();
+ if (LayoutObject* layoutObject = innerNode->layoutObject()) {
+ const ComputedStyle& style = layoutObject->styleRef();
+ if (style.userDrag() == DRAG_ELEMENT)
+ isDraggable = true;
+ }
+
bool isMouseDownOnLinkOrImage =
event.isOverLink() || event.hitTestResult().image();
- return event.event().shiftKey() && !isMouseDownOnLinkOrImage;
+ return event.event().shiftKey() && !isMouseDownOnLinkOrImage && !isDraggable;
}
} // namespace blink
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698