JDK-8165173 : canvas/philip/tests/2d.path.clip.empty.html fails with 8u112
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8u112,9,10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-08-31
  • Updated: 2020-01-31
  • Resolved: 2016-09-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u131Fixed 9Fixed
Related Reports
Relates :  
Description
DRT test canvas/philip/tests/2d.path.clip.empty.html fails with 8u112.
This test was present in old DRT workspace before 8u112 Webkit merge.

Test passes with 8u102, but fails with 8u112 and 9. 
Comments
UR SQE OK to defer the corner case from PSU16_04
12-09-2016

Changeset: a745515f0562 Author: asrivastava Date: 2016-09-09 14:13 +0530 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/a745515f0562
09-09-2016

+1, On OS X , I didn't see any other failure (Running DRT with your fix). Ref :https://bugs.webkit.org/show_bug.cgi?id=43161 "The clip() method must create a new clipping region by calculating the intersection of the current clipping region and the area described by the current path, using the non-zero winding number rule." [http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-clip]
09-09-2016

+1
08-09-2016

+1
08-09-2016

Tested on Ubuntu 16. Looks fine, no breaking of other tests.
08-09-2016

Two test case is passing with your changes (On OS X) canvas/philip/tests/2d.path.clip.empty.html -> succeeded (earlier used to fail) imported/w3c/canvas/2d.path.clip.empty.html -> succeeded (earlier used to fail) , one of the test case from JDK-8165034
07-09-2016

Looks good to me, Please run DRT on Ubuntu 16.04 and update the observation with this patch and let's see if this is not breaking any other tests.
07-09-2016

Webrev : http://cr.openjdk.java.net/~asrivastava/8165173/webrev.00/ Tested on Win64 and Linux 64 The null path check was redundant, applied making an assumption that null path can���t be a use case. But it seems we have a use case in the form of drt test case ���2d.path.clip.empty.html���.
07-09-2016

In this test case :2d.path.clip.empty.html cliip path has not been provided " ctx.beginPath(); ctx.clip(); " =========== So the function : static void setClipPath( GraphicsContext &gc, GraphicsContextState& state, const Path& path, WindRule wrule, bool isOut) { if (gc.paintingDisabled() || path.isEmpty()) return; ============== returns causing test to fail. Checked with another test case 2d.path.clip.basic.2.html: ctx.beginPath(); ctx.rect(-100, 0, 100, 50); ctx.clip(); It is getting passed as clip Path is set. Just for debugging modified the code : //if (gc.paintingDisabled() || path.isEmpty()) if (gc.paintingDisabled()) return; And the test is getting passes. Also checked with test case mentioned in bug 8160260 "svg-background-image.html" SVG image is getting rendered correctly. Will try to analyse whether the above null path check is actually needed or not.
06-09-2016

Relates with: https://bugs.openjdk.java.net/browse/JDK-8160260
06-09-2016

Test is passing in 102 and getting failed in 9.
01-09-2016