@@ -789,7 +789,7 @@ void StyleComputer::for_each_property_expanding_shorthands(PropertyID property_i
789789void StyleComputer::set_property_expanding_shorthands (StyleProperties& style, CSS::PropertyID property_id, CSSStyleValue const & value, CSS::CSSStyleDeclaration const * declaration, StyleProperties const & style_for_revert, Important important)
790790{
791791 for_each_property_expanding_shorthands (property_id, value, AllowUnresolved::No, [&](PropertyID shorthand_id, CSSStyleValue const & shorthand_value) {
792- if (shorthand_value.is_revert ()) {
792+ if (shorthand_value.is_revert () || shorthand_value. is_revert_layer () ) {
793793 auto const & property_in_previous_cascade_origin = style_for_revert.m_data ->m_property_values [to_underlying (shorthand_id)];
794794 if (property_in_previous_cascade_origin) {
795795 style.set_property (shorthand_id, *property_in_previous_cascade_origin, StyleProperties::Inherited::No, important);
@@ -809,7 +809,7 @@ void StyleComputer::set_all_properties(DOM::Element& element, Optional<CSS::Sele
809809 for (auto i = to_underlying (CSS::first_longhand_property_id); i <= to_underlying (CSS::last_longhand_property_id); ++i) {
810810 auto property_id = (CSS::PropertyID)i;
811811
812- if (value.is_revert ()) {
812+ if (value.is_revert () || value. is_revert_layer () ) {
813813 style.revert_property (property_id, style_for_revert);
814814 continue ;
815815 }
@@ -901,8 +901,12 @@ static void cascade_custom_properties(DOM::Element& element, Optional<CSS::Selec
901901 custom_properties.ensure_capacity (needed_capacity);
902902
903903 for (auto const & matching_rule : matching_rules) {
904- for (auto const & it : matching_rule.rule ->declaration ().custom_properties ())
904+ for (auto const & it : matching_rule.rule ->declaration ().custom_properties ()) {
905+ auto style_value = it.value .value ;
906+ if (style_value->is_revert_layer ())
907+ continue ;
905908 custom_properties.set (it.key , it.value );
909+ }
906910 }
907911
908912 if (!pseudo_element.has_value ()) {
0 commit comments