aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/element.rs7
-rw-r--r--components/style/legacy.rs17
-rw-r--r--components/style/lib.rs1
3 files changed, 6 insertions, 19 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index 79d091505bc..47ccfdec7b8 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -75,7 +75,6 @@ use std::default::Default;
use std::mem;
use std::sync::Arc;
use string_cache::{Atom, Namespace, QualName};
-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};
@@ -259,6 +258,12 @@ impl LayoutElementHelpers for LayoutJS<Element> {
unsafe fn synthesize_presentational_hints_for_legacy_attributes<V>(&self, hints: &mut V)
where V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>>
{
+ #[inline]
+ fn from_declaration(rule: PropertyDeclaration)
+ -> DeclarationBlock<Vec<PropertyDeclaration>> {
+ DeclarationBlock::from_declarations(Arc::new(vec![rule]))
+ }
+
let bgcolor = if let Some(this) = self.downcast::<HTMLBodyElement>() {
this.get_background_color()
} else if let Some(this) = self.downcast::<HTMLTableElement>() {
diff --git a/components/style/legacy.rs b/components/style/legacy.rs
deleted file mode 100644
index 9a67fa518c7..00000000000
--- a/components/style/legacy.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-//! Legacy presentational attributes defined in the HTML5 specification: `<td width>`,
-//! `<input size>`, and so forth.
-
-use properties::PropertyDeclaration;
-use selectors::matching::DeclarationBlock;
-use std::sync::Arc;
-
-/// A convenience function to create a declaration block from a single declaration. This is
-/// primarily used in `synthesize_rules_for_legacy_attributes`.
-#[inline]
-pub fn from_declaration(rule: PropertyDeclaration) -> DeclarationBlock<Vec<PropertyDeclaration>> {
- DeclarationBlock::from_declarations(Arc::new(vec![rule]))
-}
diff --git a/components/style/lib.rs b/components/style/lib.rs
index a30274233d9..230a6cd0e28 100644
--- a/components/style/lib.rs
+++ b/components/style/lib.rs
@@ -45,7 +45,6 @@ pub mod animation;
pub mod attr;
mod custom_properties;
pub mod font_face;
-pub mod legacy;
pub mod media_queries;
pub mod node;
pub mod parser;