I plan to cache some more values per document, so the "Primitive" won't apply anymore. Furthermore, as pointed out by Antti, it's more of a Pool than a Cache, so let's rename it accordingly.
Created attachment 117755 [details] Proposed patch
Attachment 117755 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/CMakeLists.txt', u'Source/W..." exit_code: 1 Source/WebCore/css/CSSValuePool.cpp:27: You should add a blank line after implementation file's own header. [build/include_order] [4] Source/WebCore/css/CSSValuePool.cpp:95: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Source/WebCore/css/CSSValuePool.cpp:100: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Source/WebCore/css/CSSValuePool.cpp:105: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 4 in 16 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 117755 [details] Proposed patch Attachment 117755 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10728326 New failing tests: svg/custom/linking-uri-01-b.svg
Comment on attachment 117755 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=117755&action=review r=me > Source/WebCore/css/CSSValuePool.h:53 > + typedef HashMap<int, RefPtr<CSSPrimitiveValue> > IdentifierValueCache; > + IdentifierValueCache m_identifierValueCache; > + > + typedef HashMap<unsigned, RefPtr<CSSPrimitiveValue> > ColorValueCache; > + ColorValueCache m_colorValueCache; These should be renamed too at some point.
Committed r101932: <http://trac.webkit.org/changeset/101932>