This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23986 - Current default path
Summary: Current default path
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: CR HTML Canvas 2D Context (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 minor
Target Milestone: ---
Assignee: Jay Munro
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords: a11y_canvas
Depends on:
Blocks:
 
Reported: 2013-12-03 18:09 UTC by Philippe Le Hegaret
Modified: 2014-01-20 23:45 UTC (History)
6 users (show)

See Also:


Attachments

Description Philippe Le Hegaret 2013-12-03 18:09:04 UTC
The spec says "the context always has a current default path." Since the definition of "intended path" relies on this, what's the current default path in:
[[
 var ctx = canvas.getContext("2D");
 myInput.focus();
 ctx.drawSystemFocusRing(myInput);
]]
Comment 1 Jay Munro 2013-12-03 21:30:08 UTC
Reassigning to Canvas 2D Context Level 2 since drawSystemFocusRing and drawCustomFocusRing are at risk for CR.
Comment 2 Rich Schwerdtfeger 2013-12-04 15:13:03 UTC
See this text in the Canvas 2D spec. :

http://www.w3.org/TR/2012/CR-2dcontext-20121217/#current-default-path

"The context always has a current default path. There is only one current default path, it is not part of the drawing state. The current default path is a path, as described above."

If this text is not adequate the rest of the specification has problems.
Comment 3 Jay Munro 2013-12-04 19:49:21 UTC
I jumped the gun on moving to L2, there are still ongoing discussions on the focus ring methods. Moving back to CR until discussions are complete.
Comment 4 Philippe Le Hegaret 2014-01-13 23:22:02 UTC
to clarify the case here, here is a more detailed code:

[[
 var myCanvas = document.createElement("canvas");
 var myInput = document.createElement("input");
 myCanvas.width = 200;
 myCanvas.height = 200;
 canvas.appendChild(myInput);
 document.body.appendChild(myCanvas);
 var ctx = canvas.getContext("2D");
 myInput.focus();
 ctx.drawSystemFocusRing(myInput);
]]
Comment 5 Jay Munro 2014-01-14 22:14:57 UTC
When the at-risk features were moved to Level 2, the intended path and current default path were updated. Intended path and current default path reflected the path object. Since path object was moved to Canvas 2D Context level 2, they were removed from CR. Current Path was left since any use of beginPath created the current path.
Comment 6 Philippe Le Hegaret 2014-01-15 18:10:37 UTC
(In reply to Jay Munro from comment #5)
> When the at-risk features were moved to Level 2, the intended path and
> current default path were updated. Intended path and current default path
> reflected the path object. Since path object was moved to Canvas 2D Context
> level 2, they were removed from CR. Current Path was left since any use of
> beginPath created the current path.

Understood, but note that in my example, I never used beginPath and I still call drawFocusIfNeeded (aka drawSystemFocusRing). This case is different of bug 23986 even the conclusion seems to be the same (ie it's a no-op).
Comment 7 Jay Munro 2014-01-16 17:39:20 UTC
Added step to drawFocusIfNeeded that states if current path has zero subpaths, then abort these steps.
Comment 8 Jatinder Mann [MSFT] 2014-01-20 23:45:29 UTC
Per Canvas SubGroup meeting, http://www.w3.org/2014/01/20-html-a11y-minutes.html, we have agreed to close this bug as the spec has been fixed.