dom: Calculate the viewport size of iframes when they are first added to the tree.

This commit is contained in:
Josh Matthews 2019-11-06 15:55:11 -05:00
parent 38e4ae0833
commit fd260f78c8
10 changed files with 72 additions and 11 deletions

View file

@ -4,9 +4,11 @@
use app_units::Au;
use euclid::default::Rect;
use euclid::Size2D;
use script_traits::UntrustedNodeAddress;
use servo_arc::Arc;
use style::properties::ComputedValues;
use style_traits::CSSPixel;
use webrender_api::ExternalScrollId;
/// Synchronous messages that script can send to layout.
@ -39,6 +41,8 @@ pub trait LayoutRPC {
fn nodes_from_point_response(&self) -> Vec<UntrustedNodeAddress>;
/// Query layout to get the inner text for a given element.
fn element_inner_text(&self) -> String;
/// Get the dimensions of an iframe's inner window.
fn inner_window_dimensions(&self) -> Option<Size2D<f32, CSSPixel>>;
}
pub struct ContentBoxResponse(pub Option<Rect<Au>>);