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

Unified Diff: Source/core/inspector/InspectorStyleSheet.h

Issue 216553004: [Oilpan]: Move CSSPropertySourceData, InspectorStyleProperty, CSSStyleSourceData, and CSSRuleSource… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase + plugin finds Created 6 years, 9 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
« no previous file with comments | « Source/core/css/parser/BisonCSSParser-in.cpp ('k') | Source/core/inspector/InspectorStyleSheet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorStyleSheet.h
diff --git a/Source/core/inspector/InspectorStyleSheet.h b/Source/core/inspector/InspectorStyleSheet.h
index 859a66a17ad7d19a1bd0cf2151c472b3fb11d164..f1bd480aaed0003a6e13379499e458cae85ab977 100644
--- a/Source/core/inspector/InspectorStyleSheet.h
+++ b/Source/core/inspector/InspectorStyleSheet.h
@@ -102,6 +102,8 @@ private:
};
struct InspectorStyleProperty {
+ ALLOW_ONLY_INLINE_ALLOCATION();
+public:
explicit InspectorStyleProperty(CSSPropertySourceData sourceData)
: sourceData(sourceData)
, hasSource(true)
@@ -125,6 +127,8 @@ struct InspectorStyleProperty {
bool hasRawText() const { return !rawText.isEmpty(); }
+ void trace(Visitor* visitor) { visitor->trace(sourceData); }
+
CSSPropertySourceData sourceData;
bool hasSource;
String rawText;
@@ -144,9 +148,9 @@ private:
InspectorStyle(const InspectorCSSId&, PassRefPtr<CSSStyleDeclaration>, InspectorStyleSheetBase* parentStyleSheet);
bool verifyPropertyText(const String& propertyText, bool canOmitSemicolon);
- void populateAllProperties(Vector<InspectorStyleProperty>& result) const;
+ void populateAllProperties(WillBeHeapVector<InspectorStyleProperty>& result) const;
PassRefPtr<TypeBuilder::CSS::CSSStyle> styleWithProperties() const;
- PassRefPtr<CSSRuleSourceData> extractSourceData() const;
+ PassRefPtrWillBeRawPtr<CSSRuleSourceData> extractSourceData() const;
bool applyStyleText(const String&);
String shorthandValue(const String& shorthandProperty) const;
NewLineAndWhitespace& newLineAndWhitespaceDelimiters() const;
@@ -196,7 +200,7 @@ protected:
virtual PassRefPtr<InspectorStyle> inspectorStyleForId(const InspectorCSSId&) = 0;
// Also accessed by friend class InspectorStyle.
- virtual PassRefPtr<CSSRuleSourceData> ruleSourceDataFor(CSSStyleDeclaration*) const = 0;
+ virtual PassRefPtrWillBeRawPtr<CSSRuleSourceData> ruleSourceDataFor(CSSStyleDeclaration*) const = 0;
virtual bool ensureParsedDataReady() = 0;
private:
@@ -239,7 +243,7 @@ protected:
virtual PassRefPtr<InspectorStyle> inspectorStyleForId(const InspectorCSSId&) OVERRIDE;
// Also accessed by friend class InspectorStyle.
- virtual PassRefPtr<CSSRuleSourceData> ruleSourceDataFor(CSSStyleDeclaration*) const OVERRIDE;
+ virtual PassRefPtrWillBeRawPtr<CSSRuleSourceData> ruleSourceDataFor(CSSStyleDeclaration*) const OVERRIDE;
virtual bool ensureParsedDataReady() OVERRIDE;
private:
@@ -288,16 +292,16 @@ protected:
// Also accessed by friend class InspectorStyle.
virtual bool ensureParsedDataReady() OVERRIDE;
- virtual PassRefPtr<CSSRuleSourceData> ruleSourceDataFor(CSSStyleDeclaration* style) const OVERRIDE { ASSERT_UNUSED(style, style == inlineStyle()); return m_ruleSourceData; }
+ virtual PassRefPtrWillBeRawPtr<CSSRuleSourceData> ruleSourceDataFor(CSSStyleDeclaration* style) const OVERRIDE { ASSERT_UNUSED(style, style == inlineStyle()); return m_ruleSourceData; }
private:
InspectorStyleSheetForInlineStyle(const String& id, PassRefPtr<Element>, Listener*);
CSSStyleDeclaration* inlineStyle() const;
const String& elementStyleText() const;
- PassRefPtr<CSSRuleSourceData> getStyleAttributeData() const;
+ PassRefPtrWillBeRawPtr<CSSRuleSourceData> getStyleAttributeData() const;
RefPtr<Element> m_element;
- RefPtr<CSSRuleSourceData> m_ruleSourceData;
+ RefPtrWillBePersistent<CSSRuleSourceData> m_ruleSourceData;
RefPtr<InspectorStyle> m_inspectorStyle;
// Contains "style" attribute value.
@@ -308,4 +312,12 @@ private:
} // namespace WebCore
+namespace WTF {
+
+template <> struct VectorTraits<WebCore::InspectorStyleProperty> : VectorTraitsBase<WebCore::InspectorStyleProperty> {
+ static const bool canInitializeWithMemset = true;
+ static const bool canMoveWithMemcpy = true;
+};
+
+}
#endif // !defined(InspectorStyleSheet_h)
« no previous file with comments | « Source/core/css/parser/BisonCSSParser-in.cpp ('k') | Source/core/inspector/InspectorStyleSheet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698