mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
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:
parent
8159dac506
commit
485fe874e8
5 changed files with 13 additions and 12 deletions
|
@ -1216,11 +1216,11 @@ impl Window {
|
|||
&*self.layout_rpc
|
||||
}
|
||||
|
||||
pub fn content_box_query(&self, content_box_request: TrustedNodeAddress) -> Rect<Au> {
|
||||
pub fn content_box_query(&self, content_box_request: TrustedNodeAddress) -> Option<Rect<Au>> {
|
||||
if !self.reflow(ReflowGoal::ForScriptQuery,
|
||||
ReflowQueryType::ContentBoxQuery(content_box_request),
|
||||
ReflowReason::Query) {
|
||||
return Rect::zero();
|
||||
return None;
|
||||
}
|
||||
let ContentBoxResponse(rect) = self.layout_rpc.content_box();
|
||||
rect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue