diff -r 6e61225ad89b modules/javafx.web/src/main/java/com/sun/javafx/webkit/prism/WCPathImpl.java
--- a/modules/javafx.web/src/main/java/com/sun/javafx/webkit/prism/WCPathImpl.java	Thu Dec 07 06:45:50 2017 +0000
+++ b/modules/javafx.web/src/main/java/com/sun/javafx/webkit/prism/WCPathImpl.java	Tue Dec 12 15:18:08 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -108,161 +108,34 @@
                        double endAngle, boolean aclockwise)
     {
         if (log.isLoggable(Level.FINE)) {
-            log.log(Level.FINE, "WCPathImpl({0}).addArc({1},{2},{3},{4},{5},{6})",
+            log.log(Level.FINE, "WCPathImpl({0}).addArc({1},{2},{3},|{4}|,|{5}|,aclock={6})",
                     new Object[] {getID(), x, y, r, startAngle, endAngle, aclockwise});
         }
+
         hasCP = true;
 
+        final double eps = 1e-5;
+        final double TWO_PI = 2 * Math.PI;
+        if (endAngle < eps) {
+            // Convert to +ve angle(clockwise)
+            endAngle = (endAngle % TWO_PI) + TWO_PI;
+        } else if (endAngle > TWO_PI) {
+            endAngle = endAngle % TWO_PI;
+        }
 
-        double eps = 0.001;
+        double d = startAngle > endAngle ? (TWO_PI - startAngle + endAngle) : endAngle - startAngle;
+        final boolean isMultipleOf2PIor0 = Math.abs(Math.IEEEremainder(d, TWO_PI)) < eps;
+        if (aclockwise) {
+            d = isMultipleOf2PIor0 ? TWO_PI : TWO_PI - d;
+        } else {
+            // Negate the direction, FX draws anti-clockwise by default.
+            d = -(isMultipleOf2PIor0 ? TWO_PI : d);
+        }
 
-        if (!aclockwise) {
-            if (endAngle < 0.0) {
-                if (endAngle < -2.0*Math.PI - eps) {
-                    int eMult = (int) (-endAngle / (2*Math.PI)) ;
-                    endAngle += eMult*2.0*Math.PI;
-                }
-
-                endAngle += 2.0*Math.PI;
-            } else {
-                if (endAngle > 2.0*Math.PI + eps) {
-                    int eMult = (int) (endAngle / (2*Math.PI));
-                    endAngle -= eMult*2.0*Math.PI;
-                }
-            }
-
-            if (startAngle < 0.0) {
-                if (startAngle < -2.0*Math.PI - eps) {
-                    int sMult = (int) (-startAngle / (2*Math.PI));
-                    startAngle += sMult*2.0*Math.PI;
-                }
-
-                startAngle += 2.0*Math.PI;
-            } else {
-                if (startAngle > 2.0*Math.PI + eps) {
-                    int sMult = (int) (startAngle / (2*Math.PI));
-                    startAngle -= sMult*2.0*Math.PI;
-                }
-            }
-
-            double d = startAngle - endAngle;
-
-            if (startAngle < endAngle) {
-                d = Math.abs(d);
-            }
-
-            endAngle = (float) (2.0 * Math.PI - endAngle);
-
-            Shape arc = new Arc2D((float)(x - r), (float)(y - r),
-                                  (float)(2*r), (float)(2*r),
-                (float) ((endAngle * 180.0) / Math.PI),
-                (float) ((d * 180.0) / Math.PI),Arc2D.OPEN);
-
-            PathIterator pi = arc.getPathIterator(null);
-            List<Integer> segStack = new ArrayList<Integer>();
-            List<Float> valStack = new ArrayList<Float>();
-            float [] coords = new float[6];
-            while(!pi.isDone()) {
-                switch(pi.currentSegment(coords)) {
-                    case PathIterator.SEG_MOVETO:
-                        valStack.add(coords[1]);
-                        valStack.add(coords[0]);
-                        break;
-                    case PathIterator.SEG_QUADTO:
-                        throw new RuntimeException("Unexpected segment: " +
-                                                   "SEG_QUADTO");
-                    case PathIterator.SEG_CUBICTO:
-                        valStack.add(coords[1]);
-                        valStack.add(coords[0]);
-                        valStack.add(coords[3]);
-                        valStack.add(coords[2]);
-                        valStack.add(coords[5]);
-                        valStack.add(coords[4]);
-                        segStack.add(PathIterator.SEG_CUBICTO);
-                        break;
-                    case PathIterator.SEG_CLOSE:
-                        throw new RuntimeException("Unexpected segment: " +
-                                                   "SEG_CLOSE");
-                }
-
-                pi.next();
-            }
-
-            segStack.add(PathIterator.SEG_MOVETO);
-
-            Path2D invArc = new Path2D();
-            int segIndex = segStack.size();
-            int valIndex = valStack.size();
-            while (segIndex > 0) {
-                switch(segStack.get(--segIndex)) {
-                    case PathIterator.SEG_MOVETO:
-                        invArc.moveTo(valStack.get(--valIndex), valStack.get(--valIndex));
-                        break;
-                    case PathIterator.SEG_LINETO:
-                        invArc.lineTo(valStack.get(--valIndex), valStack.get(--valIndex));
-                        break;
-                    case PathIterator.SEG_QUADTO:
-                        invArc.quadTo(valStack.get(--valIndex), valStack.get(--valIndex),
-                                      valStack.get(--valIndex), valStack.get(--valIndex));
-                        break;
-                    case PathIterator.SEG_CUBICTO:
-                        invArc.curveTo(valStack.get(--valIndex), valStack.get(--valIndex),
-                                       valStack.get(--valIndex), valStack.get(--valIndex),
-                                       valStack.get(--valIndex), valStack.get(--valIndex));
-                        break;
-                }
-            }
-            path.append(invArc, true);
-        } else {
-
-            if (endAngle < 0.0) {
-                if (endAngle < -2.0*Math.PI - eps) {
-                    int eMult = (int) (-endAngle / (2*Math.PI));
-                    endAngle += eMult*2.0*Math.PI;
-                }
-
-                endAngle += 2.0*Math.PI;
-            } else {
-                if (endAngle > 2.0*Math.PI + eps) {
-                    int eMult = (int) (endAngle / (2*Math.PI));
-                    endAngle -= eMult*2.0*Math.PI;
-                }
-            }
-
-            if (startAngle < 0.0) {
-                if (startAngle < -2.0*Math.PI - eps) {
-                    int sMult = (int) (-startAngle / (2*Math.PI));
-                    startAngle += sMult*2.0*Math.PI;
-                }
-
-                startAngle += 2.0*Math.PI;
-            } else {
-                if (startAngle > 2.0*Math.PI + eps) {
-                    int sMult = (int) (startAngle / (2*Math.PI));
-                    startAngle -= sMult*2.0*Math.PI;
-                }
-            }
-
-            double d = startAngle - endAngle;
-
-            if (startAngle < endAngle) {
-                d += 2*Math.PI;
-                if (d < eps) {
-                    d += 2*Math.PI;
-                }
-            }
-
-            if (Math.abs(startAngle) > eps) {
-                startAngle = (float) (2.0 * Math.PI - startAngle);
-            }
-
-
-            path.append(new Arc2D((float)(x - r), (float)(y - r),
-                                  (float)(2*r), (float)(2*r),
-                                  (float)((startAngle*180.0f)/Math.PI),
-                                  (float)((d*180.0f)/Math.PI),
-                                  Arc2D.OPEN), true);
-        }
+        path.append(new Arc2D((float)(x - r), (float)(y - r),
+                              (float)(2*r), (float)(2*r),
+                              (float) ((-startAngle * 180.0) / Math.PI),
+                              (float) ((d * 180.0) / Math.PI), Arc2D.OPEN), true);
     }
 
     public boolean contains(int rule, double x, double y) {
