зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1380106 - Drop style data in DestroyContent. r=heycam,r=bz
MozReview-Commit-ID: 9ydkvlDA9oS
This commit is contained in:
Родитель
5c407c8b43
Коммит
b2fd3f821c
|
@ -1262,6 +1262,13 @@ FragmentOrElement::SetTextContentInternal(const nsAString& aTextContent,
|
|||
void
|
||||
FragmentOrElement::DestroyContent()
|
||||
{
|
||||
// Drop any servo data. We do this before the RemovedFromDocument call below
|
||||
// so that it doesn't need to try to keep the style state sane when shuffling
|
||||
// around the flattened tree.
|
||||
if (IsElement() && AsElement()->HasServoData()) {
|
||||
AsElement()->ClearServoData();
|
||||
}
|
||||
|
||||
nsIDocument *document = OwnerDoc();
|
||||
document->BindingManager()->RemovedFromDocument(this, document,
|
||||
nsBindingManager::eRunDtor);
|
||||
|
|
Загрузка…
Ссылка в новой задаче