Oriol Brufau 2024-03-18 14:52:40 +01:00 committed by GitHub
parent 94c1f2c992
commit c07484fcb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 235 additions and 491 deletions

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use cssparser::RGBA;
use cssparser::RgbaLegacy;
use dom_struct::dom_struct;
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
use js::rust::HandleObject;
@ -106,7 +106,7 @@ impl HTMLTableCellElementMethods for HTMLTableCellElement {
}
pub trait HTMLTableCellElementLayoutHelpers<'dom> {
fn get_background_color(self) -> Option<RGBA>;
fn get_background_color(self) -> Option<RgbaLegacy>;
fn get_colspan(self) -> Option<u32>;
fn get_rowspan(self) -> Option<u32>;
fn get_table(self) -> Option<LayoutDom<'dom, HTMLTableElement>>;
@ -114,7 +114,7 @@ pub trait HTMLTableCellElementLayoutHelpers<'dom> {
}
impl<'dom> HTMLTableCellElementLayoutHelpers<'dom> for LayoutDom<'dom, HTMLTableCellElement> {
fn get_background_color(self) -> Option<RGBA> {
fn get_background_color(self) -> Option<RgbaLegacy> {
self.upcast::<Element>()
.get_attr_for_layout(&ns!(), &local_name!("bgcolor"))
.and_then(AttrValue::as_color)