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 upTrigger reflow on document.elementsFromPoint #15768
Conversation
highfive
commented
Feb 28, 2017
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @jdm (or someone else) soon. |
highfive
commented
Feb 28, 2017
|
Heads up! This PR modifies the following files:
|
highfive
commented
Feb 28, 2017
89fa95c
to
3e146b3
3e146b3
to
7426d90
|
Looks great to me! r=emilio with those comments addressed, thanks for fixing that! |
| <title></title> | ||
| <link rel="match" href="document_elementsFromPoint_ref.html"> | ||
| <script> | ||
| var elements = document.elementsFromPoint(10, 10); |
This comment has been minimized.
This comment has been minimized.
emilio
Mar 2, 2017
Member
Instead of writing the test like this, since this is testing a crash, let's do something in the lines of:
<!doctype html>
<meta charset="utf-8">
<title>document.elementsFromPoint does not crash due to a missing display list</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function() {
document.elementsFromPoint(10, 10);
}, "doesn't crash");
</script>| .rev() | ||
| .map(|metadata| metadata.node.to_untrusted_node_address()) | ||
| .collect() | ||
| fn nodes_from_point(&self) -> Vec<UntrustedNodeAddress> { |
This comment has been minimized.
This comment has been minimized.
emilio
Mar 2, 2017
Member
let's call this nodes_from_point_response, so it's clear it's not intended to be called directly without querying first.
| @@ -0,0 +1,3 @@ | |||
| <!doctype html> | |||
This comment has been minimized.
This comment has been minimized.
emilio
Mar 2, 2017
Member
Also, just for reference, there's a blank.html file used to avoid having a lot of files like this, though this is no longer relevant with my previous comment.
This comment has been minimized.
This comment has been minimized.
…test to regular test checking only the fixed crash
|
@bors-servo r=emilio |
|
@ferjm: |
|
@emilio I already addressed your feedback, but I don't seem have permissions to ask bors-servo to merge. |
|
@bors-servo r=emilio |
|
|
…r=emilio Trigger reflow on document.elementsFromPoint As [suggested](#15592 (comment)) by @jdm `Document::nodes_from_point` now triggers a reflow. I added a new reftest that panics with `ERROR:servo: Tried to hit test without a DisplayList` if this patch is not applied. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15592. - [X] There are tests for these changes <!-- 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/15768) <!-- Reviewable:end -->
|
|
|
Thanks for fixing this again! :) |
ferjm commentedFeb 28, 2017
•
edited by larsbergstrom
As suggested by @jdm
Document::nodes_from_pointnow triggers a reflow.I added a new reftest that panics with
ERROR:servo: Tried to hit test without a DisplayListif this patch is not applied../mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is