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 23987 - Empty path and drawSystemFocusRing
Summary: Empty path and drawSystemFocusRing
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:46 UTC (History)
6 users (show)

See Also:


Attachments

Description Philippe Le Hegaret 2013-12-03 18:09:44 UTC
What is expected from drawSystemFocusRing if the path is empty, e.g.
[[
 var ctx = canvas.getContext("2D");
 ctx.beginPath();
 myInput.focus();
 ctx.drawSystemFocusRing(myInput);
]]
Comment 1 Jay Munro 2013-12-03 21:29:37 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:14:55 UTC
There is always a 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.

I am trying to understand the error condition you are getting at.
Comment 3 Philippe Le Hegaret 2013-12-04 16:24:47 UTC
My example has an empty path. Unless I'm misreading the specification, the default path doesn't enter into the equation here. beginPath() was invoked and nothing has been added into the path. You may be suggesting that, if the path is empty, then the previous intended path in the context is used.
Comment 4 Jay Munro 2013-12-04 19:49:37 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 5 Jay Munro 2014-01-07 17:39:33 UTC
If the path was empty, there isn't a path to act on at this point, though the intent is there with beginPath(). 

The issue appears to be whether to use the last path created before beginPath() was called? 

I would expect it to just do nothing, and treat it as a bug in code if an empty path was created.
Comment 6 Philippe Le Hegaret 2014-01-08 18:31:51 UTC
> I would expect it to just do nothing, and treat it as a bug in code if an
> empty path was created.

That would be my expectation as well and a clarification in the specification would be appropriate imho.
Comment 7 Jay Munro 2014-01-16 17:34:28 UTC
Updated the spec to include a new first step stating that if the current path had zero subpaths, then abort the steps.
Comment 8 Jatinder Mann [MSFT] 2014-01-20 23:46:32 UTC
Based on Canvas SubGroup discussion, http://www.w3.org/2014/01/20-html-a11y-minutes.html, we have agreed to close this bug as the processing model step 1 resolves this issue.