Bug 167443 - Add infrastructure to support data interaction in WebKit2
Summary: Add infrastructure to support data interaction in WebKit2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-25 18:37 PST by Wenson Hsieh
Modified: 2017-01-28 12:26 PST (History)
4 users (show)

See Also:


Attachments
Patch (17.53 KB, patch)
2017-01-25 19:24 PST, Wenson Hsieh
simon.fraser: review+
Details | Formatted Diff | Diff
Patch for landing (17.51 KB, patch)
2017-01-25 19:43 PST, Wenson Hsieh
commit-queue: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (17.51 KB, patch)
2017-01-25 19:46 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2017-01-25 18:37:29 PST
Add infrastructure to support data interaction in WebKit2
Comment 1 Wenson Hsieh 2017-01-25 19:24:31 PST
Created attachment 299787 [details]
Patch
Comment 2 Simon Fraser (smfr) 2017-01-25 19:31:13 PST
Comment on attachment 299787 [details]
Patch

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

> Source/WebCore/page/Page.cpp:2170
> +    if (auto selectedRange = currentSelection.toNormalizedRange()) {
> +        Vector<SelectionRect> selectionRects;
> +        selectedRange->collectSelectionRects(selectionRects);
> +        for (auto selectionRect : selectionRects) {
> +            if (FloatRect(selectionRect.rect()).contains(position))
> +                return true;
> +        }

Is "position" in the same coordinate space as the rects? Did you test with zooming, iframes etc?
Comment 3 Wenson Hsieh 2017-01-25 19:39:26 PST
Comment on attachment 299787 [details]
Patch

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

Thank you!

>> Source/WebCore/page/Page.cpp:2170
>> +        }
> 
> Is "position" in the same coordinate space as the rects? Did you test with zooming, iframes etc?

I believe so -- the position here is the same one set by calling into Frame::nodeRespondingToClickEvents, which appears to be in document coordinates. I have tested scaling, but not frames -- I will try that case out as well.
Comment 4 Wenson Hsieh 2017-01-25 19:43:02 PST
Created attachment 299789 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2017-01-25 19:43:57 PST
Comment on attachment 299789 [details]
Patch for landing

Rejecting attachment 299789 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 299789, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Source/WebCore/ChangeLog contains OOPS!.

Full output: http://webkit-queues.webkit.org/results/2950105
Comment 6 Wenson Hsieh 2017-01-25 19:46:42 PST
Created attachment 299790 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2017-01-25 20:23:24 PST
Comment on attachment 299790 [details]
Patch for landing

Clearing flags on attachment: 299790

Committed r211199: <http://trac.webkit.org/changeset/211199>
Comment 8 Wenson Hsieh 2017-01-28 12:26:05 PST
<rdar://problem/30107775>