Backed out changeset 64c4562813fa (bug 1460101) for debug crashtest failures on crashtests/626014.xhtml

This commit is contained in:
Brindusan Cristian 2018-05-15 01:45:09 +03:00
Родитель d41b1026dc
Коммит 6e227ff5dc
1 изменённых файлов: 4 добавлений и 14 удалений

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

@ -5392,25 +5392,15 @@ EventStateManager::ContentRemoved(nsIDocument* aDocument, nsIContent* aContent)
if (fm)
fm->ContentRemoved(aDocument, aContent);
if (aContent->IsElement() &&
aContent->AsElement()->State().HasState(NS_EVENT_STATE_HOVER)) {
MOZ_ASSERT(mHoverContent);
// XBL Likes to unbind content without notifying, thus the
// NODE_IS_ANONYMOUS_ROOT check...
MOZ_ASSERT(nsContentUtils::ContentIsFlattenedTreeDescendantOf(mHoverContent,
aContent) ||
mHoverContent->SubtreeRoot()->HasFlag(NODE_IS_ANONYMOUS_ROOT));
if (mHoverContent &&
nsContentUtils::ContentIsFlattenedTreeDescendantOf(mHoverContent, aContent)) {
// Since hover is hierarchical, set the current hover to the
// content's parent node.
SetContentState(aContent->GetFlattenedTreeParent(), NS_EVENT_STATE_HOVER);
}
if (aContent->IsElement() &&
aContent->AsElement()->State().HasState(NS_EVENT_STATE_ACTIVE)) {
MOZ_ASSERT(mActiveContent);
MOZ_ASSERT(nsContentUtils::ContentIsFlattenedTreeDescendantOf(mActiveContent,
aContent) ||
mHoverContent->SubtreeRoot()->HasFlag(NODE_IS_ANONYMOUS_ROOT));
if (mActiveContent &&
nsContentUtils::ContentIsFlattenedTreeDescendantOf(mActiveContent, aContent)) {
// Active is hierarchical, so set the current active to the
// content's parent node.
SetContentState(aContent->GetFlattenedTreeParent(), NS_EVENT_STATE_ACTIVE);