1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

LibWeb: Fix height/width copy paste bug in SVGFormattingContext::run

This was found by SonarCloud:
- Identical sub-expressions on both sides of operator "&&".
This commit is contained in:
Brian Gianforcaro 2022-03-13 20:03:52 -07:00 committed by Andreas Kling
parent a5e149c012
commit af50895fa3

View file

@ -34,7 +34,7 @@ void SVGFormattingContext::run(Box const& box, LayoutMode)
SVG::SVGSVGElement* svg_element = dom_node.first_ancestor_of_type<SVG::SVGSVGElement>();
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<Layout::Node&>(*(svg_element->layout_node()));