зеркало из https://github.com/mozilla/gecko-dev.git
Bug 992521 - Part 3: Make script run when not in document, but contained by a ShadowRoot with a host in document. r=smaug
This commit is contained in:
Родитель
416f36b0de
Коммит
d6e3f67015
|
@ -114,8 +114,8 @@ nsScriptElement::MaybeProcessScript()
|
|||
NS_ASSERTION(cont->DebugGetSlots()->mMutationObservers.Contains(this),
|
||||
"You forgot to add self as observer");
|
||||
|
||||
if (mAlreadyStarted || !mDoneAddingChildren || !cont->IsInDoc() ||
|
||||
mMalformed || !HasScriptContent()) {
|
||||
if (mAlreadyStarted || !mDoneAddingChildren ||
|
||||
!cont->GetCrossShadowCurrentDoc() || mMalformed || !HasScriptContent()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ HTMLScriptElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
|||
aCompileEventHandlers);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (aDocument) {
|
||||
if (GetCrossShadowCurrentDoc()) {
|
||||
MaybeProcessScript();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче