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

Issue 2916043002: Move LocalFrame::DragImageForSelection DragController (Closed)

Created:
3 years, 6 months ago by tanvir
Modified:
3 years, 5 months ago
Reviewers:
Xiaocheng
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Move LocalFrame::DragImageForSelection DragController DragImageForSelection do not use any core functionalities of LocalFrame, so DragImageForSelection can be moved to DragController. BUG=727981

Patch Set 1 #

Patch Set 2 : updated #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -179 lines) Patch
M third_party/WebKit/Source/core/clipboard/DataTransfer.h View 1 3 chunks +11 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/core/clipboard/DataTransfer.cpp View 1 4 chunks +149 lines, -2 lines 2 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.h View 1 2 chunks +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.cpp View 1 5 chunks +0 lines, -163 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrameTest.cpp View 1 7 chunks +14 lines, -8 lines 2 comments Download
M third_party/WebKit/Source/core/page/DragController.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/page/DragController.cpp View 1 3 chunks +24 lines, -1 line 2 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (5 generated)
tanvir
PTAL!! Thanks
3 years, 6 months ago (2017-06-01 10:56:45 UTC) #2
tanvir
LocalFrame has class DraggedNodeImageBuilder which is also the core functionality for Drag, and is currently ...
3 years, 6 months ago (2017-06-01 11:05:08 UTC) #3
Xiaocheng
On 2017/06/01 at 11:05:08, tanvir.rizvi wrote: > LocalFrame has class DraggedNodeImageBuilder which is also the ...
3 years, 6 months ago (2017-06-01 22:31:28 UTC) #4
tanvir
Updated the Patch by moving Drag related functions and features outside of LocalFrame. PTAL!!!
3 years, 6 months ago (2017-06-02 09:36:11 UTC) #5
Xiaocheng
3 years, 6 months ago (2017-06-02 18:26:47 UTC) #8
All right, there doesn't seem to be any dependency issue.

After addressing the comments, could you land it with two patches:
1. Modify the function implementations in-place, and add TODOs for moving
2. Move the functions to correct files

Thanks!

https://codereview.chromium.org/2916043002/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/clipboard/DataTransfer.cpp (right):

https://codereview.chromium.org/2916043002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/clipboard/DataTransfer.cpp:217:
std::unique_ptr<DragImage> DataTransfer::CreateDragImage(
Let's renamed it into |CreateDragImageForFrame| to avoid the name conflict.

https://codereview.chromium.org/2916043002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/clipboard/DataTransfer.cpp:411: return
DataTransfer::NodeImage(*frame, *drag_image_element_);
nit: Remove |DataTransfer|

https://codereview.chromium.org/2916043002/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/clipboard/DataTransfer.h (right):

https://codereview.chromium.org/2916043002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/clipboard/DataTransfer.h:106: static
std::unique_ptr<DragImage> NodeImage(const LocalFrame&, Node&);
Please group all the static functions together.

https://codereview.chromium.org/2916043002/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/frame/LocalFrameTest.cpp (right):

https://codereview.chromium.org/2916043002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/frame/LocalFrameTest.cpp:57:
DataTransfer::NodeImage(GetFrame(), *sample);
Let's create a DataTransferTest for these unit tests of NodeImage().

https://codereview.chromium.org/2916043002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/frame/LocalFrameTest.cpp:139:
DragController::DragImageForSelection(&GetFrame(), 0.75f));
Let's create a DragControllerTest for these unit tests of
DragImageForSelection().

https://codereview.chromium.org/2916043002/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/page/DragController.cpp (right):

https://codereview.chromium.org/2916043002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/page/DragController.cpp:1085: LocalFrame* src,
Can we pass a |const LocalFrame&| parameter?

https://codereview.chromium.org/2916043002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/page/DragController.cpp:1150: drag_image =
DragController::DragImageForSelection(src, kDragImageAlpha);
nit: Remove |DragController|

Powered by Google App Engine
This is Rietveld 408576698