Repository navigation
Implement Document#elementFromPoint - #8932
Conversation
|
|
Thanks for the contribution! Where is the step 3 handled?
-S-awaiting-review +S-needs-code-changes Review status: 0 of 2 files reviewed at latest revision, 5 unresolved discussions. components/script/dom/document.rs, line 2436 [r1] (raw file): components/script/dom/document.rs, line 2445 [r1] (raw file): components/script/dom/document.rs, line 2449 [r2] (raw file): components/script/dom/document.rs, line 2452 [r2] (raw file): components/script/dom/document.rs, line 2454 [r2] (raw file): Comments from the review on Reviewable.io |
|
Reviewed 2 of 2 files at r2. Comments from the review on Reviewable.io |
|
components/script/dom/document.rs, line 2436 [r1] (raw file): Comments from the review on Reviewable.io |
|
Review status: all files reviewed at latest revision, 3 unresolved discussions. components/script/dom/document.rs, line 2436 [r1] (raw file): components/script/dom/document.rs, line 2436 [r2] (raw file): Comments from the review on Reviewable.io |
|
components/script/dom/document.rs, line 2452 [r2] (raw file): Comments from the review on Reviewable.io |
|
components/script/dom/document.rs, line 2452 [r2] (raw file): Comments from the review on Reviewable.io |
|
Oh ok, looks like I haven't handled that Comments from the review on Reviewable.io |
|
@rilut As a side note, one of the features of Reviewable is that you don't need to publish each comment separately. Just reply or handle all of them, and then publish all your replies at once with the green button on the top of their UI. |
|
@nox Yeah, I'm looking for that too haha. Sorry it's my first time |
|
No problem. :) We all had to learn that at some point. Review status: all files reviewed at latest revision, 1 unresolved discussion. components/script/dom/document.rs, line 2452 [r2] (raw file): Comments from the review on Reviewable.io |
|
components/script/dom/document.rs, line 2436 [r2] (raw file): Comments from the review on Reviewable.io |
|
-S-awaiting-review +S-needs-code-changes Reviewed 1 of 1 files at r4. components/script/dom/document.rs, line 2436 [r2] (raw file): components/script/dom/document.rs, line 2445 [r4] (raw file): components/script/dom/document.rs, line 2451 [r4] (raw file): Comments from the review on Reviewable.io |
|
Review status: all files reviewed at latest revision, 2 unresolved discussions. components/script/dom/document.rs, line 2445 [r4] (raw file): components/script/dom/document.rs, line 2451 [r4] (raw file): Comments from the review on Reviewable.io |
|
components/script/dom/document.rs, line 2451 [r4] (raw file): Comments from the review on Reviewable.io |
match rootnode.downcast::<Element>() {
Some(element_ref) => Some(Root::from_ref(element_ref)),
None => None,
}could be written as rootnode.downcast::<Element>().map(Root::from_ref) |
is this okay? Comments from the review on Reviewable.io |
|
Review status: all files reviewed at latest revision, 2 unresolved discussions. components/script/dom/document.rs, line 2451 [r4] (raw file):
Comments from the review on Reviewable.io |
|
For the first issue I mentioned, I just discussed it with @mbrubeck on the IRC channel: So you should do something along these lines: match result_of_hit_test {
Some(address) => {
let node = …;
node.downcast::<Element>().unwrap_or_else(|| {
node.GetParentNode().downcast::<Element>().unwrap()
})
}
None => { /* Get root element. */ }
} |
|
@nox (Haven't tested this. On Windows). Something like this? |
Implement Document#elementFromPoint Related to #8666. I haven't implemented elementsFromPoint, because from my past discussion with jdm, [it's not good yet](https://github.com/rilut/servo/commit/dbfa25214b2888dda7527d62b5df1bb61f1ab047#commitcomment-14668959) to implement elementsFromPoint because it may cause GC hazards. By the way, I also have to include the test for this, right? I've found this [1]. So, is all I have to do is just to put this into `tests/wpt/web-platform-tests/cssom-view/elementFromPoint.html`? [1] http://test.csswg.org/suites/cssom-view-1_dev/nightly-unstable/html/elementFromPosition.htm <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8932) <!-- Reviewable:end -->
|
💔 Test failed - mac-rel-css |
|
@jdm Seems like it was a fluke. :( |
|
This looks like it would cause an intermittent, should we disable that test? |
|
No, I think we should actually disable that test. What do you think @Ms2ger? |
So: r=me when that's done. |
|
@bors-servo r=nox |
|
📌 Commit 76678bb has been approved by |
Implement Document#elementFromPoint Related to #8666. I haven't implemented elementsFromPoint, because from my past discussion with jdm, [it's not good yet](https://github.com/rilut/servo/commit/dbfa25214b2888dda7527d62b5df1bb61f1ab047#commitcomment-14668959) to implement elementsFromPoint because it may cause GC hazards. By the way, I also have to include the test for this, right? I've found this [1]. So, is all I have to do is just to put this into `tests/wpt/web-platform-tests/cssom-view/elementFromPoint.html`? [1] http://test.csswg.org/suites/cssom-view-1_dev/nightly-unstable/html/elementFromPosition.htm <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8932) <!-- Reviewable:end -->
|
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt |
|
Thanks, Servo team. |
|
No, thank you for your contribution. |
Related to #8666. I haven't implemented elementsFromPoint, because from my past discussion with jdm, it's not good yet to implement elementsFromPoint because it may cause GC hazards.
By the way, I also have to include the test for this, right? I've found this [1]. So, is all I have to do is just to put this into
tests/wpt/web-platform-tests/cssom-view/elementFromPoint.html?[1] http://test.csswg.org/suites/cssom-view-1_dev/nightly-unstable/html/elementFromPosition.htm