Bug 168534 - Add a new drag code path and use it for dragging plain text
Summary: Add a new drag code path and use it for dragging plain text
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-17 14:55 PST by Anders Carlsson
Modified: 2017-02-20 11:34 PST (History)
1 user (show)

See Also:


Attachments
Patch (48.77 KB, patch)
2017-02-17 15:19 PST, Anders Carlsson
no flags Details | Formatted Diff | Diff
Patch (48.77 KB, patch)
2017-02-17 15:24 PST, Anders Carlsson
no flags Details | Formatted Diff | Diff
Patch (48.77 KB, patch)
2017-02-17 15:59 PST, Anders Carlsson
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2017-02-17 14:55:25 PST
Add a new drag code path and use it for dragging plain text
Comment 1 Anders Carlsson 2017-02-17 15:19:42 PST
Created attachment 301997 [details]
Patch
Comment 2 WebKit Commit Bot 2017-02-17 15:21:50 PST
Attachment 301997 [details] did not pass style-queue:


ERROR: Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.mm:221:  Missing space around : in range-based for statement  [whitespace/colon] [4]
ERROR: Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.mm:224:  Extra space in capture list.  [whitespace/brackets] [4]
ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:4712:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:4714:  The parameter name "page" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit/mac/WebCoreSupport/WebDragClient.mm:155:  Extra space in capture list.  [whitespace/brackets] [4]
Total errors found: 5 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Anders Carlsson 2017-02-17 15:24:25 PST
Created attachment 301998 [details]
Patch
Comment 4 WebKit Commit Bot 2017-02-17 15:26:41 PST
Attachment 301998 [details] did not pass style-queue:


ERROR: Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.mm:221:  Missing space around : in range-based for statement  [whitespace/colon] [4]
ERROR: Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.mm:224:  Extra space in capture list.  [whitespace/brackets] [4]
ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:4712:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:4714:  The parameter name "page" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit/mac/WebCoreSupport/WebDragClient.mm:155:  Extra space in capture list.  [whitespace/brackets] [4]
Total errors found: 5 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Anders Carlsson 2017-02-17 15:59:51 PST
Created attachment 302005 [details]
Patch
Comment 6 WebKit Commit Bot 2017-02-17 16:01:56 PST
Attachment 302005 [details] did not pass style-queue:


ERROR: Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.mm:221:  Missing space around : in range-based for statement  [whitespace/colon] [4]
ERROR: Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.mm:224:  Extra space in capture list.  [whitespace/brackets] [4]
ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:4712:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit/mac/WebView/WebHTMLView.mm:4714:  The parameter name "page" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit/mac/WebCoreSupport/WebDragClient.mm:155:  Extra space in capture list.  [whitespace/brackets] [4]
Total errors found: 5 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Geoffrey Garen 2017-02-17 21:06:02 PST
Comment on attachment 302005 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=302005&action=review

> Source/WebCore/page/DragController.cpp:746
> +    float x = (mouseDraggedPoint.x() - draggingRect.x()) / (float)draggingRect.width();
> +    float y = (mouseDraggedPoint.y() - draggingRect.y()) / (float)draggingRect.height();

Do we still like static_cast<float>?

> Source/WebKit/mac/WebCoreSupport/WebDragClient.mm:153
> +    // FIXME: We should be able to make a fake event with the mosue dragged coordinates.

mouse
Comment 8 Anders Carlsson 2017-02-20 11:34:46 PST
Committed r212663: <http://trac.webkit.org/changeset/212663>