summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-05-10 01:47:43 +0430
committerAndreas Kling <kling@serenityos.org>2020-05-09 23:25:39 +0200
commitce360714471673a69b0b3f8977c428001a599103 (patch)
tree499d31e78293acf50829f6a632c6dc44d736c521 /Libraries
parent6f15f23a40c5af7cc8b2225f0f794817d643f8b0 (diff)
downloadserenity-ce360714471673a69b0b3f8977c428001a599103.zip
LibWeb: Implicitly close all subpaths when canvas.fill() is called
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibWeb/DOM/CanvasRenderingContext2D.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Libraries/LibWeb/DOM/CanvasRenderingContext2D.cpp b/Libraries/LibWeb/DOM/CanvasRenderingContext2D.cpp
index e0a9c112c8..7f32f98a8c 100644
--- a/Libraries/LibWeb/DOM/CanvasRenderingContext2D.cpp
+++ b/Libraries/LibWeb/DOM/CanvasRenderingContext2D.cpp
@@ -185,7 +185,9 @@ void CanvasRenderingContext2D::fill(Gfx::Painter::WindingRule winding)
if (!painter)
return;
- painter->fill_path(m_path, m_fill_style, winding);
+ auto path = m_path;
+ path.close_all_subpaths();
+ painter->fill_path(path, m_fill_style, winding);
}
RefPtr<ImageData> CanvasRenderingContext2D::create_image_data(JS::GlobalObject& global_object, int width, int height) const