зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1441136: Some other minor cleanup. r=smaug
Now that XBL and Shadow DOM are not entangled we don't really need to do this. MozReview-Commit-ID: GdgnE5QT2NR
This commit is contained in:
Родитель
f004e39cd6
Коммит
3218d73ada
|
@ -1703,10 +1703,9 @@ Element::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||||
|
|
||||||
UpdateEditableState(false);
|
UpdateEditableState(false);
|
||||||
|
|
||||||
// If we had a pre-existing XBL binding,
|
// If we had a pre-existing XBL binding, we might have anonymous children that
|
||||||
// we might have anonymous children that also need to be told that they are
|
// also need to be told that they are moving.
|
||||||
// moving.
|
if (HasFlag(NODE_MAY_BE_IN_BINDING_MNGR)) {
|
||||||
if (HasFlag(NODE_MAY_BE_IN_BINDING_MNGR) && !GetShadowRoot()) {
|
|
||||||
nsXBLBinding* binding =
|
nsXBLBinding* binding =
|
||||||
OwnerDoc()->BindingManager()->GetBindingWithContent(this);
|
OwnerDoc()->BindingManager()->GetBindingWithContent(this);
|
||||||
|
|
||||||
|
@ -1768,8 +1767,7 @@ Element::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call BindToTree on shadow root children.
|
// Call BindToTree on shadow root children.
|
||||||
ShadowRoot* shadowRoot = GetShadowRoot();
|
if (ShadowRoot* shadowRoot = GetShadowRoot()) {
|
||||||
if (shadowRoot) {
|
|
||||||
shadowRoot->SetIsComposedDocParticipant(IsInComposedDoc());
|
shadowRoot->SetIsComposedDocParticipant(IsInComposedDoc());
|
||||||
for (nsIContent* child = shadowRoot->GetFirstChild(); child;
|
for (nsIContent* child = shadowRoot->GetFirstChild(); child;
|
||||||
child = child->GetNextSibling()) {
|
child = child->GetNextSibling()) {
|
||||||
|
@ -1989,11 +1987,9 @@ Element::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document) {
|
if (document) {
|
||||||
// Notify XBL- & nsIAnonymousContentCreator-generated
|
if (HasFlag(NODE_MAY_BE_IN_BINDING_MNGR)) {
|
||||||
// anonymous content that the document is changing.
|
// Notify XBL- & nsIAnonymousContentCreator-generated anonymous content
|
||||||
// Unlike XBL, bindings for web components shadow DOM
|
// that the document is changing.
|
||||||
// do not get uninstalled.
|
|
||||||
if (HasFlag(NODE_MAY_BE_IN_BINDING_MNGR) && !GetShadowRoot()) {
|
|
||||||
nsContentUtils::AddScriptRunner(
|
nsContentUtils::AddScriptRunner(
|
||||||
new RemoveFromBindingManagerRunnable(
|
new RemoveFromBindingManagerRunnable(
|
||||||
document->BindingManager(), this, document));
|
document->BindingManager(), this, document));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче