layout: Expose whether the element was rendered in content_box_query to script.

But don't change the API yet.
This commit is contained in:
Emilio Cobos Álvarez 2017-01-17 00:22:42 +01:00
parent 8159dac506
commit 485fe874e8
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 13 additions and 12 deletions

View file

@ -464,7 +464,7 @@ impl LayoutThread {
constellation_chan: constellation_chan,
display_list: None,
stylist: stylist,
content_box_response: Rect::zero(),
content_box_response: None,
content_boxes_response: Vec::new(),
client_rect_response: Rect::zero(),
hit_test_response: (None, false),
@ -1012,7 +1012,7 @@ impl LayoutThread {
debug!("layout: No root node: bailing");
match data.query_type {
ReflowQueryType::ContentBoxQuery(_) => {
rw_data.content_box_response = Rect::zero();
rw_data.content_box_response = None;
},
ReflowQueryType::ContentBoxesQuery(_) => {
rw_data.content_boxes_response = Vec::new();