Remove get_unsigned_integer_attribute.

This commit is contained in:
Ms2ger 2015-11-15 11:24:03 +01:00
parent 5417df6397
commit 9c1d678b1b
4 changed files with 1 additions and 50 deletions

View file

@ -75,7 +75,7 @@ use std::default::Default;
use std::mem;
use std::sync::Arc;
use string_cache::{Atom, Namespace, QualName};
use style::legacy::{UnsignedIntegerAttribute, from_declaration};
use style::legacy::from_declaration;
use style::properties::DeclaredValue;
use style::properties::longhands::{self, background_image, border_spacing, font_family, font_size};
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock, parse_style_attribute};
@ -227,9 +227,6 @@ pub trait LayoutElementHelpers {
#[allow(unsafe_code)]
unsafe fn get_colspan(self) -> u32;
#[allow(unsafe_code)]
unsafe fn get_unsigned_integer_attribute_for_layout(&self, attribute: UnsignedIntegerAttribute)
-> Option<u32>;
#[allow(unsafe_code)]
unsafe fn html_element_in_html_document_for_layout(&self) -> bool;
fn id_attribute(&self) -> *const Option<Atom>;
fn style_attribute(&self) -> *const Option<PropertyDeclarationBlock>;
@ -512,23 +509,6 @@ impl LayoutElementHelpers for LayoutJS<Element> {
}
}
#[allow(unsafe_code)]
unsafe fn get_unsigned_integer_attribute_for_layout(&self,
attribute: UnsignedIntegerAttribute)
-> Option<u32> {
match attribute {
UnsignedIntegerAttribute::ColSpan => {
if let Some(this) = self.downcast::<HTMLTableCellElement>() {
this.get_colspan()
} else {
// Don't panic since `display` can cause this to be called on arbitrary
// elements.
None
}
}
}
}
#[inline]
#[allow(unsafe_code)]
unsafe fn html_element_in_html_document_for_layout(&self) -> bool {