diff --git a/Libraries/LibWeb/Geometry/DOMMatrix.cpp b/Libraries/LibWeb/Geometry/DOMMatrix.cpp index 8999d15f2fe..327098145a9 100644 --- a/Libraries/LibWeb/Geometry/DOMMatrix.cpp +++ b/Libraries/LibWeb/Geometry/DOMMatrix.cpp @@ -423,7 +423,7 @@ GC::Ref DOMMatrix::translate_self(Optional tx, Optional { tx.value_or(0), ty.value_or(0), tz.value_or(0) }); // 2. If tz is specified and not 0 or -0, set is 2D of the current matrix to false. - if (tz.has_value() && (tz != 0 || tz != -0)) + if (tz.has_value() && (tz != 0 && tz != -0)) m_is_2d = false; // 3. Return the current matrix. @@ -494,7 +494,7 @@ GC::Ref DOMMatrix::rotate_self(Optional rot_x, Optional DOMMatrix::rotate_axis_angle_self(Optional x, Optiona m_matrix = m_matrix * Gfx::rotation_matrix(Vector3 { x.value_or(0), y.value_or(0), z.value_or(0) }.normalized(), AK::to_radians(angle.value())); // 2. If x or y are not 0 or -0, set is 2D of the current matrix to false. - if (x != 0 || x != -0 || y != 0 || y != -0) + if ((x != 0 && x != -0) || (y != 0 && y != -0)) m_is_2d = false; // 3. Return the current matrix.