+2013-12-18 Andreas Kling <akling@apple.com>
+
+ Don't waste cycles on zeroing every CascadedProperties::Property.
+ <https://webkit.org/b/125966>
+
+ The CascadedProperties constructor already zeroes out the whole
+ property array. Move the memset() to setDeferred() which is the only
+ other place we create a Property.
+
+ Brought to you by Instruments.app. Profile your code today!
+
+ Reviewed by Antti Koivisto.
+
2013-12-18 Hans Muller <hmuller@adobe.com>
[CSS Shapes] Simplify the BoxShape implementation
CascadedProperties(TextDirection, WritingMode);
struct Property {
- Property();
void apply(StyleResolver&);
CSSPropertyID id;
unsigned StyleResolver::computeMatchedPropertiesHash(const MatchedProperties* properties, unsigned size)
{
-
return StringHasher::hashMemory(properties, sizeof(MatchedProperties) * size);
}
return 0;
}
-StyleResolver::CascadedProperties::Property::Property()
- : id(CSSPropertyInvalid)
- , isPresent(false)
-{
- memset(cssValue, 0, sizeof(cssValue));
-}
-
StyleResolver::CascadedProperties::CascadedProperties(TextDirection direction, WritingMode writingMode)
: m_direction(direction)
, m_writingMode(writingMode)
ASSERT(shouldApplyPropertyInParseOrder(id));
Property property;
+ memset(property.cssValue, 0, sizeof(property.cssValue));
setPropertyInternal(property, id, cssValue, linkMatchType);
m_deferredProperties.append(property);
}