Bug 133677 - Page::findStringMatchingRanges() should take Vector<RefPtr<Range>> by reference instead of pointer
Summary: Page::findStringMatchingRanges() should take Vector<RefPtr<Range>> by referen...
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: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-09 23:13 PDT by Zan Dobersek
Modified: 2014-06-16 09:43 PDT (History)
1 user (show)

See Also:


Attachments
Patch (6.75 KB, patch)
2014-06-09 23:15 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff
Patch (7.69 KB, patch)
2014-06-14 11:01 PDT, Zan Dobersek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2014-06-09 23:13:15 PDT
Page::findStringMatchingRanges() should take Vector<RefPtr<Range>> by reference instead of pointer
Comment 1 Zan Dobersek 2014-06-09 23:15:18 PDT
Created attachment 232772 [details]
Patch
Comment 2 Anders Carlsson 2014-06-11 20:21:26 PDT
Comment on attachment 232772 [details]
Patch

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

> Source/WebCore/page/Page.cpp:542
> +void Page::findStringMatchingRanges(const String& target, FindOptions options, int limit, Vector<RefPtr<Range>>& matchRanges, int& indexForSelection)

Can this be a const reference?
Comment 3 Zan Dobersek 2014-06-14 10:56:19 PDT
Comment on attachment 232772 [details]
Patch

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

>> Source/WebCore/page/Page.cpp:542
>> +void Page::findStringMatchingRanges(const String& target, FindOptions options, int limit, Vector<RefPtr<Range>>& matchRanges, int& indexForSelection)
> 
> Can this be a const reference?

No, that would clash with Editor::countMatchesForText() which expects a pointer to a non-const Vector.
Comment 4 Zan Dobersek 2014-06-14 11:01:04 PDT
Created attachment 233112 [details]
Patch
Comment 5 Zan Dobersek 2014-06-16 09:42:59 PDT
Comment on attachment 233112 [details]
Patch

Clearing flags on attachment: 233112

Committed r170012: <http://trac.webkit.org/changeset/170012>
Comment 6 Zan Dobersek 2014-06-16 09:43:06 PDT
All reviewed patches have been landed.  Closing bug.