Bug 208563 - Implement WKTextSelectionRect in terms of WebCore::SelectionRect and WKTextRange in terms of WKTextSelectionRect
Summary: Implement WKTextSelectionRect in terms of WebCore::SelectionRect and WKTextRa...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Local Build
Hardware: iPhone / iPad iOS 13
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on: 208561
Blocks:
  Show dependency treegraph
 
Reported: 2020-03-03 23:57 PST by Daniel Bates
Modified: 2020-03-04 10:06 PST (History)
2 users (show)

See Also:


Attachments
For the bots (15.58 KB, patch)
2020-03-03 23:59 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
For the bots (15.63 KB, patch)
2020-03-04 00:00 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
For the bots (17.95 KB, patch)
2020-03-04 00:14 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (8.06 KB, patch)
2020-03-04 00:17 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
For the bots (17.95 KB, patch)
2020-03-04 00:30 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (14.40 KB, patch)
2020-03-04 01:04 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (8.03 KB, patch)
2020-03-04 01:05 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
For the bots (17.88 KB, patch)
2020-03-04 01:06 PST, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2020-03-03 23:57:12 PST
Implement WKTextSelectionRect in terms of WebCore::SelectionRect and WKTextRange in terms of WKTextSelectionRect.
Comment 1 Daniel Bates 2020-03-03 23:59:11 PST
Created attachment 392380 [details]
For the bots
Comment 2 Daniel Bates 2020-03-04 00:00:23 PST
Created attachment 392381 [details]
For the bots
Comment 3 Daniel Bates 2020-03-04 00:14:51 PST
Created attachment 392382 [details]
For the bots
Comment 4 Daniel Bates 2020-03-04 00:17:37 PST
Created attachment 392383 [details]
Patch

This patch will fail to apply without the patch for bug #208561.
Comment 5 Daniel Bates 2020-03-04 00:30:58 PST
Created attachment 392386 [details]
For the bots
Comment 6 Daniel Bates 2020-03-04 01:04:34 PST
Created attachment 392390 [details]
Patch
Comment 7 Daniel Bates 2020-03-04 01:05:54 PST
Created attachment 392391 [details]
Patch
Comment 8 Daniel Bates 2020-03-04 01:06:59 PST
Created attachment 392392 [details]
For the bots
Comment 9 Alex Christensen 2020-03-04 08:50:22 PST
Comment on attachment 392391 [details]
Patch

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

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4465
> +    auto rects = adoptNS([[NSMutableArray alloc] initWithCapacity:coreRects.size()]);

arrayWithCapacity?
Comment 10 Daniel Bates 2020-03-04 09:59:51 PST
(In reply to Alex Christensen from comment #9)
> Comment on attachment 392391 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=392391&action=review
> 
> > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4465
> > +    auto rects = adoptNS([[NSMutableArray alloc] initWithCapacity:coreRects.size()]);
> 
> arrayWithCapacity?

I thought about it when I wrote this code and was debating whether to RetainPtr it all up or not. At the end fo the day I chose to go with RetainPtr (even though the code is not long!). The generated code will be just as efficient because of the inlining of autorelease()
Comment 11 Daniel Bates 2020-03-04 10:04:20 PST
Thanks for the review.
Comment 12 Daniel Bates 2020-03-04 10:05:47 PST
Comment on attachment 392391 [details]
Patch

Clearing flags on attachment: 392391

Committed r257852: <https://trac.webkit.org/changeset/257852>
Comment 13 Daniel Bates 2020-03-04 10:05:48 PST
All reviewed patches have been landed.  Closing bug.
Comment 14 Radar WebKit Bug Importer 2020-03-04 10:06:16 PST
<rdar://problem/60044375>