diff --git a/Libraries/LibWeb/DOM/Element.cpp b/Libraries/LibWeb/DOM/Element.cpp index 0f238ed60d4..3db8cdf39e8 100644 --- a/Libraries/LibWeb/DOM/Element.cpp +++ b/Libraries/LibWeb/DOM/Element.cpp @@ -539,8 +539,7 @@ CSS::RequiredInvalidationAfterStyleChange Element::recompute_style() auto old_display_is_none = m_computed_properties ? m_computed_properties->display().is_none() : true; auto new_display_is_none = new_computed_properties->display().is_none(); - if (!invalidation.is_none()) - set_computed_properties(move(new_computed_properties)); + set_computed_properties(move(new_computed_properties)); if (old_display_is_none != new_display_is_none) { play_or_cancel_animations_after_display_property_change(); diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-box/inheritance.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-box/inheritance.txt new file mode 100644 index 00000000000..a1a76604dba --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-box/inheritance.txt @@ -0,0 +1,30 @@ +Harness status: OK + +Found 24 tests + +22 Pass +2 Fail +Pass Property clear has initial value none +Pass Property clear does not inherit +Pass Property float has initial value none +Pass Property float does not inherit +Pass Property margin-bottom has initial value 0px +Pass Property margin-bottom does not inherit +Pass Property margin-left has initial value 0px +Pass Property margin-left does not inherit +Pass Property margin-right has initial value 0px +Pass Property margin-right does not inherit +Pass Property margin-top has initial value 0px +Pass Property margin-top does not inherit +Fail Property margin-trim has initial value none +Fail Property margin-trim does not inherit +Pass Property padding-bottom has initial value 0px +Pass Property padding-bottom does not inherit +Pass Property padding-left has initial value 0px +Pass Property padding-left does not inherit +Pass Property padding-right has initial value 0px +Pass Property padding-right does not inherit +Pass Property padding-top has initial value 0px +Pass Property padding-top does not inherit +Pass Property visibility has initial value visible +Pass Property visibility inherits \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-box/inheritance.html b/Tests/LibWeb/Text/input/wpt-import/css/css-box/inheritance.html new file mode 100644 index 00000000000..bfa0997845e --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-box/inheritance.html @@ -0,0 +1,35 @@ + + + + +Inheritance of CSS Box Model properties + + + + + + + + + +
+
+
+ + +