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

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

Issue 1320013005: Make CSSParserMode parameter not optional for MutableStylePropertySet::create() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 3 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/FontFaceSet.cpp ('k') | Source/core/css/parser/CSSParser.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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 inline const StylePropertyMetadata* ImmutableStylePropertySet::metadataArray() c onst 179 inline const StylePropertyMetadata* ImmutableStylePropertySet::metadataArray() c onst
180 { 180 {
181 return reinterpret_cast<const StylePropertyMetadata*>(&reinterpret_cast<cons t char*>(&(this->m_storage))[m_arraySize * sizeof(RawPtrWillBeMember<CSSValue>)] ); 181 return reinterpret_cast<const StylePropertyMetadata*>(&reinterpret_cast<cons t char*>(&(this->m_storage))[m_arraySize * sizeof(RawPtrWillBeMember<CSSValue>)] );
182 } 182 }
183 183
184 DEFINE_TYPE_CASTS(ImmutableStylePropertySet, StylePropertySet, set, !set->isMuta ble(), !set.isMutable()); 184 DEFINE_TYPE_CASTS(ImmutableStylePropertySet, StylePropertySet, set, !set->isMuta ble(), !set.isMutable());
185 185
186 class CORE_EXPORT MutableStylePropertySet : public StylePropertySet { 186 class CORE_EXPORT MutableStylePropertySet : public StylePropertySet {
187 public: 187 public:
188 ~MutableStylePropertySet() { } 188 ~MutableStylePropertySet() { }
189 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(CSSParserMode = HTMLQuirksMode); 189 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(CSSParserMode) ;
190 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(const CSSPrope rty* properties, unsigned count); 190 static PassRefPtrWillBeRawPtr<MutableStylePropertySet> create(const CSSPrope rty* properties, unsigned count);
191 191
192 unsigned propertyCount() const { return m_propertyVector.size(); } 192 unsigned propertyCount() const { return m_propertyVector.size(); }
193 193
194 // Returns whether this style set was changed. 194 // Returns whether this style set was changed.
195 bool addParsedProperties(const WillBeHeapVector<CSSProperty, 256>&); 195 bool addParsedProperties(const WillBeHeapVector<CSSProperty, 256>&);
196 bool addRespectingCascade(const CSSProperty&); 196 bool addRespectingCascade(const CSSProperty&);
197 197
198 // These expand shorthand properties into multiple properties. 198 // These expand shorthand properties into multiple properties.
199 bool setProperty(CSSPropertyID unresolvedProperty, const String& value, bool important = false, StyleSheetContents* contextStyleSheet = 0); 199 bool setProperty(CSSPropertyID unresolvedProperty, const String& value, bool important = false, StyleSheetContents* contextStyleSheet = 0);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const 291 inline int StylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const
292 { 292 {
293 if (m_isMutable) 293 if (m_isMutable)
294 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID); 294 return toMutableStylePropertySet(this)->findPropertyIndex(propertyID);
295 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID); 295 return toImmutableStylePropertySet(this)->findPropertyIndex(propertyID);
296 } 296 }
297 297
298 } // namespace blink 298 } // namespace blink
299 299
300 #endif // StylePropertySet_h 300 #endif // StylePropertySet_h
OLDNEW
« no previous file with comments | « Source/core/css/FontFaceSet.cpp ('k') | Source/core/css/parser/CSSParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698