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

Event.prototype.deepPath as an attribute breaks TinyMCE 4.3.10 #242

Closed
rniwa opened this issue May 2, 2016 · 26 comments
Closed

Event.prototype.deepPath as an attribute breaks TinyMCE 4.3.10 #242

rniwa opened this issue May 2, 2016 · 26 comments
Labels
topic: shadow Relates to shadow trees (as defined in DOM)

Comments

@rniwa
Copy link
Collaborator

rniwa commented May 2, 2016

This is probably an evangelism but wordpress.com breaks due to its use of deepPath as an attribute. Specifically, they have a code that retrieves event.deepPath[0].

@rniwa
Copy link
Collaborator Author

rniwa commented May 2, 2016

@annevk
Copy link
Member

annevk commented May 2, 2016

What would a good alternative name be? connectedPath(), composedPath(), unclosedPath(), openPath()?

@rniwa
Copy link
Collaborator Author

rniwa commented May 2, 2016

I like composedPath(). I'm really hoping that wordpress.com fixes this especially since WordPress itself doesn't seem to have it. But I'm interested in what you all think.

@domenic
Copy link
Member

domenic commented May 2, 2016

Are there other parts of the API that should make the deep -> composed substitution for consistency?

@annevk
Copy link
Member

annevk commented May 2, 2016

As far as I know this is the only API that uses "deep" thus far. There's several open issues about adding more, but nothing remotely conclusive.

The other APIs that can go "downward" are slotable.assignedSlot and shadowHost.shadowRoot. And of course, all three are restricted to returning nodes in open shadow trees.

@rniwa
Copy link
Collaborator Author

rniwa commented May 2, 2016

Perhaps flattenedPath would be more consistent with assignedNodes({flatten: true})?

@annevk
Copy link
Member

annevk commented May 3, 2016

