diff --git a/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp b/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp index 3f42a2e5360..e062224c9a4 100644 --- a/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp +++ b/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp @@ -601,10 +601,10 @@ Optional ResolvedCSSStyleDeclaration::property(PropertyID propert }; } -Optional ResolvedCSSStyleDeclaration::custom_property(FlyString const&) const +Optional ResolvedCSSStyleDeclaration::custom_property(FlyString const& name) const { - dbgln("FIXME: ResolvedCSSStyleDeclaration::custom_property is not implemented"); - return {}; + const_cast(m_element->document()).update_style(); + return m_element->custom_properties(m_pseudo_element).get(name); } static WebIDL::ExceptionOr cannot_modify_computed_property_error(JS::Realm& realm) diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-display/display-contents-focusable-001.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-display/display-contents-focusable-001.txt index c3f82efb74b..7b87fcfc89b 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-display/display-contents-focusable-001.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-display/display-contents-focusable-001.txt @@ -6,6 +6,6 @@ Rerun Found 1 tests -1 Fail +1 Pass Details -Result Test Name MessageFail element with display:contents is focusable \ No newline at end of file +Result Test Name MessagePass element with display:contents is focusable \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-nesting/nested-declarations-matching.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-nesting/nested-declarations-matching.txt index 31f2d4ea680..ed40045128c 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-nesting/nested-declarations-matching.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-nesting/nested-declarations-matching.txt @@ -6,17 +6,16 @@ Rerun Found 11 tests -1 Pass -10 Fail +11 Pass Details -Result Test Name MessageFail Trailing declarations apply after any preceding rules -Fail Trailing declarations apply after any preceding rules (no leading) -Fail Trailing declarations apply after any preceding rules (multiple) -Fail Nested declarations rule has same specificity as outer selector -Fail Nested declarations rule has top-level specificity behavior -Fail Nested declarations rule has top-level specificity behavior (max matching) -Fail Bare declartaion in nested grouping rule can match pseudo-element -Fail Nested group rules have top-level specificity behavior -Fail Nested @scope rules behave like :where(:scope) -Fail Nested @scope rules behave like :where(:scope) (trailing) +Result Test Name MessagePass Trailing declarations apply after any preceding rules +Pass Trailing declarations apply after any preceding rules (no leading) +Pass Trailing declarations apply after any preceding rules (multiple) +Pass Nested declarations rule has same specificity as outer selector +Pass Nested declarations rule has top-level specificity behavior +Pass Nested declarations rule has top-level specificity behavior (max matching) +Pass Bare declartaion in nested grouping rule can match pseudo-element +Pass Nested group rules have top-level specificity behavior +Pass Nested @scope rules behave like :where(:scope) +Pass Nested @scope rules behave like :where(:scope) (trailing) Pass Nested declarations rule responds to parent selector text change \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/selectors/has-specificity.txt b/Tests/LibWeb/Text/expected/wpt-import/css/selectors/has-specificity.txt index bdca3b072ef..dfe4cfcd158 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/selectors/has-specificity.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/selectors/has-specificity.txt @@ -6,13 +6,13 @@ Rerun Found 8 tests -8 Fail +8 Pass Details -Result Test Name MessageFail :has(#foo) wins over :has(.foo) -Fail :has(span#foo) wins over :has(#foo) -Fail :has(.bar, #foo) has same specificity as :has(#foo, .bar) -Fail :has(.bar, #foo) wins over :has(.foo, .bar) -Fail :has(span + span) wins over :has(span) -Fail :has(span, li, p) wins over :has(span, lo, p) -Fail latter .baz wins over :has(.foo) -Fail latter :has(.foo) wins over .baz \ No newline at end of file +Result Test Name MessagePass :has(#foo) wins over :has(.foo) +Pass :has(span#foo) wins over :has(#foo) +Pass :has(.bar, #foo) has same specificity as :has(#foo, .bar) +Pass :has(.bar, #foo) wins over :has(.foo, .bar) +Pass :has(span + span) wins over :has(span) +Pass :has(span, li, p) wins over :has(span, lo, p) +Pass latter .baz wins over :has(.foo) +Pass latter :has(.foo) wins over .baz \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/selectors/hash-collision.txt b/Tests/LibWeb/Text/expected/wpt-import/css/selectors/hash-collision.txt index ae094f146d3..92e753045c3 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/selectors/hash-collision.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/selectors/hash-collision.txt @@ -6,6 +6,6 @@ Rerun Found 1 tests -1 Fail +1 Pass Details -Result Test Name MessageFail Test string hash collision in bucketing \ No newline at end of file +Result Test Name MessagePass Test string hash collision in bucketing \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/selectors/not-specificity.txt b/Tests/LibWeb/Text/expected/wpt-import/css/selectors/not-specificity.txt index b4fdd15d018..a73f2fa81cf 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/selectors/not-specificity.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/selectors/not-specificity.txt @@ -6,13 +6,13 @@ Rerun Found 8 tests -8 Fail +8 Pass Details -Result Test Name MessageFail :not(#foo) wins over :not(.foo) -Fail :not(div#foo) wins over :not(#foo) -Fail :not(.bar, #foo) has same specificity as :not(#foo, .bar) -Fail :not(.bar, #foo) wins over :not(.foo, .bar) -Fail :not(span + span) wins over :not(span) -Fail :not(span, li, p) wins over :not(span, lo, p) -Fail :not(span, :not(:not(.a#foo)), p) wins over :not(span, #foo, p) -Fail :not(span, #foo, p) wins over :not(span, :where(.a#foo), p) \ No newline at end of file +Result Test Name MessagePass :not(#foo) wins over :not(.foo) +Pass :not(div#foo) wins over :not(#foo) +Pass :not(.bar, #foo) has same specificity as :not(#foo, .bar) +Pass :not(.bar, #foo) wins over :not(.foo, .bar) +Pass :not(span + span) wins over :not(span) +Pass :not(span, li, p) wins over :not(span, lo, p) +Pass :not(span, :not(:not(.a#foo)), p) wins over :not(span, #foo, p) +Pass :not(span, #foo, p) wins over :not(span, :where(.a#foo), p) \ No newline at end of file