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 188d4c4fab19cba46bedd6102aa61ee868924cc9..473a8be7f44e7aa28979d11104a0266b6bedd417 100644 |
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp |
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp |
@@ -687,6 +687,15 @@ IntPoint EventHandler::lastKnownMousePosition() const |
return m_lastKnownMousePosition; |
} |
+IntPoint EventHandler::dragDataTransferLocation() |
+{ |
+ IntPoint loc; |
+ if (dragState().m_dragDataTransfer) { |
fs
2016/02/23 17:27:45
if (...)
return ...;
return IntPoint();
hyunjunekim2
2016/02/24 13:06:36
Done.
|
+ loc = dragState().m_dragDataTransfer->dragLocation(); |
+ } |
+ return loc; |
+} |
+ |
static LocalFrame* subframeForTargetNode(Node* node) |
{ |
if (!node) |
@@ -3321,7 +3330,8 @@ bool EventHandler::tryStartDrag(const MouseEventWithHitTestResults& event) |
// image and offset |
if (dragState().m_dragType == DragSourceActionDHTML) { |
fs
2016/02/23 17:27:45
(I wonder why this code isn't in DragController::p
hyunjunekim2
2016/02/24 12:00:07
This is the report that is flow to draw dragged im
hyunjunekim2
2016/02/24 12:04:41
Did you say that this codes need to transfer on |D
fs
2016/02/24 12:47:48
No need to take any action on this - I was mostly
|
if (LayoutObject* layoutObject = dragState().m_dragSrc->layoutObject()) { |
- FloatPoint absPos = layoutObject->localToAbsolute(FloatPoint(), UseTransforms); |
+ IntRect boundingIncludingDescendants = layoutObject->absoluteBoundingBoxRectIncludingDescendants(); |
fs
2016/02/23 17:27:45
I guess this makes sense since it's what LocalFram
|
+ FloatPoint absPos(boundingIncludingDescendants.x(), boundingIncludingDescendants.y()); |
fs
2016/02/23 17:27:45
No need to do int -> float and then round to int a
hyunjunekim2
2016/02/24 13:06:36
Done.
|
IntSize delta = m_mouseDownPos - roundedIntPoint(absPos); |
dragState().m_dragDataTransfer->setDragImageElement(dragState().m_dragSrc.get(), IntPoint(delta)); |
} else { |