mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Fix panic when called on root node, and update test expectations.
The three tests that are marked as failures are because they use offsetWidth as a dummy to force a layout flush. Now that these exist, they expose an unrelated bug with reflow.
This commit is contained in:
parent
9e5687e3e7
commit
39972a174e
5 changed files with 11 additions and 7 deletions
|
@ -839,8 +839,8 @@ impl<'a> WindowHelpers for &'a Window {
|
|||
Some(parent_node_address) => {
|
||||
let node = from_untrusted_node_address(js_runtime.rt(),
|
||||
parent_node_address);
|
||||
let element = ElementCast::to_ref(node.r()).unwrap();
|
||||
Some(Root::from_ref(element))
|
||||
let element = ElementCast::to_ref(node.r());
|
||||
element.map(Root::from_ref)
|
||||
}
|
||||
None => {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue