When cleaning up anonymous content, let the ESM know; that way if any of it is

:hover or :active the state will be updated accordingly.  Bug 314346, r+sr=roc
This commit is contained in:
bzbarsky@mit.edu
2006-08-29 22:00:26 +00:00
parent 62253c5a45
commit a72bbbcd60

View File

@@ -66,6 +66,7 @@
#include "nsLayoutErrors.h"
#include "nsDisplayList.h"
#include "nsContentErrors.h"
#include "nsIEventStateManager.h"
#ifdef NS_DEBUG
#undef NOISY
@@ -126,6 +127,9 @@ CleanupGeneratedContentIn(nsIContent* aRealContent, nsIFrame* aRoot) {
while (child) {
nsIContent* content = child->GetContent();
if (content && content != aRealContent) {
// Tell the ESM that this content is going away now, so it'll update
// its hover content, etc.
aRoot->GetPresContext()->EventStateManager()->ContentRemoved(content);
content->UnbindFromTree();
}
::CleanupGeneratedContentIn(aRealContent, child);