Closed
Bug 1502875
Opened 6 years ago
Closed 6 years ago
Remove XULDocument::AddSubtreeToDocumentPre.
Categories
(Core :: XUL, enhancement, P3)
Core
XUL
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(4 files)
BindToTree takes care of adding to the ID table.
Assignee | ||
Comment 1•6 years ago
|
||
The ID table is managed in BindToTree / UnbindFromTree. I guess this was more important when XUL templates were a thing.
Assignee | ||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Not sure if it's related to this, but we've been finding and removing cases where we were relying on `document.getElementById("foo")` traversing into XBL anon content (bug 1502151, bug 1500240), since that doesn't work in HTML documents. As far as I know there aren't any more places where we do that, and if there are we can remove them.
Assignee | ||
Comment 4•6 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #3) > Not sure if it's related to this, but we've been finding and removing cases > where we were relying on `document.getElementById("foo")` traversing into > XBL anon content (bug 1502151, bug 1500240), since that doesn't work in HTML > documents. As far as I know there aren't any more places where we do that, > and if there are we can remove them. Oh, that's awesome.
Updated•6 years ago
|
Priority: -- → P3
Comment 6•6 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #5) > Created attachment 9020811 [details] > Bug 1502875 - Don't let GetElementById work across anonymous subtree > boundaries in XUL documents. r=smaug > > According to comment 3 the front-end no longer needs it. Richard, if TB is relying on document.getElementById traversing into XBL content, behavior can be restored by using something like `document.getAnonymousElementByAttribute(xblHostElement, "id", id)` (see bug 1502151 and bug 1500240).
Flags: needinfo?(richard.marti)
Assignee | ||
Comment 7•6 years ago
|
||
This is needed to make the "Simplify AddToIdTable" patch work. I'll land it before that one.
Comment 8•6 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #6) > (In reply to Emilio Cobos Álvarez (:emilio) from comment #5) > > Created attachment 9020811 [details] > > Bug 1502875 - Don't let GetElementById work across anonymous subtree > > boundaries in XUL documents. r=smaug > > > > According to comment 3 the front-end no longer needs it. > > Richard, if TB is relying on document.getElementById traversing into XBL > content, behavior can be restored by using something like > `document.getAnonymousElementByAttribute(xblHostElement, "id", id)` (see bug > 1502151 and bug 1500240). Thank you for the heads-up, Brian. I'll n-i other c-c people which know this a lot better than me.
Flags: needinfo?(richard.marti)
Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(jorgk)
Flags: needinfo?(acelists)
Thank you. We know that you need to use getAnonymousElementByAttribute() to get an anonymous element so if there is use of getElementById instead, it should be by mistake and we will fix it. I'll do some test run asserting when there is an ID and IsInAnonymousSubtree().
Flags: needinfo?(acelists)
Comment 10•6 years ago
|
||
I have created bug 1502997 for the cases found in Thunderbird.
Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(jorgk)
Assignee | ||
Comment 11•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=eb863c8de93f0d7ebd6ab1d53861ff7ecb227028 Looks much greener.
Comment 12•6 years ago
|
||
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/mozilla-inbound/rev/4fb88c6c2223 Remove AddElementToDocumentPre and RemoveSubtreeFromDocument. r=smaug https://hg.mozilla.org/integration/mozilla-inbound/rev/7a38544a9172 Don't call AddToIdTable when moving around a shadow root. r=smaug https://hg.mozilla.org/integration/mozilla-inbound/rev/8157760bbde1 Simplify AddIdElement. r=smaug https://hg.mozilla.org/integration/mozilla-inbound/rev/b7a966ea9ad3 Don't let GetElementById work across anonymous subtree boundaries in XUL documents. r=smaug
Comment 13•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4fb88c6c2223 https://hg.mozilla.org/mozilla-central/rev/7a38544a9172 https://hg.mozilla.org/mozilla-central/rev/8157760bbde1 https://hg.mozilla.org/mozilla-central/rev/b7a966ea9ad3
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in
before you can comment on or make changes to this bug.
Description
•