Truly independent web browser
LibWeb: Compare held bits when finding a record holding the same style
Andreas Kling2929f1ddee2a
diff --git a/Libraries/LibWeb/Rust/src/css/style/pipeline/records.rs b/Libraries/LibWeb/Rust/src/css/style/pipeline/records.rsindex b365946bdc9..0719df1ece3 100644--- a/Libraries/LibWeb/Rust/src/css/style/pipeline/records.rs+++ b/Libraries/LibWeb/Rust/src/css/style/pipeline/records.rs@@ -784,9 +784,10 @@ impl Record {/// Whether `other` holds the computed values this record does.fn holds_the_same_values_as(&self, other: &Record) -> bool {let (mine, theirs) = (self.value_groups(), other.value_groups());- // NB: The groups a derived record answers from are its source's, whose bits can differ from its own: a table's box- // holds none of the outer properties the table computes.- mine.reset_bits() == theirs.reset_bits()+ // NB: The longhands a derived record answers with are its source's, whose bits can differ from its own: a+ // table's box holds none of the outer properties the table computes, and an anonymous box's source can+ // hold another writing mode.+ mine.style_bits() == theirs.style_bits()&& mine.iter().zip(theirs.iter())diff --git a/Tests/LibWeb/Text/expected/css/style-engine/writing-mode-of-element-styled-like-anonymous-box.txt b/Tests/LibWeb/Text/expected/css/style-engine/writing-mode-of-element-styled-like-anonymous-box.txtindex 109255e19fe..b478de7ac92 100644--- a/Tests/LibWeb/Text/expected/css/style-engine/writing-mode-of-element-styled-like-anonymous-box.txt+++ b/Tests/LibWeb/Text/expected/css/style-engine/writing-mode-of-element-styled-like-anonymous-box.txt@@ -1,3 +1,3 @@-html: horizontal-tb+html: vertical-rlhead: vertical-rlspan: vertical-rl