That does not seem entirely unreasonable (though I'd spell it flatPath()). One difference is that in the non-fallback case, children of slots are not part of the flat tree, but they can be part of the event path. I'm not sure if those subtle difference end up mattering more over time or not. If they do at some point, I think it would be better they had distinct terms.

@rniwa
Copy link
Collaborator Author

rniwa commented May 3, 2016

How about bubblingPath? propagationPath appears to be no so popular but has a usage that definitely breaks.

@annevk
Copy link
Member

annevk commented May 3, 2016

I think those are more confusing than composed or flat. I figured we could maybe use eventPath getting back to the original path property that I suppose we can also no longer use, but that also seems like an extremely popular term.

@annevk
Copy link
Member

annevk commented May 3, 2016

whatwg/html#1160 suggests either piercingPath or composedPath. We want to couple it with renaming scoped.

@rniwa rniwa changed the title Event.prototype.deepPath as an attribute breaks WordPress.com Event.prototype.deepPath as an attribute breaks TinyMCE 4.3.10 May 4, 2016
@rniwa
Copy link
Collaborator Author

rniwa commented May 4, 2016

Apparently, this problem was caused by TinyMCE 4.3.10, which is included in WordPress 4.5 on the contrary to my earlier statement. (Thanks @apple-web-evangelist for figuring this out!) So we probably need to do this rename since there will be a lot of websites that have this version of WordPress and/or TinyMCE and never update to a new version :(

@annevk
Copy link
Member

annevk commented May 5, 2016

So @smaug---- does not like piercing because going from shadow to light is not really piercing anything (you're supposed to have that access) and @rniwa does not like composed because nothing is really composed. Giant sigh.

Different direction: broad. We cannot really use complete or full since it isn't always, but it's broader than usual and a broad event logically reaches more EventTarget objects. findRootNode({ broad:true }) also works in that sense.

@rniwa
Copy link
Collaborator Author

rniwa commented May 5, 2016

broad sounds vague and won't make me think of shadow roots at all. How about shadowPath or shadowCrossingPath? dispatchPath or propagationTargets?

@annevk
Copy link
Member

annevk commented May 5, 2016

@rniwa I think ideally we have something that can also be used for findRootNode() and as replacement for Event.prototype.scoped (with opposite meaning).

@rniwa
Copy link
Collaborator Author

rniwa commented May 5, 2016

How about escaping then? findRootNode({escaping: true}), Event.prototype.escaping, and escapingPath.

Or leaking? findRootNode({leaking: true}), Event.prototype.leaking, and leakingPath.

Yet another alternative: emanating: findRootNode({emanating: true}), Event.prototype.emanating, and emanatingPath.

One more: exiting or shadowExiting: findRootNode({exiting: true}), Event.prototype.exiting, and exitingPath.

@annevk
Copy link
Member

annevk commented May 5, 2016

I suspect @smaug---- would not like those for the same reason he did not like piercing. Is broad that bad?

@rniwa
Copy link
Collaborator Author

rniwa commented May 5, 2016

I don't like it because board doesn't convey the semantics of exiting from a shadow root to a shadow host. @othermaciej @hober

@annevk annevk added the topic: shadow Relates to shadow trees (as defined in DOM) label May 5, 2016
@rniwa
Copy link
Collaborator Author

rniwa commented May 5, 2016

I talked with @smaug---- on #whatwg and he seems to like dispatchPath, and I like that name too.

WDYT?

@smaug----
Copy link
Collaborator

smaug---- commented May 5, 2016

"like". I can live with dispatchPath is perhaps closer ;)
propagationPath would be way nicer, but can't be used.

though, dispatchPath doesn't play well with findRootNode, if that is one goal.

@smaug----
Copy link
Collaborator

smaug---- commented May 5, 2016

composedPath and findRootNode({composedTree: true}) ?
(I couldn't quite understand the reasoning to object "compose" when looking at the IRC logs)

@rniwa
Copy link
Collaborator Author

rniwa commented May 5, 2016

I don't think composedPath makes sense because it contains nodes that are not in the composed tree. Also, we don't use the term composed anywhere else so that might be rather confusing.

@smaug----
Copy link
Collaborator

hmm, sounds like we have different meaning for composed tree. You think it as a synonym to flattened tree, I think. For me composed tree is the tree of node trees, including shadow roots and everything.

And if we don't use composed for anything else, it is a good thing. less likely to cause confusion.

@rniwa
Copy link
Collaborator Author

rniwa commented May 5, 2016

That's a good point. Okay, with that, we can do Event.prototype.composed and findRootNode({composed:true})

@annevk
Copy link
Member

annevk commented May 6, 2016

And composedPath? \o/ Now we just need to wait for @hayatoito to weigh in.

@hayatoito
Copy link
Member

hayatoito commented May 9, 2016

composed is no longer a reserved word in the Shadow DOM spec. I stopped using this term in normative sections about a few month ago. Now, we can use it freely in any meaning, if we want to re-use it.

I am fine with composedPath. I can not think of any better name.

@rniwa
Copy link
Collaborator Author

rniwa commented May 9, 2016

Let's go with composedPath then!

kisg pushed a commit to paul99/webkit-mips that referenced this issue May 9, 2016
https://bugs.webkit.org/show_bug.cgi?id=157475

Reviewed by Antti Koivisto.

Source/WebCore:

Renamed Event.prototype.deepPath() to composedPath() per discussions on
whatwg/dom#242 as the old name was not Web compatible.

Test: fast/shadow-dom/Extensions-to-Event-Interface.html

* dom/Event.cpp:
(WebCore::Event::composedPath): Renamed from deepPath.
* dom/Event.h:
* dom/Event.idl:

LayoutTests:

Updated the tests.

* fast/shadow-dom/Extensions-to-Event-Interface-expected.txt:
* fast/shadow-dom/Extensions-to-Event-Interface.html:
* fast/shadow-dom/resources/event-path-test-helpers.js:
(dispatchEventWithLog):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
annevk added a commit that referenced this issue May 10, 2016
Fixes #242. Also reverts
WICG/webcomponents#432 as it appears to no
longer be needed. If we ever have an event path that starts with a
non-node and ends with a node we'll have to add that complexity back.

(The reason it is named composedPath() is because deepPath() and
various other names were no longer viable after Chrome's initial
experiment. See the various issues.)
annevk added a commit that referenced this issue May 12, 2016
Fixes #242. Also reverts WICG/webcomponents#432 as it appears to no longer be needed. If we ever have an event path that starts with a non-node and ends with a node we'll have to add that complexity back.

(The reason it is named composedPath() is because deepPath() and various other names were no longer viable after Chrome's initial experiment. See the various issues.)
TakayoshiKochi pushed a commit to TakayoshiKochi/web-platform-tests that referenced this issue May 27, 2016
Event.deepPath() was renamed to composedPath().
See
whatwg/dom#242
hayatoito pushed a commit to web-platform-tests/wpt that referenced this issue May 27, 2016
Event.deepPath() was renamed to composedPath().
See
whatwg/dom#242
arronei pushed a commit to arronei/web-platform-tests that referenced this issue Jun 14, 2016
Event.deepPath() was renamed to composedPath().
See
whatwg/dom#242
ivanzr pushed a commit to ivanzr/web-platform-tests that referenced this issue Jun 29, 2016
Event.deepPath() was renamed to composedPath().
See
whatwg/dom#242
matteoceraico pushed a commit to matteoceraico/webkit that referenced this issue Jul 5, 2017
https://bugs.webkit.org/show_bug.cgi?id=157475

Reviewed by Antti Koivisto.

Source/WebCore:

Renamed Event.prototype.deepPath() to composedPath() per discussions on
whatwg/dom#242 as the old name was not Web compatible.

Test: fast/shadow-dom/Extensions-to-Event-Interface.html

* dom/Event.cpp:
(WebCore::Event::composedPath): Renamed from deepPath.
* dom/Event.h:
* dom/Event.idl:

LayoutTests:

Updated the tests.

* fast/shadow-dom/Extensions-to-Event-Interface-expected.txt:
* fast/shadow-dom/Extensions-to-Event-Interface.html:
* fast/shadow-dom/resources/event-path-test-helpers.js:
(dispatchEventWithLog):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
matteoceraico pushed a commit to matteoceraico/webkit that referenced this issue Jul 5, 2017
https://bugs.webkit.org/show_bug.cgi?id=157475

Reviewed by Antti Koivisto.

Source/WebCore:

Renamed Event.prototype.deepPath() to composedPath() per discussions on
whatwg/dom#242 as the old name was not Web compatible.

Test: fast/shadow-dom/Extensions-to-Event-Interface.html

* dom/Event.cpp:
(WebCore::Event::composedPath): Renamed from deepPath.
* dom/Event.h:
* dom/Event.idl:

LayoutTests:

Updated the tests.

* fast/shadow-dom/Extensions-to-Event-Interface-expected.txt:
* fast/shadow-dom/Extensions-to-Event-Interface.html:
* fast/shadow-dom/resources/event-path-test-helpers.js:
(dispatchEventWithLog):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
matteoceraico pushed a commit to matteoceraico/webkit that referenced this issue Jul 6, 2017
https://bugs.webkit.org/show_bug.cgi?id=157475

Reviewed by Antti Koivisto.

Source/WebCore:

Renamed Event.prototype.deepPath() to composedPath() per discussions on
whatwg/dom#242 as the old name was not Web compatible.

Test: fast/shadow-dom/Extensions-to-Event-Interface.html

* dom/Event.cpp:
(WebCore::Event::composedPath): Renamed from deepPath.
* dom/Event.h:
* dom/Event.idl:

LayoutTests:

Updated the tests.

* fast/shadow-dom/Extensions-to-Event-Interface-expected.txt:
* fast/shadow-dom/Extensions-to-Event-Interface.html:
* fast/shadow-dom/resources/event-path-test-helpers.js:
(dispatchEventWithLog):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@200580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ryanhaddad pushed a commit to WebKit/WebKit that referenced this issue Dec 22, 2020
https://bugs.webkit.org/show_bug.cgi?id=157475

Reviewed by Antti Koivisto.

Source/WebCore:

Renamed Event.prototype.deepPath() to composedPath() per discussions on
whatwg/dom#242 as the old name was not Web compatible.

Test: fast/shadow-dom/Extensions-to-Event-Interface.html

* dom/Event.cpp:
(WebCore::Event::composedPath): Renamed from deepPath.
* dom/Event.h:
* dom/Event.idl:

LayoutTests:

Updated the tests.

* fast/shadow-dom/Extensions-to-Event-Interface-expected.txt:
* fast/shadow-dom/Extensions-to-Event-Interface.html:
* fast/shadow-dom/resources/event-path-test-helpers.js:
(dispatchEventWithLog):


Canonical link: https://commits.webkit.org/175611@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: shadow Relates to shadow trees (as defined in DOM)
Development

No branches or pull requests

5 participants