mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Rename NodeData and associated data structures to Element*.
MozReview-Commit-ID: 96VsmsoZtjZ
This commit is contained in:
parent
5442fbec3f
commit
be89f73675
15 changed files with 75 additions and 77 deletions
|
@ -53,14 +53,14 @@ use libc::c_void;
|
|||
use restyle_damage::RestyleDamage;
|
||||
use std::sync::atomic::AtomicIsize;
|
||||
use style::atomic_refcell::AtomicRefCell;
|
||||
use style::data::NodeData;
|
||||
use style::data::ElementData;
|
||||
|
||||
pub struct PartialPersistentLayoutData {
|
||||
/// Data that the style system associates with a node. When the
|
||||
/// style system is being used standalone, this is all that hangs
|
||||
/// off the node. This must be first to permit the various
|
||||
/// transmutations between NodeData and PersistentLayoutData.
|
||||
pub style_data: NodeData,
|
||||
/// transmutations between ElementData and PersistentLayoutData.
|
||||
pub style_data: ElementData,
|
||||
|
||||
/// Description of how to account for recent style changes.
|
||||
pub restyle_damage: RestyleDamage,
|
||||
|
@ -72,7 +72,7 @@ pub struct PartialPersistentLayoutData {
|
|||
impl PartialPersistentLayoutData {
|
||||
pub fn new() -> Self {
|
||||
PartialPersistentLayoutData {
|
||||
style_data: NodeData::new(),
|
||||
style_data: ElementData::new(),
|
||||
restyle_damage: RestyleDamage::empty(),
|
||||
parallel: DomParallelInfo::new(),
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ use string_cache::{Atom, Namespace};
|
|||
use style::atomic_refcell::AtomicRefCell;
|
||||
use style::computed_values::display;
|
||||
use style::context::SharedStyleContext;
|
||||
use style::data::NodeData;
|
||||
use style::data::ElementData;
|
||||
use style::dom::{LayoutIterator, NodeInfo, PresentationalHintsSynthetizer, TElement, TNode};
|
||||
use style::dom::OpaqueNode;
|
||||
use style::properties::ServoComputedValues;
|
||||
|
@ -274,7 +274,7 @@ pub trait DangerousThreadSafeLayoutNode: ThreadSafeLayoutNode {
|
|||
}
|
||||
|
||||
pub trait LayoutElement: Clone + Copy + Sized + Debug + GetLayoutData + TElement {
|
||||
fn get_style_data(&self) -> Option<&AtomicRefCell<NodeData>>;
|
||||
fn get_style_data(&self) -> Option<&AtomicRefCell<ElementData>>;
|
||||
}
|
||||
|
||||
pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug +
|
||||
|
@ -296,7 +296,7 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug +
|
|||
#[inline]
|
||||
fn get_attr(&self, namespace: &Namespace, name: &Atom) -> Option<&str>;
|
||||
|
||||
fn get_style_data(&self) -> Option<&AtomicRefCell<NodeData>>;
|
||||
fn get_style_data(&self) -> Option<&AtomicRefCell<ElementData>>;
|
||||
|
||||
#[inline]
|
||||
fn get_pseudo_element_type(&self) -> PseudoElementType<Option<display::T>>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue