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:
@@ -66,6 +66,7 @@
|
|||||||
#include "nsLayoutErrors.h"
|
#include "nsLayoutErrors.h"
|
||||||
#include "nsDisplayList.h"
|
#include "nsDisplayList.h"
|
||||||
#include "nsContentErrors.h"
|
#include "nsContentErrors.h"
|
||||||
|
#include "nsIEventStateManager.h"
|
||||||
|
|
||||||
#ifdef NS_DEBUG
|
#ifdef NS_DEBUG
|
||||||
#undef NOISY
|
#undef NOISY
|
||||||
@@ -126,6 +127,9 @@ CleanupGeneratedContentIn(nsIContent* aRealContent, nsIFrame* aRoot) {
|
|||||||
while (child) {
|
while (child) {
|
||||||
nsIContent* content = child->GetContent();
|
nsIContent* content = child->GetContent();
|
||||||
if (content && content != aRealContent) {
|
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();
|
content->UnbindFromTree();
|
||||||
}
|
}
|
||||||
::CleanupGeneratedContentIn(aRealContent, child);
|
::CleanupGeneratedContentIn(aRealContent, child);
|
||||||
|
|||||||
Reference in New Issue
Block a user