mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1113959 - Do not enqueue custom element attached and detached callbacks when there is no browsing context. r=smaug
This commit is contained in:
parent
c83bdf33f5
commit
5b6b5d74fd
@ -1461,7 +1461,9 @@ Element::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
// Being added to a document.
|
||||
SetInDocument();
|
||||
|
||||
if (GetCustomElementData()) {
|
||||
// Attached callback must be enqueued whenever custom element is inserted into a
|
||||
// document and this document has a browsing context.
|
||||
if (GetCustomElementData() && aDocument->GetDocShell()) {
|
||||
// Enqueue an attached callback for the custom element.
|
||||
aDocument->EnqueueLifecycleCallback(nsIDocument::eAttached, this);
|
||||
}
|
||||
@ -1673,7 +1675,9 @@ Element::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||
|
||||
document->ClearBoxObjectFor(this);
|
||||
|
||||
if (GetCustomElementData()) {
|
||||
// Detached must be enqueued whenever custom element is removed from
|
||||
// the document and this document has a browsing context.
|
||||
if (GetCustomElementData() && document->GetDocShell()) {
|
||||
// Enqueue a detached callback for the custom element.
|
||||
document->EnqueueLifecycleCallback(nsIDocument::eDetached, this);
|
||||
}
|
||||
|
@ -1,14 +1,8 @@
|
||||
[attached-callback-move-element-test.html]
|
||||
type: testharness
|
||||
[Test attached callback if moving custom element inside document without browsing context]
|
||||
expected: FAIL
|
||||
|
||||
[Test attached callback if moving custom element from document without browsing context to document with browsing context]
|
||||
expected: FAIL
|
||||
|
||||
[Test attached callback if moving custom element from document with browsing context to document without browsing context]
|
||||
expected: FAIL
|
||||
|
||||
[Test attached callback if moving custom element from document with browsing context to document with browsing context]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
[detached-callback-move-element-test.html]
|
||||
type: testharness
|
||||
[Test detached callback is not called if moving custom element inside document without browsing context]
|
||||
expected: FAIL
|
||||
|
||||
[Test detached callback is not called if moving custom element from document without browsing context to document with browsing context]
|
||||
expected: FAIL
|
||||
|
@ -1,20 +1,5 @@
|
||||
[detached-callback-no-browsing-context-test.html]
|
||||
type: testharness
|
||||
[Test detached callback if custom element is created via innerHTML property. Document has no browsing context]
|
||||
expected: FAIL
|
||||
|
||||
[Test detached callback if custom element is via innerHTML property before registration of a custom element. Document has no browsing context]
|
||||
expected: FAIL
|
||||
|
||||
[Test detached callback if removing custom element via innerHTML property. Document has no browsing context]
|
||||
expected: FAIL
|
||||
|
||||
[Test detached callback if removing perent of custom element. Document has no browsing context]
|
||||
expected: FAIL
|
||||
|
||||
[Test detached callback if removing perent of custom element via innerHTML property. Document has no browsing context]
|
||||
expected: FAIL
|
||||
|
||||
[Test detached callback is not called, if document\'s window is navigated to another document and custom element is removed]
|
||||
expected: FAIL
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user