* 仕様書

[REFS[
- [17] [CITE@en-US-x-hixie[HTML Standard]] ([TIME[2014-04-03 03:44:44 +09:00]] 版) <http://www.whatwg.org/specs/web-apps/current-work/#the-canvas-element>
- [2] [CITE@en-US-x-hixie[HTML Standard]] ([TIME[2014-02-19 22:39:17 +09:00]] 版) <http://www.whatwg.org/specs/web-apps/current-work/#being-used-as-relevant-canvas-fallback-content>
- [27] [CITE@en-US-x-hixie[HTML Standard]] ([TIME[2014-04-03 03:44:44 +09:00]] 版) <http://www.whatwg.org/specs/web-apps/current-work/#supported-interactive-canvas-fallback-element>
]REFS]

* [CODE(HTMLe)@en[canvas]] 要素の内容

[18] [CODE(HTMLe)@en[[[canvas]]]] [[要素]]の[[内容]]は[[透過内容]]ですが、
[[子孫]]に制約があります。[[対話的内容]]は[[子孫]]にできませんが、
次の場合は認められています [SRC[>>17]]。
[FIG(list)[
- [19] [CODE(HTMLe)@en[[[a]]]] [[要素]]
- [20] [CODE(HTMLe)@en[[[img]]]] [[要素]]で [CODE(HTMLa)@en[[[usemap]]]] [[属性]]がある場合
- [21] [CODE(HTMLe)@en[[[button]]]] [[要素]]
- [22] [CODE(HTML)@en[[[<input type=checkbox>]]]], [CODE(HTML)@en[[[<input type=radio>]]]]
- [23] [CODE(HTMLe)@en[[[input]]]] [[要素]]で[[ボタン]]の場合
- [24] [CODE(HTMLe)@en[[[select]]]] [[要素]]で [CODE(HTMLa)@en[[[multiple]]]] [[属性]]があるか[[表示サイズ]]が
1 より大きい場合
- [25] [DEL[[[整列インターフェイス[CODE(HTMLe)@en[th]]要素]]]]
- [26] [CODE(HTMLa)@en[[[tabindex]]]] [[属性]]がなかったとしたら[[対話的内容]]でないもの
]FIG]

;; [29] [[透過内容]]ですから、 [CODE(HTMLe)@en[[[canvas]]]] [[要素]]が使われている場所に応じて、
[[対話的内容]]でない[[フロー内容]]または[[字句内容]]も使えます。

[28] [CODE(DOMm)@en[[[addHitRegion]]]] [[メソッド]]で指定できる[[要素]]は[DFN[[RUBYB[[[対応対話的canvasフォールバック要素]]]@en[supported interactive canvas fallback element]]]]とされており、
次の[[要素]]です [SRC[>>27]]。
[FIG[
- [30] [CODE(HTMLe)@en[[[a]]]] [[要素]]で[[ハイパーリンク]]を表し [CODE(HTMLe)@en[[[img]]]] [[要素]]を[[子孫]]に持たないもの
- [31] [CODE(HTMLe)@en[[[button]]]] [[要素]]
- [32] [CODE(HTML)@en[[[<input type=checkbox>]]]], [CODE(HTML)@en[[[<input type=radio>]]]]
- [33] [CODE(HTMLe)@en[[[input]]]] [[要素]]で[[ボタン]]の場合、ただし [CODE(HTML)@en[[[<input type=image>]]]]
を除く
- [34] [CODE(HTMLe)@en[[[select]]]] [[要素]]で [CODE(HTMLa)@en[[[multiple]]]] [[属性]]があるか[[表示サイズ]]が
1 より大きい場合
- [35] >>34 のような [CODE(HTMLe)@en[[[select]]]] [[要素]]の[[選択肢リスト]]にある [CODE(HTMLe)@en[[[option]]]]
[[要素]]
- [36] [[整列インターフェイス[CODE(HTMLe)@en[th]]要素]]
- [37] [CODE(HTMLa)@en[[[tabindex]]]] [[属性]]がなかったとしたら[[対話的内容]]でない[[対話的内容]]
- [38] [[対話的内容]]でない [CODE(HTMLe)@en[[[table]]]], [CODE(HTMLe)@en[[[caption]]]],
[CODE(HTMLe)@en[[[thead]]]], [CODE(HTMLe)@en[[[tbody]]]], [CODE(HTMLe)@en[[[tfoot]]]],
[CODE(HTMLe)@en[[[tr]]]], [CODE(HTMLe)@en[[[td]]]], [CODE(HTMLe)@en[[[th]]]] [[要素]]
]FIG]

;; [39] >>18 と >>28 は似ていますが、細部が違っています。 >>30 と >>33 は後者の方が制限が強くなっています。
>>20 は前者にのみあります。 >>35 と >>38 は後者にのみあります。

;; [40] >>36, >>37, >>38 は重複があるので、結局 >>38 の[[要素]]は無条件で認められることになります。

* [CODE(HTMLe)@en[canvas]] フォールバック内容

[1] ある[[要素]]が [CODE(HTMLe)@en[[[canvas]]]] [[要素]]を[[祖先]]として持ち、直近のそれが[[レンダリングされている]]ものであって、
[[埋め込み内容]]を[[表現][表現 (DOM)]]している時、
これを[DFN[[RUBYB[関係する [CODE(HTMLe)@en[canvas]] のフォールバック内容として使われている]@en[being used as relevant canvas fallback content]]]]といいます。
[SRC[>>2]]

