diff options
Diffstat (limited to 'WebCore/inspector/InspectorCSSStore.cpp')
-rw-r--r-- | WebCore/inspector/InspectorCSSStore.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/WebCore/inspector/InspectorCSSStore.cpp b/WebCore/inspector/InspectorCSSStore.cpp index d098230..16d2508 100644 --- a/WebCore/inspector/InspectorCSSStore.cpp +++ b/WebCore/inspector/InspectorCSSStore.cpp @@ -81,7 +81,7 @@ void InspectorCSSStore::removeDocument(Document* doc) m_documentNodeToInspectorStyleSheetMap.remove(doc); } -CSSStyleSheet* InspectorCSSStore::inspectorStyleSheet(Document* ownerDocument, bool createIfAbsent, long callId) +CSSStyleSheet* InspectorCSSStore::inspectorStyleSheet(Document* ownerDocument, bool createIfAbsent) { DocumentToStyleSheetMap::iterator it = m_documentNodeToInspectorStyleSheetMap.find(ownerDocument); if (it != m_documentNodeToInspectorStyleSheetMap.end()) @@ -94,16 +94,12 @@ CSSStyleSheet* InspectorCSSStore::inspectorStyleSheet(Document* ownerDocument, b styleElement->setAttribute("type", "text/css", ec); if (!ec) ownerDocument->head()->appendChild(styleElement, ec); - if (ec) { - m_inspectorController->remoteInspectorFrontend()->didAddRule(callId, InspectorValue::null(), false); + if (ec) return 0; - } StyleSheetList* styleSheets = ownerDocument->styleSheets(); StyleSheet* styleSheet = styleSheets->item(styleSheets->length() - 1); - if (!styleSheet->isCSSStyleSheet()) { - m_inspectorController->remoteInspectorFrontend()->didAddRule(callId, InspectorValue::null(), false); + if (!styleSheet->isCSSStyleSheet()) return 0; - } CSSStyleSheet* inspectorStyleSheet = static_cast<CSSStyleSheet*>(styleSheet); m_documentNodeToInspectorStyleSheetMap.set(ownerDocument, inspectorStyleSheet); return inspectorStyleSheet; |