Implement style_attribute() on LayoutJS<Element>.

This commit is contained in:
Ms2ger 2015-07-04 21:41:34 +02:00
parent 8a6681ba70
commit 23c679d55a
2 changed files with 11 additions and 5 deletions

View file

@ -383,11 +383,9 @@ pub struct LayoutElement<'le> {
impl<'le> LayoutElement<'le> {
pub fn style_attribute(&self) -> &'le Option<PropertyDeclarationBlock> {
use script::dom::element::ElementHelpers;
let style: &Option<PropertyDeclarationBlock> = unsafe {
&*(*self.element.unsafe_get()).style_attribute().borrow_for_layout()
};
style
unsafe {
&*self.element.style_attribute()
}
}
}