Chromium Code Reviews| 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..5cd29438afc881ad4bd40c9205cf36ecad63177e 100644 |
| --- a/third_party/WebKit/Source/core/input/EventHandler.cpp |
| +++ b/third_party/WebKit/Source/core/input/EventHandler.cpp |
| @@ -687,6 +687,14 @@ IntPoint EventHandler::lastKnownMousePosition() const |
| return m_lastKnownMousePosition; |
| } |
| +IntPoint EventHandler::dragDataTransferLocationForTesting() |
| +{ |
| + if (dragState().m_dragDataTransfer) |
| + return dragState().m_dragDataTransfer->dragLocation(); |
| + |
| + return IntPoint(); |
| +} |
| + |
| static LocalFrame* subframeForTargetNode(Node* node) |
| { |
| if (!node) |
| @@ -3321,8 +3329,8 @@ bool EventHandler::tryStartDrag(const MouseEventWithHitTestResults& event) |
| // image and offset |
| if (dragState().m_dragType == DragSourceActionDHTML) { |
| if (LayoutObject* layoutObject = dragState().m_dragSrc->layoutObject()) { |
| - FloatPoint absPos = layoutObject->localToAbsolute(FloatPoint(), UseTransforms); |
| - IntSize delta = m_mouseDownPos - roundedIntPoint(absPos); |
| + IntRect absoluteBoundingBox = layoutObject->absoluteBoundingBoxRect(); |
|
fs
2016/02/24 12:51:16
Why did you switch this to absoluteBoundingBoxRect
hyunjunekim2
2016/02/24 13:06:36
|absoluteBoundingBoxRect| function was thought to
|
| + IntSize delta = m_mouseDownPos - absoluteBoundingBox.location(); |
| dragState().m_dragDataTransfer->setDragImageElement(dragState().m_dragSrc.get(), IntPoint(delta)); |
| } else { |
| // The layoutObject has disappeared, this can happen if the onStartDrag handler has hidden |