mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Don't go through the layout thread to retrieve a node's primary style
This commit is contained in:
parent
030a1cf8fb
commit
c10e839924
10 changed files with 38 additions and 79 deletions
|
@ -6,8 +6,6 @@ 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;
|
||||
|
||||
|
@ -33,9 +31,6 @@ pub trait LayoutRPC {
|
|||
/// Query layout for the resolved value of a given CSS property
|
||||
fn resolved_style(&self) -> ResolvedStyleResponse;
|
||||
fn offset_parent(&self) -> OffsetParentResponse;
|
||||
/// Requests the styles for an element. Contains a `None` value if the element is in a `display:
|
||||
/// none` subtree.
|
||||
fn style(&self) -> StyleResponse;
|
||||
fn text_index(&self) -> TextIndexResponse;
|
||||
/// Requests the list of nodes from the given point.
|
||||
fn nodes_from_point_response(&self) -> Vec<UntrustedNodeAddress>;
|
||||
|
@ -72,8 +67,5 @@ impl OffsetParentResponse {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct StyleResponse(pub Option<Arc<ComputedValues>>);
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct TextIndexResponse(pub Option<usize>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue