Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(682)

Unified Diff: Source/core/inspector/InspectorCSSAgent.cpp

Issue 323043002: Oilpan: Prepare moving InspectorAgent related classes to oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorCSSAgent.cpp
diff --git a/Source/core/inspector/InspectorCSSAgent.cpp b/Source/core/inspector/InspectorCSSAgent.cpp
index 64f87393acd6c6b5209bb7bd9bfbc4a29c58c776..7cb7ce8ae0896472b4be8a175670cba6ad06e199 100644
--- a/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/Source/core/inspector/InspectorCSSAgent.cpp
@@ -193,8 +193,14 @@ public:
m_text = other->m_text;
}
+ virtual void trace(Visitor* visitor) OVERRIDE
+ {
+ visitor->trace(m_styleSheet);
+ InspectorCSSAgent::StyleSheetAction::trace(visitor);
+ }
+
private:
- RefPtr<InspectorStyleSheetBase> m_styleSheet;
+ RefPtrWillBeMember<InspectorStyleSheetBase> m_styleSheet;
String m_text;
String m_oldText;
};
@@ -249,8 +255,14 @@ public:
m_text = other->m_text;
}
+ virtual void trace(Visitor* visitor) OVERRIDE
+ {
+ visitor->trace(m_styleSheet);
+ InspectorCSSAgent::StyleSheetAction::trace(visitor);
+ }
+
private:
- RefPtr<InspectorStyleSheetBase> m_styleSheet;
+ RefPtrWillBeMember<InspectorStyleSheetBase> m_styleSheet;
InspectorCSSId m_cssId;
unsigned m_propertyIndex;
String m_text;
@@ -287,8 +299,14 @@ public:
return m_styleSheet->setRuleSelector(m_cssId, m_selector, exceptionState);
}
+ virtual void trace(Visitor* visitor) OVERRIDE
+ {
+ visitor->trace(m_styleSheet);
+ InspectorCSSAgent::StyleSheetAction::trace(visitor);
+ }
+
private:
- RefPtr<InspectorStyleSheet> m_styleSheet;
+ RefPtrWillBeMember<InspectorStyleSheet> m_styleSheet;
InspectorCSSId m_cssId;
String m_selector;
String m_oldSelector;
@@ -325,8 +343,14 @@ public:
InspectorCSSId newRuleId() { return m_newId; }
+ virtual void trace(Visitor* visitor) OVERRIDE
+ {
+ visitor->trace(m_styleSheet);
+ InspectorCSSAgent::StyleSheetAction::trace(visitor);
+ }
+
private:
- RefPtr<InspectorStyleSheet> m_styleSheet;
+ RefPtrWillBeMember<InspectorStyleSheet> m_styleSheet;
InspectorCSSId m_newId;
String m_selector;
String m_oldSelector;
@@ -600,7 +624,7 @@ void InspectorCSSAgent::getMediaQueries(ErrorString* errorString, RefPtr<TypeBui
{
medias = TypeBuilder::Array<TypeBuilder::CSS::CSSMedia>::create();
for (IdToInspectorStyleSheet::iterator it = m_idToInspectorStyleSheet.begin(); it != m_idToInspectorStyleSheet.end(); ++it) {
- RefPtr<InspectorStyleSheet> styleSheet = it->value;
+ RefPtrWillBeRawPtr<InspectorStyleSheet> styleSheet = it->value;
collectMediaQueriesFromStyleSheet(styleSheet->pageStyleSheet(), medias.get());
const CSSRuleVector& flatRules = styleSheet->flatRules();
for (unsigned i = 0; i < flatRules.size(); ++i) {
@@ -1113,7 +1137,7 @@ InspectorStyleSheetForInlineStyle* InspectorCSSAgent::asInspectorStyleSheet(Elem
return 0;
String newStyleSheetId = String::number(m_lastStyleSheetId++);
- RefPtr<InspectorStyleSheetForInlineStyle> inspectorStyleSheet = InspectorStyleSheetForInlineStyle::create(newStyleSheetId, element, this);
+ RefPtrWillBeRawPtr<InspectorStyleSheetForInlineStyle> inspectorStyleSheet = InspectorStyleSheetForInlineStyle::create(newStyleSheetId, element, this);
m_idToInspectorStyleSheetForInlineStyle.set(newStyleSheetId, inspectorStyleSheet);
m_nodeToInspectorStyleSheet.set(element, inspectorStyleSheet);
return inspectorStyleSheet.get();
@@ -1159,7 +1183,7 @@ void InspectorCSSAgent::collectStyleSheets(CSSStyleSheet* styleSheet, WillBeHeap
InspectorStyleSheet* InspectorCSSAgent::bindStyleSheet(CSSStyleSheet* styleSheet)
{
- RefPtr<InspectorStyleSheet> inspectorStyleSheet = m_cssStyleSheetToInspectorStyleSheet.get(styleSheet);
+ RefPtrWillBeRawPtr<InspectorStyleSheet> inspectorStyleSheet = m_cssStyleSheetToInspectorStyleSheet.get(styleSheet);
if (!inspectorStyleSheet) {
String id = String::number(m_lastStyleSheetId++);
Document* document = styleSheet->ownerDocument();
@@ -1191,7 +1215,7 @@ InspectorStyleSheet* InspectorCSSAgent::viaInspectorStyleSheet(Document* documen
if (!document->isHTMLDocument() && !document->isSVGDocument())
return 0;
- RefPtr<InspectorStyleSheet> inspectorStyleSheet = m_documentToViaInspectorStyleSheet.get(document);
+ RefPtrWillBeRawPtr<InspectorStyleSheet> inspectorStyleSheet = m_documentToViaInspectorStyleSheet.get(document);
if (inspectorStyleSheet || !createIfAbsent)
return inspectorStyleSheet.get();
@@ -1413,9 +1437,12 @@ void InspectorCSSAgent::trace(Visitor* visitor)
visitor->trace(m_domAgent);
visitor->trace(m_pageAgent);
visitor->trace(m_resourceAgent);
+ visitor->trace(m_idToInspectorStyleSheet);
+ visitor->trace(m_idToInspectorStyleSheetForInlineStyle);
visitor->trace(m_cssStyleSheetToInspectorStyleSheet);
visitor->trace(m_documentToCSSStyleSheets);
visitor->trace(m_invalidatedDocuments);
+ visitor->trace(m_nodeToInspectorStyleSheet);
visitor->trace(m_documentToViaInspectorStyleSheet);
visitor->trace(m_inspectorUserAgentStyleSheet);
InspectorBaseAgent::trace(visitor);

Powered by Google App Engine
This is Rietveld 408576698