[5] そのような[[要素]]は直接は[[レンダリングされている]]わけではありませんが、[[フォーカス]]の処理においてはほぼ[[レンダリングされている]][[要素]]と同じように扱われています。

* 歴史

[REFS[
- [3] [CITE@en[Web Applications 1.0 r8478     Revamp how focus is defined, to actually handle things we've ignored before, like viewports and scrollable regions]] ([TIME[2014-02-20 07:39:00 +09:00]] 版) <http://html5.org/tools/web-apps-tracker?from=8477&to=8478>
]REFS]

[4] >>1 の定義は >>3 で追加されました。

[6] [CITE@en[Web Applications 1.0 r8485     Fix the condition for the <option> in the previous checkin, and reword this into a list so it's clearer]]
( ([TIME[2014-02-21 07:39:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8484&to=8485>

[7] [CITE@en[Web Applications 1.0 r8544     More work on event rerouting for hit regions]]
( ([TIME[2014-03-15 08:05:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8543&to=8544>

[8] [CITE@en[Web Applications 1.0 r8545      Exclude <input type=image> buttons from canvas fallback, to avoid having to define pixel-level retargetting in hit regions]]
( ([TIME[2014-03-15 08:10:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8544&to=8545>

[9] [CITE@en[Web Applications 1.0 r8546     Also update the Touch object for hit regions]]
( ([TIME[2014-03-15 08:56:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8545&to=8546>

[10] [CITE@en[Web Applications 1.0 r8548  Allow <img>-based and <input>-based image maps as canvas fallback (hit regions excludes those separately)]]
( ([TIME[2014-03-18 05:08:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8547&to=8548>

[11] [CITE@en[Web Applications 1.0 r8564     Make addHitRegion() honour clip regions.]]
( ([TIME[2014-04-03 12:44:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8563&to=8564>

[12] [CITE@en[Web Applications 1.0 r8484     Allow <select multiple> and <select size=4> to be used as canvas fallback]]
( ([TIME[2014-02-21 07:34:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8483&to=8484>

[13] [CITE@en[Web Applications 1.0 r8491      Allow addHitRegion() to be used with elements that are only focusable because of tabindex='' or sortable='' (since they're basically just buttons at that point)]]
( ([TIME[2014-02-21 08:33:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8490&to=8491>

[14] [CITE@en[Web Applications 1.0 r8494     Allow addHitRegion() to refer to non-interactive table-related elements, so that we can expose grids in canvases (e.g. crosswords)]]
( ([TIME[2014-02-21 08:38:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8493&to=8494>

[15] [CITE@en[Web Applications 1.0 r8545      Exclude <input type=image> buttons from canvas fallback, to avoid having to define pixel-level retargetting in hit regions]]
( ([TIME[2014-03-15 08:10:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8544&to=8545>

[16] [CITE@en[Web Applications 1.0 r8548  Allow <img>-based and <input>-based image maps as canvas fallback (hit regions excludes those separately)]]
( ([TIME[2014-03-18 05:08:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8547&to=8548>

[41] [CITE@en[Web Applications 1.0 r8586     Remove the logic that prevents multiple regions from mapping to the same control, since there are use cases for that.]]
( ([TIME[2014-04-30 04:39:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=8585&to=8586>

[48] [CITE@en[Web Applications 1.0 r8747     Define an API to clear all the hit regions, for authors who don't need to use clearRect() since everything they paint is opaque.]]
( ([TIME[2014-09-05 07:46:00 +09:00]] 版))
<http://html5.org/r/8747>

[42] [CITE[IRC logs: freenode / #whatwg / 20140905]]
( ([TIME[2014-09-06 01:59:14 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20140905>

[43] [CITE@en[Fix #345: Remove table sorting model · whatwg/html@59b7e24]]
([TIME[2016-01-29 23:30:27 +09:00]] 版)
<https://github.com/whatwg/html/commit/59b7e2466c2b7c5c408a4963b05b13fd808aa07a>

[44] [CITE@ja[CanvasRenderingContext2D.addHitRegion() - Web API インターフェイス | MDN]]
( ([TIME[2015-02-25 03:24:33 +09:00]]))
<https://developer.mozilla.org/ja/docs/Web/API/CanvasRenderingContext2D/addHitRegion>

[45] [CITE@en[Hit Regions - WebGL · Issue #1030 · whatwg/html]]
( ([TIME[2016-05-13 15:33:44 +09:00]]))
<https://github.com/whatwg/html/issues/1030>

[46] [CITE@en[Remove canvas element's hit region feature (for now)]]
([[annevk]]著, [TIME[2016-10-21 18:01:07 +09:00]])
<https://github.com/whatwg/html/commit/9d493a37ed7e49c58522a3fed05d14bde1a8913c>

[47] [CITE@en[Remove CanvasProxy along with related concepts and complexities · whatwg/html@740634d]]
([TIME[2016-03-08 18:45:30 +09:00]] 版)
<https://github.com/whatwg/html/commit/740634d0f30a3b76e9da166ac2fa8835fcc073ab>

[49] [CITE@en[Remove requirement left behind by hit-region removal]]
([[sideshowbarker]]著, [TIME[2016-11-25 23:16:56 +09:00]])
<https://github.com/whatwg/html/commit/a26f9481d63b050d41ea9ea423128928ac8b47c9>