Title: [160817] trunk/Source/WebCore
- Revision
- 160817
- Author
- akl...@apple.com
- Date
- 2013-12-18 18:29:41 -0800 (Wed, 18 Dec 2013)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (160816 => 160817)
--- trunk/Source/WebCore/ChangeLog 2013-12-19 02:22:32 UTC (rev 160816)
+++ trunk/Source/WebCore/ChangeLog 2013-12-19 02:29:41 UTC (rev 160817)
@@ -1,3 +1,16 @@
+2013-12-18 Andreas Kling <akl...@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 <hmul...@adobe.com>
[CSS Shapes] Simplify the BoxShape implementation
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (160816 => 160817)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2013-12-19 02:22:32 UTC (rev 160816)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2013-12-19 02:29:41 UTC (rev 160817)
@@ -196,7 +196,6 @@
CascadedProperties(TextDirection, WritingMode);
struct Property {
- Property();
void apply(StyleResolver&);
CSSPropertyID id;
@@ -1667,7 +1666,6 @@
unsigned StyleResolver::computeMatchedPropertiesHash(const MatchedProperties* properties, unsigned size)
{
-
return StringHasher::hashMemory(properties, sizeof(MatchedProperties) * size);
}
@@ -4192,13 +4190,6 @@
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)
@@ -4241,6 +4232,7 @@
ASSERT(shouldApplyPropertyInParseOrder(id));
Property property;
+ memset(property.cssValue, 0, sizeof(property.cssValue));
setPropertyInternal(property, id, cssValue, linkMatchType);
m_deferredProperties.append(property);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes