Changeset 148398 in webkit
- Timestamp:
- Apr 14, 2013 9:14:48 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r148397 r148398 1 2013-04-14 Andreas Kling <akling@apple.com> 2 3 Move StylePropertySet::createImmutable() to ImmutableStylePropertySet. 4 <http://webkit.org/b/114584> 5 6 Reviewed by Anders Carlsson. 7 8 StylePropertySet::createImmutable() -> ImmutableStylePropertySet::create() 9 Also, immutableCopyIfNeeded() now returns a PassRefPtr<ImmutableStylePropertySet>. 10 11 * css/CSSParser.cpp: 12 (WebCore::CSSParser::createStylePropertySet): 13 * css/StylePropertySet.cpp: 14 (WebCore::ImmutableStylePropertySet::create): 15 (WebCore::StylePropertySet::immutableCopyIfNeeded): 16 * css/StylePropertySet.h: 17 (StylePropertySet): 18 (ImmutableStylePropertySet): 19 1 20 2013-04-14 Andreas Kling <akling@apple.com> 2 21 -
trunk/Source/WebCore/css/CSSParser.cpp
r148395 r148398 1561 1561 results.remove(0, unusedEntries); 1562 1562 1563 return StylePropertySet::createImmutable(results.data(), results.size(), m_context.mode);1563 return ImmutableStylePropertySet::create(results.data(), results.size(), m_context.mode); 1564 1564 } 1565 1565 -
trunk/Source/WebCore/css/StylePropertySet.cpp
r148397 r148398 69 69 } 70 70 71 PassRefPtr< StylePropertySet> StylePropertySet::createImmutable(const CSSProperty* properties, unsigned count, CSSParserMode cssParserMode)71 PassRefPtr<ImmutableStylePropertySet> ImmutableStylePropertySet::create(const CSSProperty* properties, unsigned count, CSSParserMode cssParserMode) 72 72 { 73 73 void* slot = WTF::fastMalloc(sizeForImmutableStylePropertySetWithPropertyCount(count)); … … 75 75 } 76 76 77 PassRefPtr< StylePropertySet> StylePropertySet::immutableCopyIfNeeded() const77 PassRefPtr<ImmutableStylePropertySet> StylePropertySet::immutableCopyIfNeeded() const 78 78 { 79 79 if (!isMutable()) 80 return const_cast<StylePropertySet*>(this);81 return createImmutable(mutablePropertyVector().data(), mutablePropertyVector().size(), cssParserMode());80 return static_cast<ImmutableStylePropertySet*>(const_cast<StylePropertySet*>(this)); 81 return ImmutableStylePropertySet::create(mutablePropertyVector().data(), mutablePropertyVector().size(), cssParserMode()); 82 82 } 83 83 -
trunk/Source/WebCore/css/StylePropertySet.h
r148397 r148398 51 51 void deref(); 52 52 53 static PassRefPtr<StylePropertySet> createImmutable(const CSSProperty* properties, unsigned count, CSSParserMode);54 55 53 class PropertyReference { 56 54 public: … … 134 132 135 133 PassRefPtr<MutableStylePropertySet> mutableCopy() const; 136 PassRefPtr< StylePropertySet> immutableCopyIfNeeded() const;134 PassRefPtr<ImmutableStylePropertySet> immutableCopyIfNeeded() const; 137 135 138 136 void removeEquivalentProperties(const StylePropertySet*); … … 207 205 class ImmutableStylePropertySet : public StylePropertySet { 208 206 public: 207 ~ImmutableStylePropertySet(); 208 static PassRefPtr<ImmutableStylePropertySet> create(const CSSProperty* properties, unsigned count, CSSParserMode); 209 210 void* m_storage; 211 212 private: 209 213 ImmutableStylePropertySet(const CSSProperty*, unsigned count, CSSParserMode); 210 ~ImmutableStylePropertySet();211 212 void* m_storage;213 214 }; 214 215
Note: See TracChangeset
for help on using the changeset viewer.