Index: Source/core/dom/Element.cpp |
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
index 7f7a9a06ab6a6cc3ac920dbf1a2572a23eb3d8a8..04efa32033cf007e153f2f7d5487304d5665421c 100644 |
--- a/Source/core/dom/Element.cpp |
+++ b/Source/core/dom/Element.cpp |
@@ -237,7 +237,9 @@ bool Element::rendererIsFocusable() const |
// We can't just use needsStyleRecalc() because if the node is in a |
// display:none tree it might say it needs style recalc but the whole |
// document is actually up to date. |
- ASSERT(!document().childNeedsStyleRecalc()); |
+ // In addition, style cannot be cleared out for non-active documents, |
+ // so in that case the childNeedsStyleRecalc check is invalid. |
+ ASSERT(!document().isActive() || !document().childNeedsStyleRecalc()); |
} |
// FIXME: Even if we are not visible, we might have a child that is visible. |