Index: ui/gfx/paint_vector_icon.cc |
diff --git a/ui/gfx/paint_vector_icon.cc b/ui/gfx/paint_vector_icon.cc |
index 7d1601dc4c0c363e3d483382a22553a3292635b0..2f5c762a9c9ebe3a70b89ed13a97643f6037552d 100644 |
--- a/ui/gfx/paint_vector_icon.cc |
+++ b/ui/gfx/paint_vector_icon.cc |
@@ -148,6 +148,13 @@ void PaintPath(Canvas* canvas, |
} |
case R_MOVE_TO: { |
+ if (previous_command_type == CLOSE) { |
+ // This triggers injectMoveToIfNeeded() so that the next subpath will |
+ // start at the correct place. See |
+ // [ https://www.w3.org/TR/SVG/paths.html#PathDataClosePathCommand ]. |
+ path.rLineTo(0, 0); |
+ } |
+ |
SkScalar x = path_elements[++i].arg; |
SkScalar y = path_elements[++i].arg; |
path.rMoveTo(x, y); |