mirror of
https://github.com/servo/servo.git
synced 2025-06-17 04:44:28 +00:00
chore: Clean up use of gfx
and constellation
types (#31981)
This change contains three semi-related clean ups: 1. the `to_webrender()` and `from_webrender()` functions on Pipeline are turned into more-idiomatic `From` and `Into` implementations. 2. `combine_id_with_fragment_type` now returns a `u64` as that is what is expected for all callers and not a `usize`. 3. The `query_scroll_id` query is removed entirely. The `ExternalScrollId` that this queries is easily generated directly from the node's opaque id. Querying into layout isn't necessary at all.
This commit is contained in:
parent
b79e2a0b65
commit
dd9f62adcc
15 changed files with 62 additions and 119 deletions
|
@ -46,7 +46,7 @@ use style::properties::PropertyId;
|
|||
use style::selector_parser::PseudoElement;
|
||||
use style::stylesheets::Stylesheet;
|
||||
use style_traits::CSSPixel;
|
||||
use webrender_api::{ExternalScrollId, ImageKey};
|
||||
use webrender_api::ImageKey;
|
||||
|
||||
pub type GenericLayoutData = dyn Any + Send + Sync;
|
||||
|
||||
|
@ -235,7 +235,6 @@ pub trait Layout {
|
|||
animations: DocumentAnimationSet,
|
||||
animation_timeline_value: f64,
|
||||
) -> Option<ServoArc<Font>>;
|
||||
fn query_scroll_id(&self, node: TrustedNodeAddress) -> ExternalScrollId;
|
||||
fn query_scrolling_area(&self, node: Option<OpaqueNode>) -> Rect<i32>;
|
||||
fn query_text_indext(&self, node: OpaqueNode, point: Point2D<f32>) -> Option<usize>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue