Don't restyle slow selectors for changes to anonymous content (non-native-anonymous). (Bug 436453) r+sr=bzbarsky

This commit is contained in:
L. David Baron
2008-07-22 21:50:20 -07:00
parent 0ac0773b5a
commit b3eb6fb309
2 changed files with 7 additions and 7 deletions

View File

@@ -12949,8 +12949,8 @@ nsCSSFrameConstructor::RestyleForAppend(nsIContent* aContainer,
NS_ASSERTION(index != aNewIndexInContainer, "yikes, nothing appended"); NS_ASSERTION(index != aNewIndexInContainer, "yikes, nothing appended");
break; break;
} }
NS_ASSERTION(!content->IsRootOfNativeAnonymousSubtree(), NS_ASSERTION(!content->IsRootOfAnonymousSubtree(),
"native anonymous nodes should not be in child lists"); "anonymous nodes should not be in child lists");
} }
} }
#endif #endif
@@ -13008,8 +13008,8 @@ void
nsCSSFrameConstructor::RestyleForInsertOrChange(nsIContent* aContainer, nsCSSFrameConstructor::RestyleForInsertOrChange(nsIContent* aContainer,
nsIContent* aChild) nsIContent* aChild)
{ {
NS_ASSERTION(!aChild->IsRootOfNativeAnonymousSubtree(), NS_ASSERTION(!aChild->IsRootOfAnonymousSubtree(),
"native anonymous nodes should not be in child lists"); "anonymous nodes should not be in child lists");
PRUint32 selectorFlags = PRUint32 selectorFlags =
aContainer ? (aContainer->GetFlags() & NODE_ALL_SELECTOR_FLAGS) : 0; aContainer ? (aContainer->GetFlags() & NODE_ALL_SELECTOR_FLAGS) : 0;
if (selectorFlags == 0) if (selectorFlags == 0)
@@ -13089,8 +13089,8 @@ nsCSSFrameConstructor::RestyleForRemove(nsIContent* aContainer,
nsIContent* aOldChild, nsIContent* aOldChild,
PRInt32 aIndexInContainer) PRInt32 aIndexInContainer)
{ {
NS_ASSERTION(!aOldChild->IsRootOfNativeAnonymousSubtree(), NS_ASSERTION(!aOldChild->IsRootOfAnonymousSubtree(),
"native anonymous nodes should not be in child lists"); "anonymous nodes should not be in child lists");
PRUint32 selectorFlags = PRUint32 selectorFlags =
aContainer ? (aContainer->GetFlags() & NODE_ALL_SELECTOR_FLAGS) : 0; aContainer ? (aContainer->GetFlags() & NODE_ALL_SELECTOR_FLAGS) : 0;
if (selectorFlags == 0) if (selectorFlags == 0)

View File

@@ -4635,7 +4635,7 @@ PresShell::CharacterDataChanged(nsIDocument *aDocument,
nsIContent *container = aContent->GetParent(); nsIContent *container = aContent->GetParent();
PRUint32 selectorFlags = PRUint32 selectorFlags =
container ? (container->GetFlags() & NODE_ALL_SELECTOR_FLAGS) : 0; container ? (container->GetFlags() & NODE_ALL_SELECTOR_FLAGS) : 0;
if (selectorFlags != 0 && !aContent->IsRootOfNativeAnonymousSubtree()) { if (selectorFlags != 0 && !aContent->IsRootOfAnonymousSubtree()) {
PRUint32 index; PRUint32 index;
if (aInfo->mAppend && if (aInfo->mAppend &&
container->GetChildAt((index = container->GetChildCount() - 1)) == container->GetChildAt((index = container->GetChildCount() - 1)) ==