Upgrade Stylo to 2024-03-01 (#32089)

* Upgrade Stylo to 2024-03-01

* Fixup for https://bugzil.la/1882754

* Update test expectations
This commit is contained in:
Oriol Brufau 2024-04-16 14:27:51 +02:00 committed by GitHub
parent 0678136b17
commit f5bdfdfe94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 290 additions and 302 deletions

View file

@ -8,7 +8,7 @@ use dom_struct::dom_struct;
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
use js::rust::HandleObject;
use style::attr::{parse_unsigned_integer, AttrValue, LengthOrPercentageOrAuto};
use style::color::parsing::RgbaLegacy;
use style::color::AbsoluteColor;
use crate::dom::attr::Attr;
use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
@ -438,7 +438,7 @@ impl HTMLTableElementMethods for HTMLTableElement {
}
pub trait HTMLTableElementLayoutHelpers {
fn get_background_color(self) -> Option<RgbaLegacy>;
fn get_background_color(self) -> Option<AbsoluteColor>;
fn get_border(self) -> Option<u32>;
fn get_cellpadding(self) -> Option<u32>;
fn get_cellspacing(self) -> Option<u32>;
@ -446,7 +446,7 @@ pub trait HTMLTableElementLayoutHelpers {
}
impl HTMLTableElementLayoutHelpers for LayoutDom<'_, HTMLTableElement> {
fn get_background_color(self) -> Option<RgbaLegacy> {
fn get_background_color(self) -> Option<AbsoluteColor> {
self.upcast::<Element>()
.get_attr_for_layout(&ns!(), &local_name!("bgcolor"))
.and_then(AttrValue::as_color)