Bug 148064 - Adopt shrink-wrapping for TextIndicators on Mac
Summary: Adopt shrink-wrapping for TextIndicators on Mac
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-15 23:28 PDT by Tim Horton
Modified: 2015-08-17 10:50 PDT (History)
6 users (show)

See Also:


Attachments
Patch (28.24 KB, patch)
2015-08-15 23:29 PDT, Tim Horton
bdakin: review+
Details | Formatted Diff | Diff
before and after screenshots (88.81 KB, image/png)
2015-08-15 23:37 PDT, Tim Horton
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2015-08-15 23:28:54 PDT
Adopt shrink-wrapping for TextIndicators on Mac
Comment 1 Tim Horton 2015-08-15 23:29:49 PDT
Created attachment 259113 [details]
Patch
Comment 2 Tim Horton 2015-08-15 23:37:51 PDT
Created attachment 259114 [details]
before and after screenshots
Comment 3 Beth Dakin 2015-08-17 10:44:23 PDT
Comment on attachment 259113 [details]
Patch

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

> Source/WebCore/page/TextIndicator.cpp:85
> +    bool indicatesCurrentSelection = areRangesEqual(&range, oldSelection.toNormalizedRange().get());

I just want to double check that this is doing the right thing. The code that you removed set data.indicatesCurrentSelection to !areRangesEqual(…), but you are setting a variable of the same name to the logical opposite. Just making sure that is intentional!
Comment 4 Tim Horton 2015-08-17 10:47:21 PDT
(In reply to comment #3)
> Comment on attachment 259113 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=259113&action=review
> 
> > Source/WebCore/page/TextIndicator.cpp:85
> > +    bool indicatesCurrentSelection = areRangesEqual(&range, oldSelection.toNormalizedRange().get());
> 
> I just want to double check that this is doing the right thing. The code
> that you removed set data.indicatesCurrentSelection to !areRangesEqual(…),
> but you are setting a variable of the same name to the logical opposite.
> Just making sure that is intentional!

Yes, that was an error in the most recent previous TextIndicator patch. If the ranges are equal (the incoming range and the selection range), then we are indicating the selection, so no negation necessary. Thanks for the careful review!
Comment 5 Tim Horton 2015-08-17 10:50:30 PDT
http://trac.webkit.org/changeset/188526