Changeset 148404 in webkit


Ignore:
Timestamp:
Apr 14, 2013 10:56:35 AM (11 years ago)
Author:
akling@apple.com
Message:

Specialize propertyCount() in StylePropertySet subclasses.
<http://webkit.org/b/114590>

Reviewed by Antti Koivisto.

Avoid branching on m_isMutable in code that already knows which type of set it is.

  • css/StylePropertySet.h:

(WebCore::ImmutableStylePropertySet::propertyCount):
(ImmutableStylePropertySet):
(WebCore::MutableStylePropertySet::propertyCount):
(MutableStylePropertySet):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r148403 r148404  
     12013-04-14  Andreas Kling  <akling@apple.com>
     2
     3        Specialize propertyCount() in StylePropertySet subclasses.
     4        <http://webkit.org/b/114590>
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Avoid branching on m_isMutable in code that already knows which type of set it is.
     9
     10        * css/StylePropertySet.h:
     11        (WebCore::ImmutableStylePropertySet::propertyCount):
     12        (ImmutableStylePropertySet):
     13        (WebCore::MutableStylePropertySet::propertyCount):
     14        (MutableStylePropertySet):
     15
    1162013-04-14  Andreas Kling  <akling@apple.com>
    217
  • trunk/Source/WebCore/css/StylePropertySet.h

    r148403 r148404  
    183183    static PassRefPtr<ImmutableStylePropertySet> create(const CSSProperty* properties, unsigned count, CSSParserMode);
    184184
     185    unsigned propertyCount() const { return m_arraySize; }
     186
    185187    void* m_storage;
    186188
     
    207209
    208210    MutableStylePropertySet(const StylePropertySet&);
     211
     212    unsigned propertyCount() const { return m_propertyVector.size(); }
    209213
    210214    void addParsedProperties(const Vector<CSSProperty>&);
Note: See TracChangeset for help on using the changeset viewer.