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

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

Issue 2233333002: Made StylePropertySet::setProperty take a const CSSValue& instead of ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 unsigned propertyCount() const { return m_propertyVector.size(); } 195 unsigned propertyCount() const { return m_propertyVector.size(); }
196 196
197 // Returns whether this style set was changed. 197 // Returns whether this style set was changed.
198 bool addParsedProperties(const HeapVector<CSSProperty, 256>&); 198 bool addParsedProperties(const HeapVector<CSSProperty, 256>&);
199 bool addRespectingCascade(const CSSProperty&); 199 bool addRespectingCascade(const CSSProperty&);
200 200
201 // These expand shorthand properties into multiple properties. 201 // These expand shorthand properties into multiple properties.
202 bool setProperty(CSSPropertyID unresolvedProperty, const String& value, bool important = false, StyleSheetContents* contextStyleSheet = 0); 202 bool setProperty(CSSPropertyID unresolvedProperty, const String& value, bool important = false, StyleSheetContents* contextStyleSheet = 0);
203 bool setProperty(const AtomicString& customPropertyName, const String& value , bool important = false, StyleSheetContents* contextStyleSheet = 0); 203 bool setProperty(const AtomicString& customPropertyName, const String& value , bool important = false, StyleSheetContents* contextStyleSheet = 0);
204 // TODO(sashab): Make this take a const CSSValue& 204 void setProperty(CSSPropertyID, const CSSValue&, bool important = false);
205 void setProperty(CSSPropertyID, const CSSValue*, bool important = false);
206 205
207 // These do not. FIXME: This is too messy, we can do better. 206 // These do not. FIXME: This is too messy, we can do better.
208 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals e); 207 bool setProperty(CSSPropertyID, CSSValueID identifier, bool important = fals e);
209 bool setProperty(const CSSProperty&, CSSProperty* slot = 0); 208 bool setProperty(const CSSProperty&, CSSProperty* slot = 0);
210 209
211 template<typename T> // CSSPropertyID or AtomicString 210 template<typename T> // CSSPropertyID or AtomicString
212 bool removeProperty(T property, String* returnText = 0); 211 bool removeProperty(T property, String* returnText = 0);
213 bool removePropertiesInSet(const CSSPropertyID* set, unsigned length); 212 bool removePropertiesInSet(const CSSPropertyID* set, unsigned length);
214 void removeEquivalentProperties(const StylePropertySet*); 213 void removeEquivalentProperties(const StylePropertySet*);
215 void removeEquivalentProperties(const CSSStyleDeclaration*); 214 void removeEquivalentProperties(const CSSStyleDeclaration*);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 inline int StylePropertySet::findPropertyIndex(T property) const 284 inline int StylePropertySet::findPropertyIndex(T property) const
286 { 285 {
287 if (m_isMutable) 286 if (m_isMutable)
288 return toMutableStylePropertySet(this)->findPropertyIndex(property); 287 return toMutableStylePropertySet(this)->findPropertyIndex(property);
289 return toImmutableStylePropertySet(this)->findPropertyIndex(property); 288 return toImmutableStylePropertySet(this)->findPropertyIndex(property);
290 } 289 }
291 290
292 } // namespace blink 291 } // namespace blink
293 292
294 #endif // StylePropertySet_h 293 #endif // StylePropertySet_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/StringKeyframe.cpp ('k') | third_party/WebKit/Source/core/css/StylePropertySet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698