Remove document.getBindingParent and document.getAnonymousNodes DOM APIs.
Categories
(Core :: DOM: Core & HTML, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(8 files)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
There are various callers in devtools that use it. Most of it want to deal with NAC or shadow separately.
There's other callers that want it like PluginChild, which just wants the containing shadow host.
We should expose APIs that allow devtools to work with these easily without document.getBindingParent.
I propose:
partial interface Node {
ShadowRoot? containingShadowRoot;
boolean isNativeAnonymous;
}
Maybe we could expose more conveniences like containingShadowHost
or closestNonNativeAnonymousNode
or something, but these two would do the job I think.
Then we can remove document.getBindingParent
.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
We don't need layout flushes to attach XBL bindings anymore, as there are no XBL
bindings. This is drive-by.
Depends on D53336
Assignee | ||
Comment 3•5 years ago
|
||
It wants to get the containing shadow host of the target to get to the plugin.
Do that explicitly.
Depends on D53337
Assignee | ||
Comment 4•5 years ago
|
||
When the focus moves elsewhere inside the <tree> blur events aren't dispatched
outside the shadow tree (as expected), so checking the originalTarget is always
bogus.
Furthermore, the event handler does nothing if the input isn't focused, and
when the input is blurred the tree takes care of calling stopEditing itself, so
this change should be pretty safe in general:
It's not clear to me whether the blur event handler is doing anything at all
after bug 1547382 (before this patch), as the binding parent is not a
<xul:textbox> anymore, so <input>.getBindingParent() will return the <tree>...
Depends on D53338
Assignee | ||
Comment 5•5 years ago
|
||
This removes the concept of shadowAnonymous, which doesn't make a lot of sense,
and re-enables the shadow dom tests which were disabled when we removed the old
style system (as stylo didn't supported shadow DOM yet by then).
This is a change in behavior as you can now remove nodes from shadow DOM (no
reason you weren't able to, before).
Depends on D53339
Assignee | ||
Comment 6•5 years ago
|
||
This preserves the behavior, though I think we could probably remove that block
altogether?
Depends on D53340
Assignee | ||
Comment 7•5 years ago
|
||
Depends on D53341
Assignee | ||
Comment 8•5 years ago
|
||
As it always returns null.
Depends on D53342
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
Jorg, there are a few uses of this API in comm-central/suite/
. I think you don't care about that code, but just double-checking.
Let me know if you do and I can land most of the removal without removing the actual API for now, or what not.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
Hi Emilio. SeaMonkey (using the suite/ code) isn't in a good shape beyond the equivalent of mozilla60 (sixty, no typo), which they haven't even released yet. TB with about 10 staff has replaced all overlays, XBL bindings and are now working on the XUL to XHTML transition. SM has done none of that work, so at trunk, they can compile but not start :-( - We removed getAnonymousNodes in bug 1591361, so do whatever you need to do.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
Comment 15•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5a76ddcb1ac1
https://hg.mozilla.org/mozilla-central/rev/85408aaba4a3
https://hg.mozilla.org/mozilla-central/rev/5bc4fbe48df7
https://hg.mozilla.org/mozilla-central/rev/cceae677e859
https://hg.mozilla.org/mozilla-central/rev/c2817cb86453
https://hg.mozilla.org/mozilla-central/rev/d5db2146b9c5
https://hg.mozilla.org/mozilla-central/rev/26d109ef85da
https://hg.mozilla.org/mozilla-central/rev/ba115d212e18
Description
•