diff --git a/Libraries/LibWeb/Layout/Node.h b/Libraries/LibWeb/Layout/Node.h index 80b85f5f4a2..ba6bd9cd6e3 100644 --- a/Libraries/LibWeb/Layout/Node.h +++ b/Libraries/LibWeb/Layout/Node.h @@ -178,15 +178,11 @@ public: [[nodiscard]] bool has_css_transform() const { - if (!computed_values().transformations().is_empty()) - return true; - if (computed_values().rotate().has_value()) - return true; - if (computed_values().translate().has_value()) - return true; - if (computed_values().scale().has_value()) - return true; - return false; + auto const& computed_values = this->computed_values(); + return !computed_values.transformations().is_empty() + || computed_values.rotate().has_value() + || computed_values.translate().has_value() + || computed_values.scale().has_value(); } // https://drafts.csswg.org/css-ui/#propdef-user-select diff --git a/Libraries/LibWeb/Painting/PaintableBox.h b/Libraries/LibWeb/Painting/PaintableBox.h index 11366391c85..04770c9ddbe 100644 --- a/Libraries/LibWeb/Painting/PaintableBox.h +++ b/Libraries/LibWeb/Painting/PaintableBox.h @@ -115,15 +115,11 @@ public: [[nodiscard]] bool has_css_transform() const { - if (!computed_values().transformations().is_empty()) - return true; - if (computed_values().rotate().has_value()) - return true; - if (computed_values().translate().has_value()) - return true; - if (computed_values().scale().has_value()) - return true; - return false; + auto const& computed_values = this->computed_values(); + return !computed_values.transformations().is_empty() + || computed_values.rotate().has_value() + || computed_values.translate().has_value() + || computed_values.scale().has_value(); } [[nodiscard]] Optional scrollable_overflow_rect() const