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

@ -6,7 +6,7 @@ use dom_struct::dom_struct;
use html5ever::{local_name, namespace_url, ns, LocalName, Prefix};
use js::rust::HandleObject;
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
use style::color::parsing::RgbaLegacy;
use style::color::AbsoluteColor;
use crate::dom::bindings::codegen::Bindings::HTMLHRElementBinding::HTMLHRElementMethods;
use crate::dom::bindings::inheritance::Castable;
@ -70,12 +70,12 @@ impl HTMLHRElementMethods for HTMLHRElement {
}
pub trait HTMLHRLayoutHelpers {
fn get_color(self) -> Option<RgbaLegacy>;
fn get_color(self) -> Option<AbsoluteColor>;
fn get_width(self) -> LengthOrPercentageOrAuto;
}
impl HTMLHRLayoutHelpers for LayoutDom<'_, HTMLHRElement> {
fn get_color(self) -> Option<RgbaLegacy> {
fn get_color(self) -> Option<AbsoluteColor> {
self.upcast::<Element>()
.get_attr_for_layout(&ns!(), &local_name!("color"))
.and_then(AttrValue::as_color)