mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Fix Document#elementFromPoint no viewport available test
This commit is contained in:
parent
86778a0d71
commit
5ad312cb8e
2 changed files with 4 additions and 3 deletions
|
@ -2687,6 +2687,10 @@ impl DocumentMethods for Document {
|
||||||
let window = window_from_node(self);
|
let window = window_from_node(self);
|
||||||
let viewport = window.window_size().unwrap().visible_viewport;
|
let viewport = window.window_size().unwrap().visible_viewport;
|
||||||
|
|
||||||
|
if self.browsing_context().is_none() {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
|
||||||
if x < 0.0 || y < 0.0 || x > viewport.width.get() || y > viewport.height.get() {
|
if x < 0.0 || y < 0.0 || x > viewport.width.get() || y > viewport.height.get() {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,9 +12,6 @@
|
||||||
[no hit target at x,y]
|
[no hit target at x,y]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[No viewport available]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Image Maps]
|
[Image Maps]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue