Repository navigation
Add the scrollWidth and scrollHeight extensions to the element interface - #9824
Conversation
|
Review status: 0 of 9 files reviewed at latest revision, 1 unresolved discussion. components/layout/query.rs, line 433 [r1] (raw file): Comments from the review on Reviewable.io |
|
I'm not sure about the relationship between the spec and the code. Care to clarify? Also, are there any tests that now pass which previously failed? Reviewed 9 of 9 files at r1. components/layout/query.rs, line 405 [r1] (raw file): components/layout/query.rs, line 424 [r1] (raw file): I'm not sure about the explicit setting of components/script/dom/node.rs, line 582 [r1] (raw file): components/script/dom/node.rs, line 589 [r1] (raw file): Comments from the review on Reviewable.io |
|
Just one thing to add: if your code is following steps from the spec, an annotation of |
| window_from_node(self).client_rect_query(self.to_trusted_node_address()) | ||
| } | ||
|
|
||
| // https://drafts.csswg.org/cssom-view/#extension-to-the-element-interface |
There was a problem hiding this comment.
Yes, two in
As far as i could tell the specifications for (at least the get methods) Thanks for the review! Review status: all files reviewed at latest revision, 6 unresolved discussions. components/layout/query.rs, line 405 [r1] (raw file): components/layout/query.rs, line 424 [r1] (raw file): components/script/dom/node.rs, line 582 [r1] (raw file): components/script/dom/node.rs, line 582 [r1] (raw file): components/script/dom/node.rs, line 589 [r1] (raw file): Comments from the review on Reviewable.io |
|
Review status: 7 of 9 files reviewed at latest revision, 7 unresolved discussions. components/layout/query.rs, line 426 [r2] (raw file): Comments from the review on Reviewable.io |
|
☔ The latest upstream changes (presumably #9832) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Reviewed 6 of 6 files at r3. components/layout/query.rs, line 433 [r1] (raw file): components/layout/query.rs, line 426 [r2] (raw file): components/layout/query.rs, line 364 [r3] (raw file): Comments from the review on Reviewable.io |
|
Review status: all files reviewed at latest revision, 4 unresolved discussions. components/layout/query.rs, line 433 [r1] (raw file): components/layout/query.rs, line 426 [r2] (raw file): components/layout/query.rs, line 364 [r3] (raw file): If I am incorrect, please let me know, and I'll go back to the "manual" version. Comments from the review on Reviewable.io |
|
Review status: all files reviewed at latest revision, 4 unresolved discussions. components/layout/query.rs, line 426 [r2] (raw file): Comments from the review on Reviewable.io |
|
Review status: all files reviewed at latest revision, 4 unresolved discussions. components/layout/query.rs, line 426 [r2] (raw file): Comments from the review on Reviewable.io |
|
Review status: all files reviewed at latest revision, 4 unresolved discussions. components/layout/query.rs, line 426 [r2] (raw file): Comments from the review on Reviewable.io |
|
Review status: all files reviewed at latest revision, 3 unresolved discussions. components/layout/query.rs, line 364 [r3] (raw file): Comments from the review on Reviewable.io |
|
There are a few things I'm still a bit unsure about, but I think it is getting closer. Thanks for the help! As always any feedback is appreciated! Review status: 4 of 9 files reviewed at latest revision, 4 unresolved discussions. components/layout/query.rs, line 364 [r3] (raw file): components/layout/query.rs, line 403 [r4] (raw file): components/layout/query.rs, line 406 [r4] (raw file): Comments from the review on Reviewable.io |
|
Review status: 4 of 9 files reviewed at latest revision, 5 unresolved discussions. components/script/dom/node.rs, line 607 [r4] (raw file): Comments from the review on Reviewable.io |
|
Review status: 7 of 10 files reviewed at latest revision, 4 unresolved discussions. components/layout/query.rs, line 406 [r4] (raw file): components/script/dom/node.rs, line 607 [r5] (raw file): Comments from the review on Reviewable.io |
|
Reviewed 1 of 3 files at r5. components/layout/query.rs, line 406 [r4] (raw file): components/script/dom/node.rs, line 607 [r5] (raw file): Does something like Comments from the review on Reviewable.io |
|
Review status: 8 of 10 files reviewed at latest revision, 4 unresolved discussions. components/layout/query.rs, line 406 [r4] (raw file): Comments from the review on Reviewable.io |
|
Review status: 8 of 10 files reviewed at latest revision, 4 unresolved discussions. components/layout/query.rs, line 406 [r4] (raw file): components/script/dom/node.rs, line 607 [r5] (raw file): That's what I thought too, but nox and Ms2ger corrected me on IRC. The log is here-ish. Comments from the review on Reviewable.io |
|
Let me know if you have any feedback! Review status: 3 of 10 files reviewed at latest revision, 8 unresolved discussions. components/layout/query.rs, line 323 [r6] (raw file): components/layout/query.rs, line 326 [r6] (raw file): components/layout/query.rs, line 415 [r6] (raw file):
So i used the union of the padding and margin rectangles to follow the spec, but I was curious as to why it is written like that. components/layout/query.rs, line 523 [r6] (raw file): If you can think of a better way of working around this let me know. This is just the best I could think of Comments from the review on Reviewable.io |
|
Looks good! Reviewed 1 of 3 files at r5, 6 of 6 files at r6. components/layout/query.rs, line 41 [r6] (raw file): components/layout/query.rs, line 415 [r6] (raw file): components/layout/query.rs, line 523 [r6] (raw file): components/script/dom/node.rs, line 607 [r5] (raw file): components/style/logical_geometry.rs, line 101 [r6] (raw file): Comments from the review on Reviewable.io |
|
Just want to say that I'm super pumped that @danlrobertson is tackling this and implementing the useful building blocks like |
Add the scrollWidth and scrollHeight extensions to the element interface.
|
Thanks! This was a ton of fun and I learned a lot Review status: 9 of 10 files reviewed at latest revision, 8 unresolved discussions. components/layout/query.rs, line 41 [r6] (raw file): components/layout/query.rs, line 415 [r6] (raw file): components/layout/query.rs, line 523 [r6] (raw file): Comments from the review on Reviewable.io |
|
Glad you enjoyed the experience! Reviewed 1 of 1 files at r7. Comments from the review on Reviewable.io |
|
@bors-servo: r+ |
|
📌 Commit 16d2778 has been approved by |
Add the scrollWidth and scrollHeight extensions to the element interface Add the `scrollWidth` and `scrollHeight` extensions to the element interface. My goal was to create a method that encompassed getting `scrollWidth`, `scrollHeight`, `scrollTop`, and `scrollLeft`. I also noted that `clientHeight` and `clientWidth` to not handle the root element and the body element correctly. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9824) <!-- Reviewable:end -->
|
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, status-appveyor |
Add the
scrollWidthandscrollHeightextensions to the element interface. My goal was to create a method that encompassed gettingscrollWidth,scrollHeight,scrollTop, andscrollLeft.I also noted that
clientHeightandclientWidthto not handle the root element and the body element correctly.