Skip to content

Minor script::dom::window::Window cleanup - #7613

Merged
bors-servo merged 1 commit into
servo:masterfrom
frewsxcv:minor-window-cleanup
Sep 12, 2015
Merged

bors-servo merged 1 commit into
servo:masterfrom
frewsxcv:minor-window-cleanup

Conversation

@frewsxcv

Copy link
Copy Markdown
Contributor

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 12, 2015
@nox nox self-assigned this Sep 12, 2015
@nox

nox commented Sep 12, 2015

Copy link
Copy Markdown
Contributor

-S-awaiting-review +S-needs-code-changes

Just two small nits, the first one you decide whether it's important to keep ScaleFactor around in the expression, it might help understanding the code after all.


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


components/script/dom/window.rs, line 753 [r1] (raw file):
Bikeshedding at its best, but I think you can do self.window_size.get().map(|data| data.device_pixel_ratio.get()).unwrap_or(1.0f32).


components/script/dom/window.rs, line 1060 [r1] (raw file):
You can just do ElementCast::to_root(&node). Also, .r() is useless on roots now, they deref to their underlying type.


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. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 12, 2015
@frewsxcv

Copy link
Copy Markdown
Contributor Author

components/script/dom/window.rs, line 753 [r1] (raw file):
I was primarily fixing the indentation, but sure


Comments from the review on Reviewable.io

@frewsxcv
frewsxcv force-pushed the minor-window-cleanup branch from 0070c4e to 3a7a610 Compare September 12, 2015 13:52
@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
@frewsxcv

Copy link
Copy Markdown
Contributor Author

Addressed your comments


Comments from the review on Reviewable.io

@frewsxcv frewsxcv changed the title Minor script::dom::document::Document cleanup Minor script::dom::window::Window cleanup Sep 12, 2015
@nox

nox commented Sep 12, 2015

Copy link
Copy Markdown
Contributor

-S-awaiting-review +S-needs-code-changes

Sorry you misunderstood my nit. If you can't be bothered feel free to r=nox. :)


Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion, all commit checks successful.


components/script/dom/window.rs, line 1058 [r2] (raw file):
ElementCast::to_root(node)


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. A-content/dom Interacting with the DOM from web content I-cleanup No impact; the issue is one of maintainability or tidiness. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 12, 2015
@frewsxcv
frewsxcv force-pushed the minor-window-cleanup branch from 3a7a610 to 9331dc7 Compare September 12, 2015 14:03
@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
@nox

nox commented Sep 12, 2015

Copy link
Copy Markdown
Contributor

@bors-servo r+


Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from the review on Reviewable.io

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 9331dc7 has been approved by nox

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 9331dc7 with merge a63e293...

bors-servo pushed a commit that referenced this pull request Sep 12, 2015
@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 12, 2015
@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

@bors-servo
bors-servo merged commit 9331dc7 into servo:master Sep 12, 2015
@frewsxcv
frewsxcv deleted the minor-window-cleanup branch October 9, 2015 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-content/dom Interacting with the DOM from web content I-cleanup No impact; the issue is one of maintainability or tidiness. 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.

4 participants