Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve implementation of DOMRect and implement DOMRectReadOnly #7415

Merged
merged 2 commits into from Oct 17, 2015

Conversation

@tschneidereit
Copy link
Contributor

tschneidereit commented Aug 27, 2015

Passes most tests from test-css. The remaining ones should pass once we have w3c/csswg-test#834.

r? @Ms2ger

Review on Reviewable

@tschneidereit
Copy link
Contributor Author

tschneidereit commented Aug 27, 2015

Rookie mistake. Will fix.

@bors-servo
Copy link
Contributor

bors-servo commented Aug 27, 2015

The latest upstream changes (presumably #7416) made this pull request unmergeable. Please resolve the merge conflicts.

@tschneidereit tschneidereit force-pushed the tschneidereit:dom-rect branch 3 times, most recently from c6332c0 to 6f4a68e Aug 28, 2015
@nox
Copy link
Member

nox commented Aug 28, 2015

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

Use drafts.fxtf.org links, fix the nits, and it's all good.


Reviewed 11 of 11 files at r1.
Review status: all files reviewed at latest revision, 3 unresolved discussions, some commit checks failed.


components/script/devtools.rs, line 106 [r1] (raw file):
.r() is useless now that Root implements Deref.


components/script/dom/domrect.rs, line 5 [r1] (raw file):
Nit: We generally don't import Wrap in IDL implementations, instead we import both the Binding module and the Methods trait inside.


components/script/dom/domrectreadonly.rs, line 94 [r1] (raw file):
Implement helper methods on DOMRect itself, without an intermediate trait.


Comments from the review on Reviewable.io

@tschneidereit tschneidereit force-pushed the tschneidereit:dom-rect branch from 6f4a68e to 39ceb67 Aug 28, 2015
@nox
Copy link
Member

nox commented Aug 28, 2015

Reviewed 1 of 12 files at r2, 11 of 11 files at r3.
Review status: all files reviewed at latest revision, 4 unresolved discussions, all commit checks successful.


components/script/dom/domrectreadonly.rs, line 41 [r3] (raw file):
set_x


components/script/dom/domrectreadonly.rs, line 45 [r3] (raw file):
set_y


components/script/dom/domrectreadonly.rs, line 49 [r3] (raw file):
set_width


components/script/dom/domrectreadonly.rs, line 53 [r3] (raw file):
set_height


Comments from the review on Reviewable.io

@tschneidereit tschneidereit force-pushed the tschneidereit:dom-rect branch from 39ceb67 to d5049c9 Aug 28, 2015
@nox
Copy link
Member

nox commented Aug 28, 2015

Reviewed 2 of 2 files at r4.
Review status: all files reviewed at latest revision, 4 unresolved discussions, some commit checks pending.


Comments from the review on Reviewable.io

@nox nox self-assigned this Aug 28, 2015
@nox
Copy link
Member

nox commented Aug 28, 2015

@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2015

📌 Commit d5049c9 has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented Aug 28, 2015

Testing commit d5049c9 with merge 32bb538...

bors-servo pushed a commit that referenced this pull request Aug 28, 2015
Improve implementation of DOMRect and implement DOMRectReadOnly

Passes most tests from test-css. The remaining ones should pass once we have w3c/csswg-test#834.

r? @Ms2ger

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

bors-servo commented Aug 28, 2015

💔 Test failed - mac1

@jdm
Copy link
Member

jdm commented Aug 28, 2015

/_mozilla/mozilla/getBoundingClientRect.html
--------------------------------------------
FAIL Untitled
FAIL Untitled 1
/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-img-auto.html
--------------------------------------------------------------------------
PASS expected FAIL placeholder: 'img', svgViewBoxAttr: '0 0 100 200', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', svgViewBoxAttr: '0 0 100 200', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '200', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '200', 
PASS expected FAIL placeholder: 'img', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgHeightAttr: '200', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgHeightAttr: '200', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', svgWidthAttr: '200', svgHeightAttr: '200', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', placeholderWidthAttr: '50%', svgWidthAttr: '200', svgHeightAttr: '200', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '200', svgHeightAttr: '200', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '200', svgHeightAttr: '200', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', svgHeightAttr: '200', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', svgHeightAttr: '200', 
PASS expected FAIL placeholder: 'img', svgViewBoxAttr: '0 0 100 200', svgHeightAttr: '25%', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', svgViewBoxAttr: '0 0 100 200', svgHeightAttr: '25%', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgHeightAttr: '25%', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgHeightAttr: '25%', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '200', svgHeightAttr: '25%', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '200', svgHeightAttr: '25%', 
PASS expected FAIL placeholder: 'img', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', svgHeightAttr: '25%', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', svgHeightAttr: '25%', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', svgHeightAttr: '25%', 
PASS expected FAIL placeholder: 'img', containerHeightStyle: '400px', placeholderWidthAttr: '50%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', svgHeightAttr: '25%', 
/html/rendering/replaced-elements/svg-embedded-sizing/svg-in-img-percentage.html
--------------------------------------------------------------------------------
PASS expected FAIL placeholder: 'img', placeholderHeightAttr: '100%', svgViewBoxAttr: '0 0 100 200', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', placeholderHeightAttr: '100%', svgViewBoxAttr: '0 0 100 200', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', placeholderHeightAttr: '100%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '200', 
PASS expected FAIL placeholder: 'img', placeholderHeightAttr: '100%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', placeholderHeightAttr: '100%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', placeholderHeightAttr: '100%', svgViewBoxAttr: '0 0 100 200', svgHeightAttr: '200', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', placeholderHeightAttr: '100%', svgWidthAttr: '200', svgHeightAttr: '200', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', placeholderHeightAttr: '100%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '200', svgHeightAttr: '200', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', placeholderHeightAttr: '100%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', svgHeightAttr: '200', 
PASS expected FAIL placeholder: 'img', placeholderHeightAttr: '100%', svgViewBoxAttr: '0 0 100 200', svgHeightAttr: '25%', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', placeholderHeightAttr: '100%', svgViewBoxAttr: '0 0 100 200', svgHeightAttr: '25%', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', placeholderHeightAttr: '100%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '200', svgHeightAttr: '25%', 
PASS expected FAIL placeholder: 'img', placeholderHeightAttr: '100%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', svgHeightAttr: '25%', 
PASS expected FAIL placeholder: 'img', placeholderWidthAttr: '50%', placeholderHeightAttr: '100%', svgViewBoxAttr: '0 0 100 200', svgWidthAttr: '25%', svgHeightAttr: '25%', 
/html/rendering/replaced-elements/svg-inline-sizing/svg-inline.html
-------------------------------------------------------------------
PASS expected FAIL svgViewBoxAttr: '0 0 100 200', 
PASS expected FAIL containerHeightStyle: '400px', svgViewBoxAttr: '0 0 100 200', 
@tschneidereit tschneidereit force-pushed the tschneidereit:dom-rect branch from d5049c9 to c336426 Aug 28, 2015
@nox
Copy link
Member

nox commented Sep 13, 2015

Reviewed 3 of 3 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
Contributor

bors-servo commented Sep 18, 2015

The latest upstream changes (presumably #7680) made this pull request unmergeable. Please resolve the merge conflicts.

@nox
Copy link
Member

nox commented Oct 4, 2015

@tschneidereit tschneidereit force-pushed the tschneidereit:dom-rect branch from bcd28ac to 4c1c05f Oct 17, 2015
@tschneidereit
Copy link
Contributor Author

tschneidereit commented Oct 17, 2015

@nox, I finally rebased this, should be ready for review again.

@nox
Copy link
Member

nox commented Oct 17, 2015

Still one issue and this is good to go.

-S-awaiting-answer -S-awaiting-answer -S-needs-rebase


Reviewed 6 of 6 files at r7.
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks pending.


tests/wpt/metadata-css/geometry-1_dev/html/DOMRect-001.htm.ini, line 14 [r7] (raw file):
We still don't have the changes from your csswg-test fix?


Comments from the review on Reviewable.io

@tschneidereit
Copy link
Contributor Author

tschneidereit commented Oct 17, 2015

Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks pending.


components/script/dom/element.rs, line 1269 [r5] (raw file):
As discussed on IRC, that'd make things either more tedious by requiring us to first unwrap the scalar values, then convert them to f64, and then create {Point,Size}2D<f64> from them. Or implement a From trait, but that'd need to go into app_units (or Euclid, but probably the former). Punting for now.


tests/wpt/metadata-css/geometry-1_dev/html/DOMRect-001.htm.ini, line 14 [r7] (raw file):
We don't, no. The last import was from a day before my fix landed upstream.


Comments from the review on Reviewable.io

@nox
Copy link
Member

nox commented Oct 17, 2015

@bors-servo r+

Thanks for your contribution!

-S-needs-code-changes


Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks pending.


Comments from the review on Reviewable.io

@bors-servo
Copy link
Contributor

bors-servo commented Oct 17, 2015

📌 Commit 4c1c05f has been approved by nox

@bors-servo
Copy link
Contributor

bors-servo commented Oct 17, 2015

Testing commit 4c1c05f with merge 810d28a...

bors-servo pushed a commit that referenced this pull request Oct 17, 2015
Improve implementation of DOMRect and implement DOMRectReadOnly

Passes most tests from test-css. The remaining ones should pass once we have w3c/csswg-test#834.

r? @Ms2ger

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

bors-servo commented Oct 17, 2015

@bors-servo bors-servo merged commit 4c1c05f into servo:master Oct 17, 2015
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.