Changeset 117902 in webkit
- Timestamp:
- May 21, 2012 10:11:02 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r117899 r117902 1 2012-05-21 Andreas Kling <kling@webkit.org> 2 3 Use stack-allocated BitArray in StylePropertySet serialization. 4 <http://webkit.org/b/87071> 5 6 Reviewed by Anders Carlsson. 7 8 Use BitArray instead of BitVector to track seen properties in StylePropertySet::asText(). 9 This removes two heap allocations from this path. 10 11 * css/StylePropertySet.cpp: 12 (WebCore::StylePropertySet::asText): 13 1 14 2012-05-21 Hajime Morrita <morrita@chromium.org> 2 15 -
trunk/Source/WebCore/css/StylePropertySet.cpp
r117809 r117902 31 31 #include "PropertySetCSSStyleDeclaration.h" 32 32 #include "StylePropertyShorthand.h" 33 #include <wtf/Bit Vector.h>33 #include <wtf/BitArray.h> 34 34 #include <wtf/text/StringBuilder.h> 35 35 … … 592 592 const CSSProperty* repeatYProp = 0; 593 593 594 // FIXME: Stack-allocate the buffer for these BitVectors. 595 BitVector shorthandPropertyUsed; 596 BitVector shorthandPropertyAppeared; 594 BitArray<numCSSProperties> shorthandPropertyUsed; 595 BitArray<numCSSProperties> shorthandPropertyAppeared; 597 596 598 597 unsigned size = m_properties.size(); … … 640 639 value = borderPropertyValue(ReturnNullOnUncommonValues); 641 640 if (value.isNull()) 642 shorthandPropertyAppeared. ensureSizeAndSet(CSSPropertyBorder - firstCSSProperty, numCSSProperties);641 shorthandPropertyAppeared.set(CSSPropertyBorder - firstCSSProperty); 643 642 else 644 643 shorthandPropertyID = CSSPropertyBorder; … … 737 736 if (!shorthandPropertyAppeared.get(shortPropertyIndex) && value.isNull()) 738 737 value = getPropertyValue(shorthandPropertyID); 739 shorthandPropertyAppeared. ensureSizeAndSet(shortPropertyIndex, numCSSProperties);738 shorthandPropertyAppeared.set(shortPropertyIndex); 740 739 } 741 740 742 741 if (!value.isNull()) { 743 742 propertyID = shorthandPropertyID; 744 shorthandPropertyUsed. ensureSizeAndSet(shortPropertyIndex, numCSSProperties);743 shorthandPropertyUsed.set(shortPropertyIndex); 745 744 } else 746 745 value = prop.value()->cssText();
Note: See TracChangeset
for help on using the changeset viewer.