Skip to content

Commit 40ca2d8

Browse files
committed
Initial version of MouseEvent algorithms
1 parent 09a2031 commit 40ca2d8

File tree

7 files changed

+936
-15
lines changed

7 files changed

+936
-15
lines changed

build.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ def process_main_spec():
266266
'event-types-keyboardevent',
267267
'event-types-compositionevent',
268268
'keyboard',
269+
'external-algorithms',
269270
'legacy-event-initializers',
270271
'legacy-key-attributes',
271272
'legacy-event-types',

event-algo.bs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2118,6 +2118,9 @@ Issue: The contents of this section should eventually be moved into the [[CSSOM]
21182118
1. Set |event|.{{offsetY}} according to
21192119
<a href="https://www.w3.org/TR/cssom-view-1/#dom-mouseevent-offsety">offsetY</a>
21202120

2121+
Note: Not needed since all these new attributes are defined in terms of how they
2122+
can be calculated from the base MouseEvent attributes.
2123+
21212124
</div><!-- algorithm -->
21222125

21232126
</section>

index.bs

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,35 @@ url: https://www.w3.org/TR/pointerevents3/#pointerevent-interface; type: interfa
3636
text: PointerEvent
3737
url: https://dom.spec.whatwg.org/#concept-tree-ancestor; type: dfn;
3838
text: ancestor
39+
url: https://dom.spec.whatwg.org/#concept-event-initialize; type: dfn;
40+
text: initialize an event
41+
url: https://dom.spec.whatwg.org/#concept-event-create; type: dfn;
42+
text: create a new event
43+
text: creating a new event
44+
urlPrefix: https://html.spec.whatwg.org/#; type: dfn; spec: html;
45+
text: click focusable
46+
text: focusable area
47+
<!-- CSS -->
3948
url: https://www.w3.org/TR/CSS21/visuren.html#x43; type: dfn;
4049
text: stacking context
4150
url: https://drafts.csswg.org/css-position-3/#positioned-box; type: dfn;
4251
text: positioned
4352
url: https://drafts.csswg.org/css-position-4/#paint-a-stacking-context; type: dfn;
4453
text: painting a stacking context
54+
url: https://drafts.csswg.org/cssom-view/#dom-document-elementfrompoint; type: dfn; spec: cssom-view
55+
text: elementFromPoint
56+
url: https://drafts.csswg.org/cssom-view/#dom-document-elementsfrompoint; type: dfn; spec: cssom-view
57+
text: elementsFromPoint
4558
</pre>
4659

4760
<pre class="link-defaults">
61+
spec:css2; type:dfn; text:viewport
4862
spec:dom; type:interface; text:Document
63+
spec:dom; type:attribute; for:Event; text:bubbles
64+
spec:dom; type:attribute; for:Event; text:cancelable
65+
spec:dom; type:attribute; for:Event; text:composed
66+
spec:dom; type:attribute; for:Event; text:target
67+
spec:dom; type:attribute; for:Event; text:type
4968
spec:dom; type:dfn; for:Event; text:target
5069
spec:infra; type:dfn; text:code point
5170
</pre>
@@ -76,25 +95,27 @@ spec:infra; type:dfn; text:code point
7695
path: stylesheet-extra.include
7796
</pre>
7897

98+
<!-- Introduction ========================================================== -->
7999
<pre class="include">
80100
path: sections/introduction.include
81101
</pre>
82102

103+
<!-- Stylistic Conventions ================================================= -->
83104
<pre class="include">
84105
path: sections/conventions.include
85106
</pre>
86107

87-
<!-- Section 3: Architecture =============================================== -->
108+
<!-- DOM Event Architecture ================================================ -->
88109
<pre class="include">
89110
path: sections/architecture.include
90111
</pre>
91112

92-
<!-- Section 4: Basic Event Interfaces ===================================== -->
113+
<!-- Basic Event Interfaces ================================================ -->
93114
<pre class="include">
94115
path: sections/event-interfaces.include
95116
</pre>
96117

97-
<!-- Section 5: The Events ================================================= -->
118+
<!-- Event Types =========================================================== -->
98119
<section>
99120
<pre class="include">
100121
path: sections/event-types.include
@@ -122,47 +143,52 @@ path: sections/event-types-compositionevent.include
122143
</pre>
123144
</section>
124145

125-
<!-- Section 6: Keyboard and key values ==================================== -->
146+
<!-- Keyboard and key values =============================================== -->
126147
<pre class="include">
127148
path: sections/keyboard.include
128149
</pre>
129150

130-
<!-- Appendix A: Legacy Event Initializers ================================= -->
151+
<!-- External Algorithms =================================================== -->
152+
<pre class="include">
153+
path: sections/external-algorithms.include
154+
</pre>
155+
156+
<!-- Legacy Event Initializers ============================================= -->
131157
<pre class="include">
132158
path: sections/legacy-event-initializers.include
133159
</pre>
134160

135-
<!-- Appendix B: Legacy Key Attributes ===================================== -->
161+
<!-- Legacy Key & Mouse Event Attributes =================================== -->
136162
<pre class="include">
137163
path: sections/legacy-key-attributes.include
138164
</pre>
139165

140-
<!-- Appendix C: Legacy Event Types ======================================== -->
166+
<!-- Legacy Event Types ==================================================== -->
141167
<pre class="include">
142168
path: sections/legacy-event-types.include
143169
</pre>
144170

145-
<!-- Appendix D: Extending Events ========================================== -->
171+
<!-- Extending Events ====================================================== -->
146172
<pre class="include">
147173
path: sections/extending-events.include
148174
</pre>
149175

150-
<!-- Appendix E: Security Considerations =================================== -->
176+
<!-- Security Considerations =============================================== -->
151177
<pre class="include">
152178
path: sections/security.include
153179
</pre>
154180

155-
<!-- Appendix F: Changes =================================================== -->
181+
<!-- Changes =============================================================== -->
156182
<pre class="include">
157183
path: sections/changes.include
158184
</pre>
159185

160-
<!-- Appendix G: Acknowledgements ========================================== -->
186+
<!-- Acknowledgements ====================================================== -->
161187
<pre class="include">
162188
path: sections/acknowledgements.include
163189
</pre>
164190

165-
<!-- Appendix H: Glossary ================================================= -->
191+
<!-- Glossary ============================================================== -->
166192
<pre class="include">
167193
path: sections/glossary.include
168194
</pre>

sections/event-types-keyboardevent.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,18 @@
384384
{{KeyboardEvent/location}} attribute MUST always be set to
385385
{{KeyboardEvent/DOM_KEY_LOCATION_STANDARD}}.
386386

387+
<h4 id="keyboardevent-algorithms">KeyboardEvent Algorithms</h4>
388+
389+
<h5 id="keyboardevent-global-state">Global State for KeyboardEvent</h5>
390+
391+
<h6 id="keyboardevent-global-ua">User Agent-Level State</h6>
392+
393+
The UA must maintain the following values that are shared for the entire
394+
User Agent.
395+
396+
A <dfn>key modifier state</dfn> (initially empty) that keeps track of the current
397+
state of each <a>modifier key</a> available on the system.
398+
387399
<h4 id="events-keyboard-event-order">Keyboard Event Order</h4>
388400

389401
The keyboard events defined in this specification occur in a set order

0 commit comments

Comments
 (0)