diff options
Diffstat (limited to 'Libraries/LibWeb/SVG')
-rw-r--r-- | Libraries/LibWeb/SVG/SVGPathElement.cpp | 10 | ||||
-rw-r--r-- | Libraries/LibWeb/SVG/SVGPathElement.h | 1 | ||||
-rw-r--r-- | Libraries/LibWeb/SVG/SVGSVGElement.cpp | 2 | ||||
-rw-r--r-- | Libraries/LibWeb/SVG/TagNames.cpp | 5 | ||||
-rw-r--r-- | Libraries/LibWeb/SVG/TagNames.h | 8 |
5 files changed, 14 insertions, 12 deletions
diff --git a/Libraries/LibWeb/SVG/SVGPathElement.cpp b/Libraries/LibWeb/SVG/SVGPathElement.cpp index a1a5ab8385..0bcbc218a0 100644 --- a/Libraries/LibWeb/SVG/SVGPathElement.cpp +++ b/Libraries/LibWeb/SVG/SVGPathElement.cpp @@ -112,7 +112,8 @@ Vector<PathInstruction> PathDataParser::parse() return m_instructions; } -void PathDataParser::parse_drawto() { +void PathDataParser::parse_drawto() +{ if (match('M') || match('m')) { parse_moveto(); } else if (match('Z') || match('z')) { @@ -611,14 +612,13 @@ void SVGPathElement::paint(Gfx::Painter& painter, const SVGPaintingContext& cont auto dx_end_control = last_point.dx_relative_to(m_previous_control_point); auto dy_end_control = last_point.dy_relative_to(m_previous_control_point); - auto control_point = Gfx::FloatPoint {last_point.x() + dx_end_control, last_point.y() + dy_end_control}; + auto control_point = Gfx::FloatPoint { last_point.x() + dx_end_control, last_point.y() + dy_end_control }; - Gfx::FloatPoint end_point = {data[0], data[1]}; + Gfx::FloatPoint end_point = { data[0], data[1] }; if (absolute) { path.quadratic_bezier_curve_to(control_point, end_point); - } - else { + } else { path.quadratic_bezier_curve_to(control_point, end_point + last_point); } diff --git a/Libraries/LibWeb/SVG/SVGPathElement.h b/Libraries/LibWeb/SVG/SVGPathElement.h index c793cccc58..4091c8e53f 100644 --- a/Libraries/LibWeb/SVG/SVGPathElement.h +++ b/Libraries/LibWeb/SVG/SVGPathElement.h @@ -113,7 +113,6 @@ public: private: Vector<PathInstruction> m_instructions; Gfx::FloatPoint m_previous_control_point = {}; - }; } diff --git a/Libraries/LibWeb/SVG/SVGSVGElement.cpp b/Libraries/LibWeb/SVG/SVGSVGElement.cpp index 36898d4bc3..a7391b889e 100644 --- a/Libraries/LibWeb/SVG/SVGSVGElement.cpp +++ b/Libraries/LibWeb/SVG/SVGSVGElement.cpp @@ -28,9 +28,9 @@ #include <LibWeb/CSS/StyleResolver.h> #include <LibWeb/DOM/Document.h> #include <LibWeb/DOM/Event.h> +#include <LibWeb/Layout/LayoutSVG.h> #include <LibWeb/SVG/SVGPathElement.h> #include <LibWeb/SVG/SVGSVGElement.h> -#include <LibWeb/Layout/LayoutSVG.h> #include <ctype.h> namespace Web::SVG { diff --git a/Libraries/LibWeb/SVG/TagNames.cpp b/Libraries/LibWeb/SVG/TagNames.cpp index 56935e35ea..00577803ee 100644 --- a/Libraries/LibWeb/SVG/TagNames.cpp +++ b/Libraries/LibWeb/SVG/TagNames.cpp @@ -29,10 +29,13 @@ namespace Web::SVG::TagNames { #define __ENUMERATE_SVG_TAG(name) FlyString name; - ENUMERATE_SVG_TAGS +ENUMERATE_SVG_TAGS #undef __ENUMERATE_SVG_TAG + // clang-format off +// FIXME: clang-format gets confused here. Why? [[gnu::constructor]] static void initialize() +// clang-format off { static bool s_initialized = false; if (s_initialized) diff --git a/Libraries/LibWeb/SVG/TagNames.h b/Libraries/LibWeb/SVG/TagNames.h index 9ec972ccba..682d678a4e 100644 --- a/Libraries/LibWeb/SVG/TagNames.h +++ b/Libraries/LibWeb/SVG/TagNames.h @@ -30,11 +30,11 @@ namespace Web::SVG::TagNames { -#define ENUMERATE_SVG_GRAPHICS_TAGS \ - __ENUMERATE_SVG_TAG(svg) \ - __ENUMERATE_SVG_TAG(path) \ +#define ENUMERATE_SVG_GRAPHICS_TAGS \ + __ENUMERATE_SVG_TAG(svg) \ + __ENUMERATE_SVG_TAG(path) -#define ENUMERATE_SVG_TAGS \ +#define ENUMERATE_SVG_TAGS \ ENUMERATE_SVG_GRAPHICS_TAGS #define __ENUMERATE_SVG_TAG(name) extern FlyString name; |