Merge RawLayoutElementHelpers into LayoutElementHelpers

This commit is contained in:
Anthony Ramine 2020-03-31 18:30:42 +02:00
parent 3b504148d5
commit 0bda174823
17 changed files with 86 additions and 97 deletions

View file

@ -9,7 +9,7 @@ use crate::dom::bindings::inheritance::Castable;
use crate::dom::bindings::root::{DomRoot, LayoutDom};
use crate::dom::bindings::str::DOMString;
use crate::dom::document::Document;
use crate::dom::element::{Element, RawLayoutElementHelpers};
use crate::dom::element::{Element, LayoutElementHelpers};
use crate::dom::htmlcollection::{CollectionFilter, HTMLCollection};
use crate::dom::htmlelement::HTMLElement;
use crate::dom::htmltablerowelement::HTMLTableRowElement;
@ -91,7 +91,7 @@ pub trait HTMLTableSectionElementLayoutHelpers {
impl HTMLTableSectionElementLayoutHelpers for LayoutDom<'_, HTMLTableSectionElement> {
fn get_background_color(self) -> Option<RGBA> {
unsafe {
(&*self.upcast::<Element>().unsafe_get())
self.upcast::<Element>()
.get_attr_for_layout(&ns!(), &local_name!("bgcolor"))
.and_then(AttrValue::as_color)
.cloned()