mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
dom: Calculate the viewport size of iframes when they are first added to the tree.
This commit is contained in:
parent
38e4ae0833
commit
fd260f78c8
10 changed files with 72 additions and 11 deletions
|
@ -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>>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue