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

Side by Side Diff: Source/core/css/StylePropertySet.h

Issue 184853009: Revert of Move all RefPtr's to CSSValue to oilpan transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/css/StylePropertySerializer.cpp ('k') | Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } 175 }
176 176
177 class MutableStylePropertySet : public StylePropertySet { 177 class MutableStylePropertySet : public StylePropertySet {
178 public: 178 public:
179 ~MutableStylePropertySet() { } 179 ~MutableStylePropertySet() { }
180 static PassRefPtr<MutableStylePropertySet> create(CSSParserMode = HTMLQuirks Mode); 180 static PassRefPtr<MutableStylePropertySet> create(CSSParserMode = HTMLQuirks Mode);
181 static PassRefPtr<MutableStylePropertySet> create(const CSSProperty* propert ies, unsigned count); 181 static PassRefPtr<MutableStylePropertySet> create(const CSSProperty* propert ies, unsigned count);
182 182
183 unsigned propertyCount() const { return m_propertyVector.size(); } 183 unsigned propertyCount() const { return m_propertyVector.size(); }
184 184
185 void addParsedProperties(const WillBeHeapVector<CSSProperty, 256>&); 185 void addParsedProperties(const Vector<CSSProperty, 256>&);
186 void addParsedProperty(const CSSProperty&); 186 void addParsedProperty(const CSSProperty&);
187 187
188 // These expand shorthand properties into multiple properties. 188 // These expand shorthand properties into multiple properties.
189 bool setProperty(CSSPropertyID, const String& value, bool important = false, StyleSheetContents* contextStyleSheet = 0); 189 bool setProperty(CSSPropertyID, const String& value, bool important = false, StyleSheetContents* contextStyleSheet = 0);
190 void setProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>, bool impor tant = false); 190 void setProperty(CSSPropertyID, PassRefPtrWillBeRawPtr<CSSValue>, bool impor tant = false);
191 191
192 // These do not. FIXME: This is too messy, we can do better. 192 // These do not. FIXME: This is too messy, we can do better.
193 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals e); 193 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals e);
194 bool setProperty(CSSPropertyID, CSSPropertyID identifier, bool important = f alse); 194 bool setProperty(CSSPropertyID, CSSPropertyID identifier, bool important = f alse);
195 void appendPrefixingVariantProperty(const CSSProperty&); 195 void appendPrefixingVariantProperty(const CSSProperty&);
(...skipping 19 matching lines...) Expand all
215 explicit MutableStylePropertySet(CSSParserMode); 215 explicit MutableStylePropertySet(CSSParserMode);
216 explicit MutableStylePropertySet(const StylePropertySet&); 216 explicit MutableStylePropertySet(const StylePropertySet&);
217 MutableStylePropertySet(const CSSProperty* properties, unsigned count); 217 MutableStylePropertySet(const CSSProperty* properties, unsigned count);
218 218
219 bool removeShorthandProperty(CSSPropertyID); 219 bool removeShorthandProperty(CSSPropertyID);
220 CSSProperty* findCSSPropertyWithID(CSSPropertyID); 220 CSSProperty* findCSSPropertyWithID(CSSPropertyID);
221 OwnPtr<PropertySetCSSStyleDeclaration> m_cssomWrapper; 221 OwnPtr<PropertySetCSSStyleDeclaration> m_cssomWrapper;
222 222
223 friend class StylePropertySet; 223 friend class StylePropertySet;
224 224
225 WillBePersistentHeapVector<CSSProperty, 4> m_propertyVector; 225 Vector<CSSProperty, 4> m_propertyVector;
226 }; 226 };
227 227
228 DEFINE_TYPE_CASTS(MutableStylePropertySet, StylePropertySet, set, set->isMutable (), set.isMutable()); 228 DEFINE_TYPE_CASTS(MutableStylePropertySet, StylePropertySet, set, set->isMutable (), set.isMutable());
229 229
230 inline MutableStylePropertySet* toMutableStylePropertySet(const RefPtr<StyleProp ertySet>& set) 230 inline MutableStylePropertySet* toMutableStylePropertySet(const RefPtr<StyleProp ertySet>& set)
231 { 231 {
232 return toMutableStylePropertySet(set.get()); 232 return toMutableStylePropertySet(set.get());
233 } 233 }
234 234
235 inline const StylePropertyMetadata& StylePropertySet::PropertyReference::propert yMetadata() const 235 inline const StylePropertyMetadata& StylePropertySet::PropertyReference::propert yMetadata() const
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const 272 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const
273 { 273 {
274 if (m_isMutable) 274 if (m_isMutable)
275 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID); 275 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID);
276 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID); 276 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID);
277 } 277 }
278 278
279 } // namespace WebCore 279 } // namespace WebCore
280 280
281 #endif // StylePropertySet_h 281 #endif // StylePropertySet_h
OLDNEW
« no previous file with comments | « Source/core/css/StylePropertySerializer.cpp ('k') | Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698