Bug 930250 - Don't tear down XBL binding when element is in document. r=bz

This commit is contained in:
William Chen 2014-03-07 15:48:20 -08:00
Родитель c1faf91a37
Коммит 2c0f2038b4
3 изменённых файлов: 20 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<body>
<nobr>
<h4 contenteditable="true">
<iframe></iframe>
<applet></applet>
<nobr>

Просмотреть файл

@ -146,5 +146,6 @@ load 849601.html
skip-if(Android) load 851353-1.html skip-if(Android) load 851353-1.html
load 863950.html load 863950.html
load 864448.html load 864448.html
load 930250.html
load 942979.html load 942979.html
load 978646.html load 978646.html

Просмотреть файл

@ -1264,7 +1264,17 @@ public:
NS_IMETHOD Run() NS_IMETHOD Run()
{ {
mManager->RemovedFromDocumentInternal(mElement, mDoc); // It may be the case that the element was removed from the
// DOM, causing this runnable to be created, then inserted back
// into the document before the this runnable had a chance to
// tear down the binding. Only tear down the binding if the element
// is still no longer in the DOM. nsXBLService::LoadBinding tears
// down the old binding if the element is inserted back into the
// DOM and loads a different binding.
if (!mElement->IsInDoc()) {
mManager->RemovedFromDocumentInternal(mElement, mDoc);
}
return NS_OK; return NS_OK;
} }