Skip to content

Commit

Permalink
Initial version of MouseEvent algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
garykac committed Jun 12, 2024
1 parent 09a2031 commit 40ca2d8
Show file tree
Hide file tree
Showing 7 changed files with 936 additions and 15 deletions.
1 change: 1 addition & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ def process_main_spec():
'event-types-keyboardevent',
'event-types-compositionevent',
'keyboard',
'external-algorithms',
'legacy-event-initializers',
'legacy-key-attributes',
'legacy-event-types',
Expand Down
3 changes: 3 additions & 0 deletions event-algo.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2118,6 +2118,9 @@ Issue: The contents of this section should eventually be moved into the [[CSSOM]
1. Set |event|.{{offsetY}} according to
<a href="https://www.w3.org/TR/cssom-view-1/#dom-mouseevent-offsety">offsetY</a>

Note: Not needed since all these new attributes are defined in terms of how they
can be calculated from the base MouseEvent attributes.

</div><!-- algorithm -->

</section>
Expand Down
50 changes: 38 additions & 12 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,35 @@ url: https://www.w3.org/TR/pointerevents3/#pointerevent-interface; type: interfa
text: PointerEvent
url: https://dom.spec.whatwg.org/#concept-tree-ancestor; type: dfn;
text: ancestor
url: https://dom.spec.whatwg.org/#concept-event-initialize; type: dfn;
text: initialize an event
url: https://dom.spec.whatwg.org/#concept-event-create; type: dfn;
text: create a new event
text: creating a new event
urlPrefix: https://html.spec.whatwg.org/#; type: dfn; spec: html;
text: click focusable
text: focusable area
<!-- CSS -->
url: https://www.w3.org/TR/CSS21/visuren.html#x43; type: dfn;
text: stacking context
url: https://drafts.csswg.org/css-position-3/#positioned-box; type: dfn;
text: positioned
url: https://drafts.csswg.org/css-position-4/#paint-a-stacking-context; type: dfn;
text: painting a stacking context
url: https://drafts.csswg.org/cssom-view/#dom-document-elementfrompoint; type: dfn; spec: cssom-view
text: elementFromPoint
url: https://drafts.csswg.org/cssom-view/#dom-document-elementsfrompoint; type: dfn; spec: cssom-view
text: elementsFromPoint
</pre>

<pre class="link-defaults">
spec:css2; type:dfn; text:viewport
spec:dom; type:interface; text:Document
spec:dom; type:attribute; for:Event; text:bubbles
spec:dom; type:attribute; for:Event; text:cancelable
spec:dom; type:attribute; for:Event; text:composed
spec:dom; type:attribute; for:Event; text:target
spec:dom; type:attribute; for:Event; text:type
spec:dom; type:dfn; for:Event; text:target
spec:infra; type:dfn; text:code point
</pre>
Expand Down Expand Up @@ -76,25 +95,27 @@ spec:infra; type:dfn; text:code point
path: stylesheet-extra.include
</pre>

<!-- Introduction ========================================================== -->
<pre class="include">
path: sections/introduction.include
</pre>

<!-- Stylistic Conventions ================================================= -->
<pre class="include">
path: sections/conventions.include
</pre>

<!-- Section 3: Architecture =============================================== -->
<!-- DOM Event Architecture ================================================ -->
<pre class="include">
path: sections/architecture.include
</pre>

<!-- Section 4: Basic Event Interfaces ===================================== -->
<!-- Basic Event Interfaces ================================================ -->
<pre class="include">
path: sections/event-interfaces.include
</pre>

<!-- Section 5: The Events ================================================= -->
<!-- Event Types =========================================================== -->
<section>
<pre class="include">
path: sections/event-types.include
Expand Down Expand Up @@ -122,47 +143,52 @@ path: sections/event-types-compositionevent.include
</pre>
</section>

<!-- Section 6: Keyboard and key values ==================================== -->
<!-- Keyboard and key values =============================================== -->
<pre class="include">
path: sections/keyboard.include
</pre>

<!-- Appendix A: Legacy Event Initializers ================================= -->
<!-- External Algorithms =================================================== -->
<pre class="include">
path: sections/external-algorithms.include
</pre>

<!-- Legacy Event Initializers ============================================= -->
<pre class="include">
path: sections/legacy-event-initializers.include
</pre>

<!-- Appendix B: Legacy Key Attributes ===================================== -->
<!-- Legacy Key & Mouse Event Attributes =================================== -->
<pre class="include">
path: sections/legacy-key-attributes.include
</pre>

<!-- Appendix C: Legacy Event Types ======================================== -->
<!-- Legacy Event Types ==================================================== -->
<pre class="include">
path: sections/legacy-event-types.include
</pre>

<!-- Appendix D: Extending Events ========================================== -->
<!-- Extending Events ====================================================== -->
<pre class="include">
path: sections/extending-events.include
</pre>

<!-- Appendix E: Security Considerations =================================== -->
<!-- Security Considerations =============================================== -->
<pre class="include">
path: sections/security.include
</pre>

<!-- Appendix F: Changes =================================================== -->
<!-- Changes =============================================================== -->
<pre class="include">
path: sections/changes.include
</pre>

<!-- Appendix G: Acknowledgements ========================================== -->
<!-- Acknowledgements ====================================================== -->
<pre class="include">
path: sections/acknowledgements.include
</pre>

<!-- Appendix H: Glossary ================================================= -->
<!-- Glossary ============================================================== -->
<pre class="include">
path: sections/glossary.include
</pre>
12 changes: 12 additions & 0 deletions sections/event-types-keyboardevent.txt
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,18 @@
{{KeyboardEvent/location}} attribute MUST always be set to
{{KeyboardEvent/DOM_KEY_LOCATION_STANDARD}}.

<h4 id="keyboardevent-algorithms">KeyboardEvent Algorithms</h4>

<h5 id="keyboardevent-global-state">Global State for KeyboardEvent</h5>

<h6 id="keyboardevent-global-ua">User Agent-Level State</h6>

The UA must maintain the following values that are shared for the entire
User Agent.

A <dfn>key modifier state</dfn> (initially empty) that keeps track of the current
state of each <a>modifier key</a> available on the system.

<h4 id="events-keyboard-event-order">Keyboard Event Order</h4>

The keyboard events defined in this specification occur in a set order
Expand Down
Loading

0 comments on commit 40ca2d8

Please sign in to comment.