Questions RE: Hit Regions before return to Last Call

As we prepare to move Canvas back to LC (we have committed to get the HTML WG
chairs a stable document *this* week), I reviewed the Hit Regions section of
Canvas L1 ED [1] and had the following questions:

# if control is null

Should we have a step in "The region representing the control" [2] processing
algorithm that matches Step 1 in "The region representing the ID" [3] that reads
something like:

"If control is null, return nothing and abort these steps."

Now that control and ID are both optional, I think we should handle the case
that they are not specified.

# clearHitRegions() not defined

While we reference clearHitRegions() in a Note following "The region for a
pixel" algorithm [4], we don't define a processing algorithm for this method.
Suggest adding one below the removeHitRegion() definition [5].

# Move Note RE: clearRect() and clearHitRegions()

The note referenced above [4] would make more sense following the definition of
removeHitRegion() and clearHitRegions() where we actually discuss methods for
removing and/or clearing Hit Regions.

# Steps 5 & 8 from addHitRegion() [6] are unclear and seem to suggest the
opposite of their intention.

Steps 5 & 8, as they are worded, seem to suggest to me that if the ID or control
referenced in the arguments object are not null, and they reference the ID or
control of a previous region, then the *previous* region should remain
associated with this region.  This is in direct conflict with steps 9 & 10 and
the behavior we discussed on call, that adding a Hit Region that shares a
control or ID with a previously referenced region would remove/clear the
previous region.

I also feel like steps 5 & 8 should both come before or after step 7, not before
and after it.  There may be a reason for this order that I'm not aware of, though.

I look forward to your feedback,

Mark

[1] http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#hit-regions
[2]
http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#the-region-representing-the-control
[3]
http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#the-region-identified-by-the-id
[4]
http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#the-region-for-a-pixel
[5]
http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#dom-context-2d-removehitregion
[6]
http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#dom-context-2d-addhitregion
-- 
Mark Sadecki
Web Accessibility Engineer
World Wide Web Consortium, Web Accessibility Initiative
Telephone: +1.617.715.4017
Email: mark@w3.org
Web: http://w3.org/People/mark

Received on Tuesday, 8 April 2014 21:55:54 UTC