Bug 104627 - Add an optional output to WebViewImpl::selectionBounds to query the order of selection anchor
Summary: Add an optional output to WebViewImpl::selectionBounds to query the order of ...
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-10 20:59 PST by Tien-Ren Chen
Modified: 2014-02-05 11:02 PST (History)
6 users (show)

See Also:


Attachments
Patch (4.03 KB, patch)
2012-12-10 21:03 PST, Tien-Ren Chen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tien-Ren Chen 2012-12-10 20:59:41 PST
Add an optional output to WebViewImpl::selectionBounds to query the order of selection anchor
Comment 1 Tien-Ren Chen 2012-12-10 21:03:59 PST
Created attachment 178703 [details]
Patch
Comment 2 WebKit Review Bot 2012-12-10 21:06:31 PST
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 3 Darin Fisher (:fishd, Google) 2012-12-10 21:53:33 PST
Comment on attachment 178703 [details]
Patch

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

> Source/WebKit/chromium/src/WebViewImpl.cpp:2356
>      if (!frame->selection()->selection().isBaseFirst())

I'm a little confused here.  It looks like anchor and focus are being swapped when isAnchorFirst is false.  Is that unnecessary if you are returning isAnchorFirst to the caller?  It seems a little odd to apply a transform on the WebKit side but also return the details of the transform.
Comment 4 Tien-Ren Chen 2012-12-11 14:26:14 PST
(In reply to comment #3)
> (From update of attachment 178703 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=178703&action=review
> 
> > Source/WebKit/chromium/src/WebViewImpl.cpp:2356
> >      if (!frame->selection()->selection().isBaseFirst())
> 
> I'm a little confused here.  It looks like anchor and focus are being swapped when isAnchorFirst is false.  Is that unnecessary if you are returning isAnchorFirst to the caller?  It seems a little odd to apply a transform on the WebKit side but also return the details of the transform.

It is used to return start and end but 66973 changed it to anchor and focus, and there is no way for us to query start and end from the embedder side.
Comment 5 Anders Carlsson 2014-02-05 11:02:36 PST
Comment on attachment 178703 [details]
Patch

Clearing review flag on patches from before 2014. If this patch is still relevant, please reset the r? flag.