Auto merge of #8533 - Ms2ger:legacy, r=nox

Remove the `legacy` module.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8533)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-11-15 19:13:13 +05:30
commit b6f519cd0a
7 changed files with 27 additions and 105 deletions

View file

@ -20,7 +20,6 @@ use model::MaybeAuto;
use std::fmt;
use std::sync::Arc;
use style::computed_values::{border_collapse, border_top_style};
use style::legacy::UnsignedIntegerAttribute;
use style::properties::ComputedValues;
use table::InternalTable;
use table_row::{CollapsedBorder, CollapsedBorderProvenance};
@ -52,8 +51,7 @@ impl TableCellFlow {
TableCellFlow {
block_flow: BlockFlow::from_fragment(fragment, None),
collapsed_borders: CollapsedBordersForCell::new(),
column_span: node.get_unsigned_integer_attribute(UnsignedIntegerAttribute::ColSpan)
.unwrap_or(1),
column_span: node.get_colspan(),
visible: visible,
}
}

View file

@ -64,7 +64,6 @@ use std::sync::Arc;
use string_cache::{Atom, Namespace};
use style::computed_values::content::ContentItem;
use style::computed_values::{content, display, white_space};
use style::legacy::UnsignedIntegerAttribute;
use style::node::TElementAttributes;
use style::properties::ComputedValues;
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
@ -643,12 +642,6 @@ impl<'le> TElementAttributes for LayoutElement<'le> {
}
}
fn get_unsigned_integer_attribute(&self, attribute: UnsignedIntegerAttribute) -> Option<u32> {
unsafe {
self.element.get_unsigned_integer_attribute_for_layout(attribute)
}
}
#[inline]
fn get_attr<'a>(&'a self, namespace: &Namespace, name: &Atom) -> Option<&'a str> {
unsafe {
@ -885,18 +878,6 @@ impl<'ln> ThreadSafeLayoutNode<'ln> {
}
}
pub fn get_unsigned_integer_attribute(self, attribute: UnsignedIntegerAttribute)
-> Option<u32> {
unsafe {
match self.get_jsmanaged().downcast::<Element>() {
Some(element) => {
element.get_unsigned_integer_attribute_for_layout(attribute)
}
None => panic!("not an element!")
}
}
}
/// Get the description of how to account for recent style changes.
/// This is a simple bitfield and fine to copy by value.
pub fn restyle_damage(self) -> RestyleDamage {
@ -1039,6 +1020,12 @@ impl<'ln> ThreadSafeLayoutNode<'ln> {
iframe_element.pipeline_id().unwrap()
}
}
pub fn get_colspan(&self) -> u32 {
unsafe {
self.get_jsmanaged().downcast::<Element>().unwrap().get_colspan()
}
}
}
pub struct ThreadSafeLayoutNodeChildrenIterator<'a> {