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

Ensure mouse events are dispatched to document/window as necessary #6733

Closed
jdm opened this issue Jul 24, 2015 · 7 comments
Closed

Ensure mouse events are dispatched to document/window as necessary #6733

jdm opened this issue Jul 24, 2015 · 7 comments
Labels
A-content/dom Interacting with the DOM from web content

Comments

@jdm
Copy link
Member

jdm commented Jul 24, 2015

I'm not sure what the spec mandates here, but I'm pretty sure our implementation is lacking.

@jdm jdm added the A-content/dom Interacting with the DOM from web content label Jul 24, 2015
@Ms2ger
Copy link
Contributor

Ms2ger commented Jul 24, 2015

This is just https://dom.spec.whatwg.org/#concept-event-dispatch step 4 (which we implement) plus https://html.spec.whatwg.org/multipage/#events-and-the-window-object, which I've been meaning to file once we have better tests for it, right?

@jdm
Copy link
Member Author

jdm commented Jul 24, 2015

Yep.

@jdm
Copy link
Member Author

jdm commented Jul 24, 2015

Although I've been meaning to look into what other browsers do with mouse events that are not targeted at a particular child node of the body element - specifically, what if the mouse is being moved or clicked outside of the bounds of any page content, but inside the bounds of the enclosing frame?

@Ms2ger
Copy link
Contributor

Ms2ger commented Jul 25, 2015

The root element covers the viewport.

@paulrouget
Copy link
Contributor

We also need that for the keyboard events.

@jdm
Copy link
Member Author

jdm commented Sep 9, 2015

@paulrouget Could you file a separate issue for that?

@jdm
Copy link
Member Author

jdm commented Feb 18, 2016

This is now self-contained in the DOM spec:

nox added a commit to nox/servo that referenced this issue Feb 24, 2016
The DOM specification says:

A document's get the parent algorithm, given an event, returns null
if event's type attribute value is "load" or document does not have
a browsing context, and the document's associated Window object
otherwise.
nox added a commit to nox/servo that referenced this issue Feb 26, 2016
The DOM specification says:

A document's get the parent algorithm, given an event, returns null
if event's type attribute value is "load" or document does not have
a browsing context, and the document's associated Window object
otherwise.
nox added a commit to nox/servo that referenced this issue Feb 26, 2016
The DOM specification says:

A document's get the parent algorithm, given an event, returns null
if event's type attribute value is "load" or document does not have
a browsing context, and the document's associated Window object
otherwise.
nox added a commit to nox/servo that referenced this issue Feb 26, 2016
The DOM specification says:

A document's get the parent algorithm, given an event, returns null
if event's type attribute value is "load" or document does not have
a browsing context, and the document's associated Window object
otherwise.
bors-servo pushed a commit that referenced this issue Feb 27, 2016
Fix the "get the parent" loop when dispatching event (fixes #6733)

The DOM specification says:

> A document's get the parent algorithm, given an event, returns null
> if event's type attribute value is "load" or document does not have
> a browsing context, and the document's associated Window object
> otherwise.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9734)
<!-- Reviewable:end -->
nox added a commit to nox/servo that referenced this issue Feb 27, 2016
The DOM specification says:

A document's get the parent algorithm, given an event, returns null
if event's type attribute value is "load" or document does not have
a browsing context, and the document's associated Window object
otherwise.
bors-servo pushed a commit that referenced this issue Feb 27, 2016
Fix the "get the parent" loop when dispatching event (fixes #6733)

The DOM specification says:

> A document's get the parent algorithm, given an event, returns null
> if event's type attribute value is "load" or document does not have
> a browsing context, and the document's associated Window object
> otherwise.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9734)
<!-- Reviewable:end -->
nox added a commit to nox/servo that referenced this issue Feb 27, 2016
The DOM specification says:

A document's get the parent algorithm, given an event, returns null
if event's type attribute value is "load" or document does not have
a browsing context, and the document's associated Window object
otherwise.
nox added a commit to nox/servo that referenced this issue Feb 27, 2016
The DOM specification says:

A document's get the parent algorithm, given an event, returns null
if event's type attribute value is "load" or document does not have
a browsing context, and the document's associated Window object
otherwise.
bors-servo pushed a commit that referenced this issue Feb 27, 2016
Fix the "get the parent" loop when dispatching event (fixes #6733)

The DOM specification says:

> A document's get the parent algorithm, given an event, returns null
> if event's type attribute value is "load" or document does not have
> a browsing context, and the document's associated Window object
> otherwise.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9734)
<!-- Reviewable:end -->
bors-servo pushed a commit that referenced this issue Feb 27, 2016
Fix the "get the parent" loop when dispatching event (fixes #6733)

The DOM specification says:

> A document's get the parent algorithm, given an event, returns null
> if event's type attribute value is "load" or document does not have
> a browsing context, and the document's associated Window object
> otherwise.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9734)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/dom Interacting with the DOM from web content
Projects
None yet
Development

No branches or pull requests

3 participants