Bug 167443

Summary: Add infrastructure to support data interaction in WebKit2
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: WebKit Misc.Assignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, commit-queue, enrica, simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
simon.fraser: review+
Patch for landing
commit-queue: commit-queue-
Patch for landing none

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>