Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upChange while loop in HTMLImageElement::handle_event to for loop #15892
Conversation
highfive
commented
Mar 9, 2017
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @emilio (or someone else) soon. |
highfive
commented
Mar 9, 2017
highfive
commented
Mar 9, 2017
|
Looks good, thanks! |
| let p = Point2D::new(self.upcast::<Element>().GetBoundingClientRect().X() as f32, | ||
| self.upcast::<Element>().GetBoundingClientRect().Y() as f32); | ||
| self.upcast::<Element>().GetBoundingClientRect().Y() as f32); |
This comment has been minimized.
This comment has been minimized.
emilio
Mar 9, 2017
Member
As a followup, someone should probably ensure that we only call GetBoundingClientRect once, since it's somewhat expensive.
|
@bors-servo r+ |
|
|
|
|
|
|
Happy to help |
|
|
|
|
| let shp = if let Some(x) = shape { | ||
| x.absolute_coords(p) | ||
| } else { | ||
| return | ||
| }; | ||
|
|
This comment has been minimized.
This comment has been minimized.
emilio
Mar 10, 2017
Member
You'll need to remove this trailing whitespace before landing, since CI is failing with:
./components/script/dom/htmlimageelement.rs:690: trailing whitespace
This comment has been minimized.
This comment has been minimized.
hgallagher1993
Mar 10, 2017
Author
Contributor
I actually saw Intellij had a little marker in the line number bar on that line but didn't know what it meant, TIL.
|
@emilio checks passed, squash? |
|
Yes, please do squash and we'll merge this, thanks for doing this! :) |
Remove trailing whitespace
034f77f
to
97e7c6b
|
@bors-servo r=emilio |
|
|
|
Should be it now. . .and no problem |
Change while loop in HTMLImageElement::handle_event to for loop <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15885 <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because @Ms2ger said none were needed <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15892) <!-- Reviewable:end -->
|
|
hgallagher1993 commentedMar 9, 2017
•
edited by larsbergstrom
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is