mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Rename ElementType to PseudoElementType, to avoid confusion with ElementTypeId.
This commit is contained in:
parent
0275654c4a
commit
49521baee7
3 changed files with 12 additions and 12 deletions
|
@ -25,7 +25,7 @@ impl<'ln> NodeUtil for ThreadSafeLayoutNode<'ln> {
|
|||
fn get_css_select_results<'a>(&'a self) -> &'a Arc<ComputedValues> {
|
||||
unsafe {
|
||||
let layout_data_ref = self.borrow_layout_data();
|
||||
match self.get_element_type() {
|
||||
match self.get_pseudo_element_type() {
|
||||
Before | BeforeBlock => {
|
||||
cast::transmute_region(layout_data_ref.as_ref()
|
||||
.unwrap()
|
||||
|
|
|
@ -487,7 +487,7 @@ impl<'a> FlowConstructor<'a> {
|
|||
// List of absolute descendants, in tree order.
|
||||
let mut abs_descendants = Descendants::new();
|
||||
for kid in node.children() {
|
||||
if kid.get_element_type() != Normal {
|
||||
if kid.get_pseudo_element_type() != Normal {
|
||||
self.process(&kid);
|
||||
}
|
||||
|
||||
|
@ -1127,7 +1127,7 @@ impl<'ln> NodeUtils for ThreadSafeLayoutNode<'ln> {
|
|||
let mut layout_data_ref = self.mutate_layout_data();
|
||||
match &mut *layout_data_ref {
|
||||
&Some(ref mut layout_data) =>{
|
||||
match self.get_element_type() {
|
||||
match self.get_pseudo_element_type() {
|
||||
Before | BeforeBlock => {
|
||||
layout_data.data.before_flow_construction_result = result
|
||||
},
|
||||
|
@ -1146,7 +1146,7 @@ impl<'ln> NodeUtils for ThreadSafeLayoutNode<'ln> {
|
|||
let mut layout_data_ref = self.mutate_layout_data();
|
||||
match &mut *layout_data_ref {
|
||||
&Some(ref mut layout_data) => {
|
||||
match self.get_element_type() {
|
||||
match self.get_pseudo_element_type() {
|
||||
Before | BeforeBlock => {
|
||||
mem::replace(&mut layout_data.data.before_flow_construction_result,
|
||||
NoConstructionResult)
|
||||
|
|
|
@ -396,7 +396,7 @@ fn get_content(content_list: &content::T) -> ~str {
|
|||
}
|
||||
|
||||
#[deriving(Eq, Clone)]
|
||||
pub enum ElementType {
|
||||
pub enum PseudoElementType {
|
||||
Normal,
|
||||
Before,
|
||||
After,
|
||||
|
@ -411,7 +411,7 @@ pub struct ThreadSafeLayoutNode<'ln> {
|
|||
/// The wrapped node.
|
||||
priv node: LayoutNode<'ln>,
|
||||
|
||||
priv pseudo: ElementType,
|
||||
priv pseudo: PseudoElementType,
|
||||
}
|
||||
|
||||
impl<'ln> TLayoutNode for ThreadSafeLayoutNode<'ln> {
|
||||
|
@ -497,19 +497,19 @@ impl<'ln> ThreadSafeLayoutNode<'ln> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new_with_pseudo_without_self<'a>(node: &LayoutNode<'a>, element_type: ElementType) -> ThreadSafeLayoutNode<'a> {
|
||||
pub fn new_with_pseudo_without_self<'a>(node: &LayoutNode<'a>, pseudo: PseudoElementType) -> ThreadSafeLayoutNode<'a> {
|
||||
ThreadSafeLayoutNode {
|
||||
node: node.clone(),
|
||||
pseudo: element_type,
|
||||
pseudo: pseudo,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Creates a new `ThreadSafeLayoutNode` from the given `LayoutNode`.
|
||||
pub fn new_with_pseudo<'a>(&'a self, element_type: ElementType) -> ThreadSafeLayoutNode<'a> {
|
||||
pub fn new_with_pseudo<'a>(&'a self, pseudo: PseudoElementType) -> ThreadSafeLayoutNode<'a> {
|
||||
ThreadSafeLayoutNode {
|
||||
node: self.node.clone(),
|
||||
pseudo: element_type,
|
||||
pseudo: pseudo,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -544,11 +544,11 @@ impl<'ln> ThreadSafeLayoutNode<'ln> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_element_type(&self) -> ElementType {
|
||||
pub fn get_pseudo_element_type(&self) -> PseudoElementType {
|
||||
self.pseudo
|
||||
}
|
||||
|
||||
pub fn is_block(&self, kind: ElementType) -> bool {
|
||||
pub fn is_block(&self, kind: PseudoElementType) -> bool {
|
||||
let mut layout_data_ref = self.mutate_layout_data();
|
||||
let node_layout_data_wrapper = layout_data_ref.get_mut_ref();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue