Index: Source/core/css/CSSStyleSheet.cpp |
diff --git a/Source/core/css/CSSStyleSheet.cpp b/Source/core/css/CSSStyleSheet.cpp |
index 6fda90bfab319e8fcf684a2291da58ab170e16ef..63bdd1ec1df573baba018b70709214516dbe47c9 100644 |
--- a/Source/core/css/CSSStyleSheet.cpp |
+++ b/Source/core/css/CSSStyleSheet.cpp |
@@ -404,16 +404,27 @@ void CSSStyleSheet::clearChildRuleCSSOMWrappers() |
bool CSSStyleSheet::sheetLoaded() |
{ |
ASSERT(m_ownerNode); |
- m_loadCompleted = m_ownerNode->sheetLoaded(); |
+ setLoadCompleted(m_ownerNode->sheetLoaded()); |
return m_loadCompleted; |
} |
void CSSStyleSheet::startLoadingDynamicSheet() |
{ |
- m_loadCompleted = false; |
+ setLoadCompleted(false); |
m_ownerNode->startLoadingDynamicSheet(); |
} |
+void CSSStyleSheet::setLoadCompleted(bool completed) |
+{ |
+ if (completed != m_loadCompleted) { |
tasak
2014/03/13 01:29:31
Nit: I think, blink loves early return.
Mads Ager (chromium)
2014/03/13 09:08:23
Done.
|
+ m_loadCompleted = completed; |
+ if (completed) |
+ m_contents->clientLoadCompleted(this); |
+ else |
+ m_contents->clientLoadStarted(this); |
+ } |
+} |
+ |
void CSSStyleSheet::trace(Visitor* visitor) |
{ |
visitor->trace(m_contents); |