Index: Source/core/css/resolver/StyleResolver.cpp |
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp |
index e1db3dd6d754f30ebefbfdfc04b2668486223516..c0aa3eb11c2607cb41bc8fc677f7934f97f4f48a 100644 |
--- a/Source/core/css/resolver/StyleResolver.cpp |
+++ b/Source/core/css/resolver/StyleResolver.cpp |
@@ -539,6 +539,7 @@ void StyleResolver::loadPendingResources(StyleResolverState& state) |
PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderStyle* defaultParent, StyleSharingBehavior sharingBehavior, |
RuleMatchingBehavior matchingBehavior) |
{ |
+ ASSERT(element); |
ASSERT(document().frame()); |
ASSERT(document().settings()); |
ASSERT(!hasPendingAuthorStyleSheets()); |
@@ -861,6 +862,7 @@ PassRefPtr<RenderStyle> StyleResolver::pseudoStyleForElement(Element* element, c |
PassRefPtr<RenderStyle> StyleResolver::styleForPage(int pageIndex) |
{ |
ASSERT(!hasPendingAuthorStyleSheets()); |
+ ASSERT(document().documentElement()); |
StyleResolverState state(document(), document().documentElement()); // m_rootElementStyle will be set to the document style. |
RefPtr<RenderStyle> style = RenderStyle::create(); |
@@ -1556,6 +1558,7 @@ void StyleResolver::printStats() |
void StyleResolver::applyPropertiesToStyle(const CSSPropertyValue* properties, size_t count, RenderStyle* style) |
{ |
+ ASSERT(document().documentElement()); |
StyleResolverState state(document(), document().documentElement(), style); |
state.setStyle(style); |