Skip to content

Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server - #7559

Merged
bors-servo merged 1 commit into
servo:masterfrom
leaexplores:RFC-0344-Work
Sep 13, 2015

Conversation

@leaexplores

Copy link
Copy Markdown
Contributor

Hi guys,

I just gave a big pass of RFC-0344 as per issue #6224 .

Pretty much renamed all the get_* fn that were used to fetch values.

I hope I didn't rename too much.

As said in the issue discussion, I didn't touch at the scripts folder so we keep the unsafe ones pretty explicit.

I've ran the whole pass of test, everything seems to be still working right :).

Please give feedback on this PR.

Thanks for looking into it.

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 8, 2015
@highfive

highfive commented Sep 8, 2015

Copy link
Copy Markdown

warning Warning warning

  • These commits modify layout code, but no reftests are modified. Please consider adding a reftest!

@nox

nox commented Sep 8, 2015

Copy link
Copy Markdown
Contributor

@ddrmanxbxfr Didn't expect to see you here. I guess I will take this review.

@nox nox self-assigned this Sep 8, 2015
@nox

nox commented Sep 8, 2015

Copy link
Copy Markdown
Contributor

Good work. Some nits, and some questions for @mbrubeck. Could you rewrite the commit message when you amend it? You mistyped "canvas" (and its title is a bit long, but that's not very important).


Reviewed 28 of 28 files at r1.
Review status: all files reviewed at latest revision, 11 unresolved discussions, all commit checks successful.


components/compositing/compositor.rs, line 577 [r1] (raw file):
Is it really important that we signal this function might create the pipeline details? What about just pipeline_details()? @mbrubeck?


components/gfx/font_cache_task.rs, line 224 [r1] (raw file):
Not really a getter. The function just above also returns the same optional type and use a "find_" prefix. @mbrubeck?


components/gfx/font_cache_task.rs, line 288 [r1] (raw file):
"find_" maybe? @mbrubeck?


components/gfx/font_template.rs, line 91 [r1] (raw file):
"_if_matches" sounds like a bad suffix, it can be used on any method that returns an Option<T>. What about just find_font or something like this? @mbrubeck?


components/gfx/platform/freetype/font_list.rs, line 30 [r1] (raw file):
I don't like these names, with or without prefix, they don't even return anything! foreach_available_families? @mbrubeck?


components/gfx/platform/freetype/font_list.rs, line 60 [r1] (raw file):
I don't like these names, with or without prefix, they don't even return anything! foreach_available_families? @mbrubeck?


components/gfx/platform/macos/font_list.rs, line 13 [r1] (raw file):
Ditto.


components/gfx/platform/macos/font_list.rs, line 23 [r1] (raw file):
Ditto.


components/net/storage_task.rs, line 140 [r1] (raw file):
Weird name, this doesn't actually return anything. send_item? @mbrubeck?


components/net_traits/image_cache_task.rs, line 114 [r1] (raw file):
This _if_available suffix looks as weird as _if_matches. What about dropping it altogether? @mbrubeck?


components/servo/lib.rs, line 190 [r1] (raw file):
This doesn't return anything, what does it actually do?


Comments from the review on Reviewable.io

@nox nox added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. S-awaiting-answer Someone asked a question that requires an answer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 8, 2015
@mbrubeck

mbrubeck commented Sep 8, 2015

Copy link
Copy Markdown
Contributor

Review status: all files reviewed at latest revision, 11 unresolved discussions, all commit checks successful.


components/compositing/compositor.rs, line 577 [r1] (raw file):
Yes, just pipeline_details seems fine to me.


components/gfx/font_cache_task.rs, line 224 [r1] (raw file):
Agreed.


components/gfx/font_cache_task.rs, line 288 [r1] (raw file):
Agreed.


components/gfx/font_template.rs, line 91 [r1] (raw file):
I suggest data_for_descriptor


components/gfx/platform/freetype/font_list.rs, line 30 [r1] (raw file):
I like for_each_available_family


components/gfx/platform/freetype/font_list.rs, line 60 [r1] (raw file):
I suggest for_each_variation


components/net/storage_task.rs, line 140 [r1] (raw file):
I think we can treat this as "returning" an item through the IPC channel.


components/net_traits/image_cache_task.rs, line 114 [r1] (raw file):
Maybe find_image?


components/servo/lib.rs, line 190 [r1] (raw file):
This sends a GetPipelineTitle message requesting the title; the "return" value will come through another message channel. Perhaps send_get_title_for_main_frame would be better.


Comments from the review on Reviewable.io

@jdm jdm removed the S-awaiting-answer Someone asked a question that requires an answer. label Sep 8, 2015
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Sep 9, 2015
@leaexplores

Copy link
Copy Markdown
Contributor Author

Review status: 19 of 28 files reviewed at latest revision, 9 unresolved discussions, some commit checks pending.


components/net/storage_task.rs, line 140 [r1] (raw file):
Seems fine for me.


components/net_traits/image_cache_task.rs, line 114 [r1] (raw file):
It may be interesting to modify ImageCacheCommand::GetImageIfAvailable while we're at it or open a issue for it ?


Comments from the review on Reviewable.io

@leaexplores

Copy link
Copy Markdown
Contributor Author

@nox well I guess I'll be chipping in and try to learn some rust along the way :)

@nox

nox commented Sep 9, 2015

Copy link
Copy Markdown
Contributor

-S-awaiting-review +S-awaiting-answer

@mbrubeck Some last questions for you and I'm done with this review.


Reviewed 9 of 9 files at r2.
Review status: 27 of 28 files reviewed at latest revision, 3 unresolved discussions, all commit checks successful.


components/net/storage_task.rs, line 140 [r1] (raw file):
@mbrubeck I feel like "request_item" or something like that would be better.


components/net_traits/image_cache_task.rs, line 114 [r1] (raw file):
@ddrmanxbxfr That can be filed as a follow-up, I think.


components/servo/lib.rs, line 190 [r1] (raw file):
request_?


Comments from the review on Reviewable.io

@nox nox added S-awaiting-answer Someone asked a question that requires an answer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 9, 2015
@mbrubeck mbrubeck added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-answer Someone asked a question that requires an answer. labels Sep 9, 2015
@mbrubeck

mbrubeck commented Sep 9, 2015

Copy link
Copy Markdown
Contributor

-S-awaiting-answer +S-needs-code-changes


Review status: 27 of 28 files reviewed at latest revision, 3 unresolved discussions, all commit checks successful.


components/net/storage_task.rs, line 140 [r1] (raw file):
I like that. request_item works for me.


components/servo/lib.rs, line 190 [r1] (raw file):
Sure. request_title_for_main_frame sounds good to me.


Comments from the review on Reviewable.io

@nox

nox commented Sep 11, 2015

Copy link
Copy Markdown
Contributor

@ddrmanxbxfr Ping? Almost there! :)

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Sep 11, 2015
@leaexplores

