Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make EventTypeId reflect DOM inheritance hierarchy #7205

Closed
jdm opened this issue Aug 14, 2015 · 6 comments
Closed

Make EventTypeId reflect DOM inheritance hierarchy #7205

jdm opened this issue Aug 14, 2015 · 6 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Aug 14, 2015

Right now MouseEvent and UIEvent are listed separately, which means that some_mouse_event.is_uievent() will return false. We should make EventTypeId reflect the proper DOM hierarchy, just like EventTargetTypeId/NodeTypeId/ElementTypeId, etc.

Code: components/script/dom/event.rs, components/script/dom/uievent.rs

@wilcus
Copy link
Contributor

@wilcus wilcus commented Aug 17, 2015

I'd like to try this.

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Aug 18, 2015

@Wilmoz the UIEventTypeId argument should be passed to new_inherited only, not to new.

@wilcus
Copy link
Contributor

@wilcus wilcus commented Aug 18, 2015

@Ms2ger thanks now everything works, but i assumed "new_uninitialized" use "MouseEvent". here the code line 27 https://pastebin.mozilla.org/8843070 .
Maybe you could show me a bit of information about how inheritance is use in servo (simple example)

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Aug 18, 2015

You'll need to add UIEvent as another variant to UIEventTypeId, since UIEvent can be the most-derived class of an object. There's some documentation at http://doc.servo.org/script/dom/index.html, but nothing about the type ids, I'm afraid.

@wilcus
Copy link
Contributor

@wilcus wilcus commented Aug 18, 2015

@Ms2ger ready :). Could I make a pull request in the documentation?

bors-servo pushed a commit that referenced this issue Aug 19, 2015
Make EventTypeId reflect DOM inheritance hierarchy

#7205 (comment)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7272)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Aug 19, 2015
Make EventTypeId reflect DOM inheritance hierarchy

#7205 (comment)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7272)
<!-- Reviewable:end -->
@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Aug 19, 2015

That would be great, yes. Probably in components/script/dom/mod.rs?

@Ms2ger Ms2ger closed this Aug 19, 2015
bors-servo pushed a commit that referenced this issue Sep 5, 2015
Documentation of inheritance in type ids

Aditional documentation about this issue #7205

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7337)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Sep 5, 2015
Documentation of inheritance in type ids

Aditional documentation about this issue #7205

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7337)
<!-- Reviewable:end -->
jrmuizel pushed a commit to jrmuizel/gecko-cinnabar that referenced this issue Jun 12, 2017
…hy (from wilcus:EventType); r=Ms2ger

servo/servo#7205 (comment)

Source-Repo: https://github.com/servo/servo
Source-Revision: 15b09fc0afc26f39fc96b8b4b84df4f4aec1ee21
jrmuizel pushed a commit to jrmuizel/gecko-cinnabar that referenced this issue Jun 12, 2017
…ilcus:InheritanceDocumentation); r=mbrubeck

Aditional documentation about this issue servo/servo#7205

Source-Repo: https://github.com/servo/servo
Source-Revision: da0b9d7c0185f0898fd47f5326e8e084d08a2fc0
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Sep 30, 2019
…hy (from wilcus:EventType); r=Ms2ger

servo/servo#7205 (comment)

Source-Repo: https://github.com/servo/servo
Source-Revision: 15b09fc0afc26f39fc96b8b4b84df4f4aec1ee21

UltraBlame original commit: d2f894669742b4a2aa02863473890a5765676d58
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Sep 30, 2019
…ilcus:InheritanceDocumentation); r=mbrubeck

Aditional documentation about this issue servo/servo#7205

Source-Repo: https://github.com/servo/servo
Source-Revision: da0b9d7c0185f0898fd47f5326e8e084d08a2fc0

UltraBlame original commit: 3c621ef2b11b0d4fb3e60713cca465597836a762
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…hy (from wilcus:EventType); r=Ms2ger

servo/servo#7205 (comment)

Source-Repo: https://github.com/servo/servo
Source-Revision: 15b09fc0afc26f39fc96b8b4b84df4f4aec1ee21

UltraBlame original commit: d2f894669742b4a2aa02863473890a5765676d58
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…ilcus:InheritanceDocumentation); r=mbrubeck

Aditional documentation about this issue servo/servo#7205

Source-Repo: https://github.com/servo/servo
Source-Revision: da0b9d7c0185f0898fd47f5326e8e084d08a2fc0

UltraBlame original commit: 3c621ef2b11b0d4fb3e60713cca465597836a762
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…hy (from wilcus:EventType); r=Ms2ger

servo/servo#7205 (comment)

Source-Repo: https://github.com/servo/servo
Source-Revision: 15b09fc0afc26f39fc96b8b4b84df4f4aec1ee21

UltraBlame original commit: d2f894669742b4a2aa02863473890a5765676d58
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…ilcus:InheritanceDocumentation); r=mbrubeck

Aditional documentation about this issue servo/servo#7205

Source-Repo: https://github.com/servo/servo
Source-Revision: da0b9d7c0185f0898fd47f5326e8e084d08a2fc0

UltraBlame original commit: 3c621ef2b11b0d4fb3e60713cca465597836a762
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.