Bug 175028 - Use references rather than pointers for register/unregister functions, and more
Summary: Use references rather than pointers for register/unregister functions, and more
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-01 09:11 PDT by Darin Adler
Modified: 2019-01-22 09:57 PST (History)
3 users (show)

See Also:


Attachments
Patch (251.54 KB, patch)
2017-08-01 09:12 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (255.09 KB, patch)
2017-09-02 12:14 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (261.63 KB, patch)
2017-09-03 22:32 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (262.92 KB, patch)
2017-09-03 22:55 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (262.86 KB, patch)
2017-09-03 22:58 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (267.20 KB, patch)
2017-09-04 00:04 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (268.02 KB, patch)
2017-09-04 09:26 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (268.26 KB, patch)
2017-09-10 13:29 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (279.30 KB, patch)
2019-01-19 14:05 PST, Darin Adler
dbates: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2017-08-01 09:11:34 PDT
Use references rather than pointers for register/unregister functions, and more
Comment 1 Darin Adler 2017-08-01 09:12:35 PDT Comment hidden (obsolete)
Comment 2 Darin Adler 2017-08-01 09:12:58 PDT Comment hidden (obsolete)
Comment 3 Darin Adler 2017-09-02 12:14:30 PDT Comment hidden (obsolete)
Comment 4 Darin Adler 2017-09-03 22:32:38 PDT Comment hidden (obsolete)
Comment 5 Darin Adler 2017-09-03 22:55:24 PDT Comment hidden (obsolete)
Comment 6 Darin Adler 2017-09-03 22:58:10 PDT Comment hidden (obsolete)
Comment 7 Darin Adler 2017-09-04 00:04:47 PDT Comment hidden (obsolete)
Comment 8 Darin Adler 2017-09-04 09:26:28 PDT Comment hidden (obsolete)
Comment 9 Darin Adler 2017-09-04 20:34:37 PDT Comment hidden (obsolete)
Comment 10 Darin Adler 2017-09-10 13:29:01 PDT Comment hidden (obsolete)
Comment 11 Darin Adler 2019-01-19 14:05:08 PST
Created attachment 359623 [details]
Patch
Comment 12 Darin Adler 2019-01-20 12:36:21 PST
Looks like this compiles, passes all tests, so ready to review and land.
Comment 13 Daniel Bates 2019-01-20 16:23:02 PST
Comment on attachment 359623 [details]
Patch

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

I get the sense you were holding back from making more changes to keep this patch focused on the task at hand. I know I had difficulty keeping myself from commenting on other nits. I couldn’t help myself in the few comments I did make. Oops! Feel free to disregard.

> Source/WebCore/dom/Document.h:1600
> +    void buildAccessKeyMap(TreeScope& root);

Parameter name doesn’t add much value to me :/

> Source/WebCore/dom/DocumentMarkerController.cpp:65
> +    for (TextIterator markedText(&range); !markedText.atEnd(); markedText.advance()) {

Ok as-is. Be a bit more idiomatic looking if we use assignment notation to invoke the constructor when initializing markedText.

> Source/WebCore/dom/DocumentMarkerController.cpp:104
> +    for (TextIterator markedText(&range); !markedText.atEnd(); markedText.advance()) {

Ditto.

> Source/WebCore/dom/DocumentMarkerController.cpp:117
> +    for (TextIterator markedText(&range); !markedText.atEnd(); markedText.advance()) {

Ditto

> Source/WebCore/dom/DocumentMarkerController.cpp:128
> +    for (TextIterator markedText(&range); !markedText.atEnd(); markedText.advance()) {

Ditto

> Source/WebCore/dom/DocumentMarkerController.cpp:138
> +    for (TextIterator markedText(&range); !markedText.atEnd(); markedText.advance()) {

Ditto
Comment 14 Darin Adler 2019-01-21 10:58:20 PST
Comment on attachment 359623 [details]
Patch

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

>> Source/WebCore/dom/Document.h:1600
>> +    void buildAccessKeyMap(TreeScope& root);
> 
> Parameter name doesn’t add much value to me :/

Fixed.

>> Source/WebCore/dom/DocumentMarkerController.cpp:65
>> +    for (TextIterator markedText(&range); !markedText.atEnd(); markedText.advance()) {
> 
> Ok as-is. Be a bit more idiomatic looking if we use assignment notation to invoke the constructor when initializing markedText.

I think the semantics here are initialization and not assignment, so it’s probably not the right thing to do. If we did want to do it, we’d have to change the TextIterator constructor to no longer be marked "explicit".
Comment 15 Darin Adler 2019-01-21 11:01:30 PST
Committed r240237: <https://trac.webkit.org/changeset/240237>
Comment 16 Radar WebKit Bug Importer 2019-01-21 11:02:29 PST
<rdar://problem/47431526>
Comment 17 David Kilzer (:ddkilzer) 2019-01-21 11:52:42 PST
(In reply to Darin Adler from comment #15)
> Committed r240237: <https://trac.webkit.org/changeset/240237>

Reverted the Xcode project changes here:

Committed r240239: <https://trac.webkit.org/changeset/240239>
Comment 18 Darin Adler 2019-01-22 09:57:22 PST
(In reply to David Kilzer (:ddkilzer) from comment #17)
> Reverted the Xcode project changes here:
> 
> Committed r240239: <https://trac.webkit.org/changeset/240239>

Thanks David; I just let Xcode update the file and didn’t realize there was version skew.