Copy link
Copy Markdown
Contributor Author

Incoming.

Had some work rush that got underway :p.


Review status: 27 of 28 files reviewed at latest revision, 3 unresolved discussions, all commit checks successful.


Comments from the review on Reviewable.io

@leaexplores

Copy link
Copy Markdown
Contributor Author

@nox I guess we're safe and sound now... 👍

@nox

nox commented Sep 11, 2015

Copy link
Copy Markdown
Contributor

@ddrmanxbxfr Please squash everything together.

@leaexplores

Copy link
Copy Markdown
Contributor Author

@nox ok. done.

@nox

nox commented Sep 11, 2015

Copy link
Copy Markdown
Contributor

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Sep 12, 2015
@leaexplores

Copy link
Copy Markdown
Contributor Author

@nox I just updated the ref tests to make sure they pass using the new function names.

Thanks!

@nox

nox commented Sep 12, 2015

Copy link
Copy Markdown
Contributor

@bors-servo r+

Thanks for your contribution.


Reviewed 32 of 32 files at r5, 30 of 30 files at r6.
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.


Comments from the review on Reviewable.io

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 44e9e3c has been approved by nox

@highfive highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Sep 12, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 44e9e3c with merge 257ae72...

@highfive highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Sep 12, 2015
bors-servo pushed a commit that referenced this pull request Sep 12, 2015
Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server

Hi guys,

I just gave a big pass of RFC-0344 as per issue #6224 .

Pretty much renamed all the get_* fn that were used to fetch values. 

I hope I didn't rename too much. 

As said in the issue discussion, I didn't touch at the scripts folder so we keep the unsafe ones pretty explicit.

I've ran the whole pass of test, everything seems to be still working right :).

Please give feedback on this PR.

Thanks for looking into it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7559)
<!-- Reviewable:end -->
@leaexplores

Copy link
Copy Markdown
Contributor Author

@nox wait before merging commit leaexplores@5db4b09

Shouldn't be in this branch.. it's open in an other PR...

@leaexplores

Copy link
Copy Markdown
Contributor Author

Rebasing without this commit!

@nox

nox commented Sep 13, 2015

Copy link
Copy Markdown
Contributor

@bors-servo r-

@nox

nox commented Sep 13, 2015

Copy link
Copy Markdown
Contributor

@bors-servo r- force

@bors-servo

Copy link
Copy Markdown
Contributor

⛄ The build was interrupted to prioritize another pull request.

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 13, 2015
@leaexplores

Copy link
Copy Markdown
Contributor Author

@nox Should be ok with this one. I removed the nits commits. Error on my side while rebasing commits.

@nox

nox commented Sep 13, 2015

Copy link
Copy Markdown
Contributor

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 7320433 has been approved by nox

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 13, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 7320433 with merge b05f4aa...

bors-servo pushed a commit that referenced this pull request Sep 13, 2015
Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server

Hi guys,

I just gave a big pass of RFC-0344 as per issue #6224 .

Pretty much renamed all the get_* fn that were used to fetch values. 

I hope I didn't rename too much. 

As said in the issue discussion, I didn't touch at the scripts folder so we keep the unsafe ones pretty explicit.

I've ran the whole pass of test, everything seems to be still working right :).

Please give feedback on this PR.

Thanks for looking into it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7559)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants