[CSS Parser] Make sure the templatized consumeIdent uses CSSValuePool
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Dec 2016 16:32:10 +0000 (16:32 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Dec 2016 16:32:10 +0000 (16:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=165302

Reviewed by Zalan Bujtas.

* css/parser/CSSPropertyParserHelpers.h:
(WebCore::CSSPropertyParserHelpers::consumeIdent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209238 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/parser/CSSPropertyParserHelpers.h

index 05dc8b1..b8b21c0 100644 (file)
@@ -1,5 +1,15 @@
 2016-12-02  Dave Hyatt  <hyatt@apple.com>
 
+        [CSS Parser] Make sure the templatized consumeIdent uses CSSValuePool
+        https://bugs.webkit.org/show_bug.cgi?id=165302
+
+        Reviewed by Zalan Bujtas.
+
+        * css/parser/CSSPropertyParserHelpers.h:
+        (WebCore::CSSPropertyParserHelpers::consumeIdent):
+
+2016-12-02  Dave Hyatt  <hyatt@apple.com>
+
         [CSS Parser] Fix font-variant parsing 
         https://bugs.webkit.org/show_bug.cgi?id=165301
 
index a9ea89b..ab88875 100644 (file)
@@ -35,6 +35,7 @@
 #include "CSSParserTokenRange.h"
 #include "CSSPrimitiveValue.h"
 #include "CSSShadowValue.h"
+#include "CSSValuePool.h"
 #include "Length.h" // For ValueRange
 
 namespace WebCore {
@@ -107,7 +108,7 @@ template<CSSValueID... names> RefPtr<CSSPrimitiveValue> consumeIdent(CSSParserTo
 {
     if (range.peek().type() != IdentToken || !identMatches<names...>(range.peek().id()))
         return nullptr;
-    return CSSPrimitiveValue::createIdentifier(range.consumeIncludingWhitespace().id());
+    return CSSValuePool::singleton().createIdentifierValue(range.consumeIncludingWhitespace().id());
 }
 
 static inline bool isCSSWideKeyword(const CSSValueID& id)