Title: [107699] trunk/Source/WebCore
- Revision
- 107699
- Author
- [email protected]
- Date
- 2012-02-14 03:01:30 -0800 (Tue, 14 Feb 2012)
Log Message
StylePropertySet: Try to find a CSSValuePool for identifier values.
<http://webkit.org/b/78590>
Reviewed by Antti Koivisto.
For StylePropertySets with a parent element (inline and attribute style),
grab at the parentElement()->document() to locate a CSSValuePool.
This code will change soon in the CSSOM refactoring and moreso once we
figure out how to have a global CSSValuePool, but I'm hoping it will buy
us some perf back in the meantime.
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::setProperty):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (107698 => 107699)
--- trunk/Source/WebCore/ChangeLog 2012-02-14 10:54:15 UTC (rev 107698)
+++ trunk/Source/WebCore/ChangeLog 2012-02-14 11:01:30 UTC (rev 107699)
@@ -1,3 +1,19 @@
+2012-02-14 Andreas Kling <[email protected]>
+
+ StylePropertySet: Try to find a CSSValuePool for identifier values.
+ <http://webkit.org/b/78590>
+
+ Reviewed by Antti Koivisto.
+
+ For StylePropertySets with a parent element (inline and attribute style),
+ grab at the parentElement()->document() to locate a CSSValuePool.
+ This code will change soon in the CSSOM refactoring and moreso once we
+ figure out how to have a global CSSValuePool, but I'm hoping it will buy
+ us some perf back in the meantime.
+
+ * css/StylePropertySet.cpp:
+ (WebCore::StylePropertySet::setProperty):
+
2012-02-14 Nikolas Zimmermann <[email protected]>
Convert svg/animations to use SMIL methods for driving the timeline
Modified: trunk/Source/WebCore/css/StylePropertySet.cpp (107698 => 107699)
--- trunk/Source/WebCore/css/StylePropertySet.cpp 2012-02-14 10:54:15 UTC (rev 107698)
+++ trunk/Source/WebCore/css/StylePropertySet.cpp 2012-02-14 11:01:30 UTC (rev 107699)
@@ -30,6 +30,7 @@
#include "CSSStyleSheet.h"
#include "CSSValueKeywords.h"
#include "CSSValueList.h"
+#include "CSSValuePool.h"
#include "Document.h"
#include "ExceptionCode.h"
#include "HTMLNames.h"
@@ -815,10 +816,15 @@
#endif
}
-bool StylePropertySet::setProperty(int propertyID, int value, bool important, bool notifyChanged)
+bool StylePropertySet::setProperty(int propertyID, int identifier, bool important, bool notifyChanged)
{
- CSSProperty property(propertyID, CSSPrimitiveValue::createIdentifier(value), important);
- setProperty(property);
+ RefPtr<CSSPrimitiveValue> value;
+ if (m_parentIsElement && parentElement() && parentElement()->document())
+ value = parentElement()->document()->cssValuePool()->createIdentifierValue(identifier);
+ else
+ value = CSSPrimitiveValue::createIdentifier(identifier);
+
+ setProperty(CSSProperty(propertyID, value.release(), important));
if (notifyChanged)
setNeedsStyleRecalc();
return true;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes