Index: Source/core/css/resolver/StyleResolver.cpp |
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp |
index 3754cd85545ea9d655a968004e3ca022caa2c081..5ae53389b27a0fb240118569ffed58d6ce4b8604 100644 |
--- a/Source/core/css/resolver/StyleResolver.cpp |
+++ b/Source/core/css/resolver/StyleResolver.cpp |
@@ -880,7 +880,9 @@ PassRefPtr<PseudoElement> StyleResolver::createPseudoElementIfNeeded(Element& pa |
if (pseudoId == BACKDROP && !parent.isInTopLayer()) |
return 0; |
- if (!parentRenderer->canHaveGeneratedChildren()) |
+ // It's safe to have a backdrop since its renderer is always a child of RenderView. |
+ ASSERT(static_cast<RenderObject*>(parentRenderer->view())->canHaveGeneratedChildren()); |
+ if (pseudoId != BACKDROP && !parentRenderer->canHaveGeneratedChildren()) |
return 0; |
RenderStyle* parentStyle = parentRenderer->style(); |