From af50895fa316129b0bf37a4b8f9810b6bc365804 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 13 Mar 2022 20:03:52 -0700 Subject: [PATCH] LibWeb: Fix height/width copy paste bug in SVGFormattingContext::run This was found by SonarCloud: - Identical sub-expressions on both sides of operator "&&". --- Userland/Libraries/LibWeb/Layout/SVGFormattingContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Layout/SVGFormattingContext.cpp b/Userland/Libraries/LibWeb/Layout/SVGFormattingContext.cpp index 00ce1fca2e..baa673bc98 100644 --- a/Userland/Libraries/LibWeb/Layout/SVGFormattingContext.cpp +++ b/Userland/Libraries/LibWeb/Layout/SVGFormattingContext.cpp @@ -34,7 +34,7 @@ void SVGFormattingContext::run(Box const& box, LayoutMode) SVG::SVGSVGElement* svg_element = dom_node.first_ancestor_of_type(); - if (svg_element->has_attribute(HTML::AttributeNames::width) && svg_element->has_attribute(HTML::AttributeNames::width)) { + if (svg_element->has_attribute(HTML::AttributeNames::width) && svg_element->has_attribute(HTML::AttributeNames::height)) { geometry_box_state.offset = { 0, 0 }; auto& layout_node = static_cast(*(svg_element->layout_node()));