diff options
author | Josh Matthews <josh@joshmatthews.net> | 2014-09-18 15:34:55 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2014-12-18 12:54:02 -0500 |
commit | 2e14b653bf3fd1e43d099fee6e404c2cc562ffac (patch) | |
tree | 38fbddbe4dfc28c0f3a57f9dcafed7f3137dedfc /components/script/dom/cssstyledeclaration.rs | |
parent | 2cfa8e85a69cf04fa97b1e5792a9e0d8eb7f30b6 (diff) | |
download | servo-2e14b653bf3fd1e43d099fee6e404c2cc562ffac.tar.gz servo-2e14b653bf3fd1e43d099fee6e404c2cc562ffac.zip |
Add a style property to HTMLElement.
Diffstat (limited to 'components/script/dom/cssstyledeclaration.rs')
-rw-r--r-- | components/script/dom/cssstyledeclaration.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/components/script/dom/cssstyledeclaration.rs b/components/script/dom/cssstyledeclaration.rs index f2865a5aced..58b6de0ed33 100644 --- a/components/script/dom/cssstyledeclaration.rs +++ b/components/script/dom/cssstyledeclaration.rs @@ -4,8 +4,8 @@ use dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyleDeclarationMethods; use dom::bindings::error::{ErrorResult, Fallible}; -use dom::bindings::utils::{Reflectable, Reflector}; use dom::bindings::js::JSRef; +use dom::bindings::utils::{Reflectable, Reflector}; use servo_util::str::DOMString; use string_cache::atom::Atom; use std::ascii::AsciiExt; @@ -44,6 +44,14 @@ fn get_declaration(_property: &Atom) -> Option<Declaration> { None } +impl CSSStyleDeclaration { + pub fn new_inherited() -> CSSStyleDeclaration { + CSSStyleDeclaration { + reflector_: Reflector::new() + } + } +} + impl<'a> CSSStyleDeclarationMethods for JSRef<'a, CSSStyleDeclaration> { fn CssText(self) -> DOMString { "".to_string() |