Make CSSValuePool share values globally.
authorkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2012 00:44:20 +0000 (00:44 +0000)
committerkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Apr 2012 00:44:20 +0000 (00:44 +0000)
<http://webkit.org/b/77700>

Reviewed by Antti Koivisto.

Remove the per-Document CSSValuePool and have everyone use a global pool
accessed via "CSSValuePool& cssValuePool()".

This reduces memory usage by sharing cached CSSValues between all documents,
and relaxes heap churn since the common, persistenly cached values are held
by CSSValuePool forever.

No behavior change thanks to r113588 which introduced a mechanism that makes
sure we never expose internal CSSValue objects to bindings, but read-only
clones of those values.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForNinePieceImageSlice):
(WebCore::valueForNinePieceImageQuad):
(WebCore::valueForNinePieceImageRepeat):
(WebCore::valueForNinePieceImage):
(WebCore::zoomAdjustedPixelValue):
(WebCore::zoomAdjustedNumberValue):
(WebCore::zoomAdjustedPixelValueForLength):
(WebCore::valueForReflection):
(WebCore::getPositionOffsetValue):
(WebCore::CSSComputedStyleDeclaration::currentColorOrValidColor):
(WebCore::getBorderRadiusCornerValues):
(WebCore::getBorderRadiusCornerValue):
(WebCore::getBorderRadiusShorthandValue):
(WebCore::computedTransform):
(WebCore::CSSComputedStyleDeclaration::valueForCustomFilterNumberParameter):
(WebCore::CSSComputedStyleDeclaration::valueForFilter):
(WebCore::valueForGridTrackBreadth):
(WebCore::valueForGridTrackList):
(WebCore::valueForGridPosition):
(WebCore::getDelayValue):
(WebCore::getDurationValue):
(WebCore::createLineBoxContainValue):
(WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword):
(WebCore::CSSComputedStyleDeclaration::valueForShadow):
(WebCore::valueForFamily):
(WebCore::renderUnicodeBidiFlagsToCSSValue):
(WebCore::renderTextDecorationFlagsToCSSValue):
(WebCore::fillRepeatToCSSValue):
(WebCore::fillSizeToCSSValue):
(WebCore::contentToCSSValue):
(WebCore::counterToCSSValue):
(WebCore::fontFamilyFromStyle):
(WebCore::lineHeightFromStyle):
(WebCore::fontSizeFromStyle):
(WebCore::fontStyleFromStyle):
(WebCore::fontVariantFromStyle):
(WebCore::fontWeightFromStyle):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSComputedStyleDeclaration.h:
(WebCore):
* css/CSSParser.cpp:
(WebCore::parseColorValue):
(WebCore::parseSimpleLengthValue):
(WebCore::parseKeywordValue):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::setStyleSheet):
(WebCore::CSSParser::createPrimitiveNumericValue):
(WebCore::CSSParser::createPrimitiveStringValue):
(WebCore::CSSParser::parseValidPrimitive):
(WebCore::parseBackgroundClip):
(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parseAnimationShorthand):
(WebCore::CSSParser::parseTransitionShorthand):
(WebCore::CSSParser::parseShorthand):
(WebCore::CSSParser::parsePage):
(WebCore::CSSParser::parseSizeParameter):
(WebCore::CSSParser::parseContent):
(WebCore::CSSParser::parseAttr):
(WebCore::CSSParser::parseBackgroundColor):
(WebCore::CSSParser::parseFillImage):
(WebCore::CSSParser::parseFillPositionX):
(WebCore::CSSParser::parseFillPositionY):
(WebCore::CSSParser::parseFillPositionComponent):
(WebCore::CSSParser::parseFillPosition):
(WebCore::CSSParser::parseFillRepeat):
(WebCore::CSSParser::parseFillSize):
(WebCore::CSSParser::parseFillProperty):
(WebCore::CSSParser::parseAnimationDirection):
(WebCore::CSSParser::parseAnimationFillMode):
(WebCore::CSSParser::parseAnimationIterationCount):
(WebCore::CSSParser::parseAnimationName):
(WebCore::CSSParser::parseAnimationPlayState):
(WebCore::CSSParser::parseAnimationProperty):
(WebCore::CSSParser::parseAnimationTimingFunction):
(WebCore::CSSParser::parseGridTrackList):
(WebCore::CSSParser::parseDashboardRegions):
(WebCore::CSSParser::parseCounterContent):
(WebCore::CSSParser::parseClipShape):
(WebCore::CSSParser::parseExclusionShape):
(WebCore::CSSParser::parseFont):
(WebCore::FontFamilyValueBuilder::FontFamilyValueBuilder):
(WebCore::FontFamilyValueBuilder::commit):
(FontFamilyValueBuilder):
(WebCore::CSSParser::parseFontFamily):
(WebCore::CSSParser::parseFontVariant):
(WebCore::CSSParser::parseFontWeight):
(WebCore::ShadowParseContext::commitStyle):
(WebCore::CSSParser::parseShadow):
(WebCore::CSSParser::parseReflect):
(WebCore::CSSParser::parseFlex):
(WebCore::BorderImageParseContext::commitBorderImageProperty):
(WebCore::CSSParser::parseBorderImage):
(WebCore::CSSParser::parseBorderImageRepeat):
(WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
(WebCore::BorderImageQuadParseContext::commitNumber):
(WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
(WebCore::CSSParser::parseBorderRadius):
(WebCore::CSSParser::parseAspectRatio):
(WebCore::CSSParser::parseCounter):
(WebCore::parseDeprecatedGradientPoint):
(WebCore::parseDeprecatedGradientColorStop):
(WebCore::CSSParser::parseDeprecatedGradient):
(WebCore::valueFromSideKeyword):
(WebCore::parseGradientColorOrKeyword):
(WebCore::CSSParser::parseLinearGradient):
(WebCore::CSSParser::parseRadialGradient):
(WebCore::CSSParser::parseCrossfade):
(WebCore::CSSParser::parseImageSet):
(WebCore::CSSParser::parseCustomFilter):
(WebCore::CSSParser::parseBuiltinFilterArguments):
(WebCore::CSSParser::parseFilter):
(WebCore::CSSParser::parseFlowThread):
(WebCore::CSSParser::parseRegionThread):
(WebCore::CSSParser::parseTextEmphasisStyle):
(WebCore::CSSParser::parseFontFeatureSettings):
(WebCore::CSSParser::parseFontVariantLigatures):
* css/CSSParser.h:
(WebCore):
(CSSParser):
* css/CSSValuePool.cpp:
(WebCore::cssValuePool):
(WebCore):
* css/CSSValuePool.h:
(CSSValuePool):
(WebCore):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::setProperty):
* css/StylePropertySet.h:
(StylePropertySet):
* dom/Document.cpp:
* dom/Document.h:
(WebCore):
(Document):
* dom/StyledElement.cpp:
(WebCore::StyledElement::setInlineStyleProperty):
(WebCore::StyledElement::addPropertyToAttributeStyle):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::addHTMLColorToStyle):
* html/HTMLFontElement.cpp:
(WebCore::HTMLFontElement::collectStyleForAttribute):
* html/HTMLHRElement.cpp:
(WebCore::HTMLHRElement::collectStyleForAttribute):
* html/HTMLTableElement.cpp:
(WebCore::HTMLTableElement::createSharedCellStyle):

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

16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSComputedStyleDeclaration.h
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/CSSValuePool.cpp
Source/WebCore/css/CSSValuePool.h
Source/WebCore/css/StylePropertySet.cpp
Source/WebCore/css/StylePropertySet.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/StyledElement.cpp
Source/WebCore/html/HTMLElement.cpp
Source/WebCore/html/HTMLFontElement.cpp
Source/WebCore/html/HTMLHRElement.cpp
Source/WebCore/html/HTMLTableElement.cpp

index 898625f..d47ef60 100644 (file)
@@ -1,3 +1,168 @@
+2012-04-09  Andreas Kling  <kling@webkit.org>
+
+        Make CSSValuePool share values globally.
+        <http://webkit.org/b/77700>
+
+        Reviewed by Antti Koivisto.
+
+        Remove the per-Document CSSValuePool and have everyone use a global pool
+        accessed via "CSSValuePool& cssValuePool()".
+
+        This reduces memory usage by sharing cached CSSValues between all documents,
+        and relaxes heap churn since the common, persistenly cached values are held
+        by CSSValuePool forever.
+
+        No behavior change thanks to r113588 which introduced a mechanism that makes
+        sure we never expose internal CSSValue objects to bindings, but read-only
+        clones of those values.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::valueForNinePieceImageSlice):
+        (WebCore::valueForNinePieceImageQuad):
+        (WebCore::valueForNinePieceImageRepeat):
+        (WebCore::valueForNinePieceImage):
+        (WebCore::zoomAdjustedPixelValue):
+        (WebCore::zoomAdjustedNumberValue):
+        (WebCore::zoomAdjustedPixelValueForLength):
+        (WebCore::valueForReflection):
+        (WebCore::getPositionOffsetValue):
+        (WebCore::CSSComputedStyleDeclaration::currentColorOrValidColor):
+        (WebCore::getBorderRadiusCornerValues):
+        (WebCore::getBorderRadiusCornerValue):
+        (WebCore::getBorderRadiusShorthandValue):
+        (WebCore::computedTransform):
+        (WebCore::CSSComputedStyleDeclaration::valueForCustomFilterNumberParameter):
+        (WebCore::CSSComputedStyleDeclaration::valueForFilter):
+        (WebCore::valueForGridTrackBreadth):
+        (WebCore::valueForGridTrackList):
+        (WebCore::valueForGridPosition):
+        (WebCore::getDelayValue):
+        (WebCore::getDurationValue):
+        (WebCore::createLineBoxContainValue):
+        (WebCore::CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringKeyword):
+        (WebCore::CSSComputedStyleDeclaration::valueForShadow):
+        (WebCore::valueForFamily):
+        (WebCore::renderUnicodeBidiFlagsToCSSValue):
+        (WebCore::renderTextDecorationFlagsToCSSValue):
+        (WebCore::fillRepeatToCSSValue):
+        (WebCore::fillSizeToCSSValue):
+        (WebCore::contentToCSSValue):
+        (WebCore::counterToCSSValue):
+        (WebCore::fontFamilyFromStyle):
+        (WebCore::lineHeightFromStyle):
+        (WebCore::fontSizeFromStyle):
+        (WebCore::fontStyleFromStyle):
+        (WebCore::fontVariantFromStyle):
+        (WebCore::fontWeightFromStyle):
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
+        * css/CSSComputedStyleDeclaration.h:
+        (WebCore):
+        * css/CSSParser.cpp:
+        (WebCore::parseColorValue):
+        (WebCore::parseSimpleLengthValue):
+        (WebCore::parseKeywordValue):
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseColor):
+        (WebCore::CSSParser::setStyleSheet):
+        (WebCore::CSSParser::createPrimitiveNumericValue):
+        (WebCore::CSSParser::createPrimitiveStringValue):
+        (WebCore::CSSParser::parseValidPrimitive):
+        (WebCore::parseBackgroundClip):
+        (WebCore::CSSParser::parseFillShorthand):
+        (WebCore::CSSParser::parseAnimationShorthand):
+        (WebCore::CSSParser::parseTransitionShorthand):
+        (WebCore::CSSParser::parseShorthand):
+        (WebCore::CSSParser::parsePage):
+        (WebCore::CSSParser::parseSizeParameter):
+        (WebCore::CSSParser::parseContent):
+        (WebCore::CSSParser::parseAttr):
+        (WebCore::CSSParser::parseBackgroundColor):
+        (WebCore::CSSParser::parseFillImage):
+        (WebCore::CSSParser::parseFillPositionX):
+        (WebCore::CSSParser::parseFillPositionY):
+        (WebCore::CSSParser::parseFillPositionComponent):
+        (WebCore::CSSParser::parseFillPosition):
+        (WebCore::CSSParser::parseFillRepeat):
+        (WebCore::CSSParser::parseFillSize):
+        (WebCore::CSSParser::parseFillProperty):
+        (WebCore::CSSParser::parseAnimationDirection):
+        (WebCore::CSSParser::parseAnimationFillMode):
+        (WebCore::CSSParser::parseAnimationIterationCount):
+        (WebCore::CSSParser::parseAnimationName):
+        (WebCore::CSSParser::parseAnimationPlayState):
+        (WebCore::CSSParser::parseAnimationProperty):
+        (WebCore::CSSParser::parseAnimationTimingFunction):
+        (WebCore::CSSParser::parseGridTrackList):
+        (WebCore::CSSParser::parseDashboardRegions):
+        (WebCore::CSSParser::parseCounterContent):
+        (WebCore::CSSParser::parseClipShape):
+        (WebCore::CSSParser::parseExclusionShape):
+        (WebCore::CSSParser::parseFont):
+        (WebCore::FontFamilyValueBuilder::FontFamilyValueBuilder):
+        (WebCore::FontFamilyValueBuilder::commit):
+        (FontFamilyValueBuilder):
+        (WebCore::CSSParser::parseFontFamily):
+        (WebCore::CSSParser::parseFontVariant):
+        (WebCore::CSSParser::parseFontWeight):
+        (WebCore::ShadowParseContext::commitStyle):
+        (WebCore::CSSParser::parseShadow):
+        (WebCore::CSSParser::parseReflect):
+        (WebCore::CSSParser::parseFlex):
+        (WebCore::BorderImageParseContext::commitBorderImageProperty):
+        (WebCore::CSSParser::parseBorderImage):
+        (WebCore::CSSParser::parseBorderImageRepeat):
+        (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
+        (WebCore::BorderImageQuadParseContext::commitNumber):
+        (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
+        (WebCore::CSSParser::parseBorderRadius):
+        (WebCore::CSSParser::parseAspectRatio):
+        (WebCore::CSSParser::parseCounter):
+        (WebCore::parseDeprecatedGradientPoint):
+        (WebCore::parseDeprecatedGradientColorStop):
+        (WebCore::CSSParser::parseDeprecatedGradient):
+        (WebCore::valueFromSideKeyword):
+        (WebCore::parseGradientColorOrKeyword):
+        (WebCore::CSSParser::parseLinearGradient):
+        (WebCore::CSSParser::parseRadialGradient):
+        (WebCore::CSSParser::parseCrossfade):
+        (WebCore::CSSParser::parseImageSet):
+        (WebCore::CSSParser::parseCustomFilter):
+        (WebCore::CSSParser::parseBuiltinFilterArguments):
+        (WebCore::CSSParser::parseFilter):
+        (WebCore::CSSParser::parseFlowThread):
+        (WebCore::CSSParser::parseRegionThread):
+        (WebCore::CSSParser::parseTextEmphasisStyle):
+        (WebCore::CSSParser::parseFontFeatureSettings):
+        (WebCore::CSSParser::parseFontVariantLigatures):
+        * css/CSSParser.h:
+        (WebCore):
+        (CSSParser):
+        * css/CSSValuePool.cpp:
+        (WebCore::cssValuePool):
+        (WebCore):
+        * css/CSSValuePool.h:
+        (CSSValuePool):
+        (WebCore):
+        * css/StylePropertySet.cpp:
+        (WebCore::StylePropertySet::setProperty):
+        * css/StylePropertySet.h:
+        (StylePropertySet):
+        * dom/Document.cpp:
+        * dom/Document.h:
+        (WebCore):
+        (Document):
+        * dom/StyledElement.cpp:
+        (WebCore::StyledElement::setInlineStyleProperty):
+        (WebCore::StyledElement::addPropertyToAttributeStyle):
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::addHTMLColorToStyle):
+        * html/HTMLFontElement.cpp:
+        (WebCore::HTMLFontElement::collectStyleForAttribute):
+        * html/HTMLHRElement.cpp:
+        (WebCore::HTMLHRElement::collectStyleForAttribute):
+        * html/HTMLTableElement.cpp:
+        (WebCore::HTMLTableElement::createSharedCellStyle):
+
 2012-04-09  Levi Weintraub  <leviw@chromium.org>
 
         Prepare html classes for sub-pixel LayoutUnits
index 300a154..654010a 100644 (file)
@@ -375,7 +375,7 @@ static int valueForRepeatRule(int rule)
     }
 }
 
-static PassRefPtr<CSSBorderImageSliceValue> valueForNinePieceImageSlice(const NinePieceImage& image, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSBorderImageSliceValue> valueForNinePieceImageSlice(const NinePieceImage& image)
 {
     // Create the slices.
     RefPtr<CSSPrimitiveValue> top;
@@ -384,9 +384,9 @@ static PassRefPtr<CSSBorderImageSliceValue> valueForNinePieceImageSlice(const Ni
     RefPtr<CSSPrimitiveValue> left;
 
     if (image.imageSlices().top().isPercent())
-        top = cssValuePool->createValue(image.imageSlices().top().value(), CSSPrimitiveValue::CSS_PERCENTAGE);
+        top = cssValuePool().createValue(image.imageSlices().top().value(), CSSPrimitiveValue::CSS_PERCENTAGE);
     else
-        top = cssValuePool->createValue(image.imageSlices().top().value(), CSSPrimitiveValue::CSS_NUMBER);
+        top = cssValuePool().createValue(image.imageSlices().top().value(), CSSPrimitiveValue::CSS_NUMBER);
 
     if (image.imageSlices().right() == image.imageSlices().top() && image.imageSlices().bottom() == image.imageSlices().top()
         && image.imageSlices().left() == image.imageSlices().top()) {
@@ -395,26 +395,26 @@ static PassRefPtr<CSSBorderImageSliceValue> valueForNinePieceImageSlice(const Ni
         left = top;
     } else {
         if (image.imageSlices().right().isPercent())
-            right = cssValuePool->createValue(image.imageSlices().right().value(), CSSPrimitiveValue::CSS_PERCENTAGE);
+            right = cssValuePool().createValue(image.imageSlices().right().value(), CSSPrimitiveValue::CSS_PERCENTAGE);
         else
-            right = cssValuePool->createValue(image.imageSlices().right().value(), CSSPrimitiveValue::CSS_NUMBER);
+            right = cssValuePool().createValue(image.imageSlices().right().value(), CSSPrimitiveValue::CSS_NUMBER);
 
         if (image.imageSlices().bottom() == image.imageSlices().top() && image.imageSlices().right() == image.imageSlices().left()) {
             bottom = top;
             left = right;
         } else {
             if (image.imageSlices().bottom().isPercent())
-                bottom = cssValuePool->createValue(image.imageSlices().bottom().value(), CSSPrimitiveValue::CSS_PERCENTAGE);
+                bottom = cssValuePool().createValue(image.imageSlices().bottom().value(), CSSPrimitiveValue::CSS_PERCENTAGE);
             else
-                bottom = cssValuePool->createValue(image.imageSlices().bottom().value(), CSSPrimitiveValue::CSS_NUMBER);
+                bottom = cssValuePool().createValue(image.imageSlices().bottom().value(), CSSPrimitiveValue::CSS_NUMBER);
 
             if (image.imageSlices().left() == image.imageSlices().right())
                 left = right;
             else {
                 if (image.imageSlices().left().isPercent())
-                    left = cssValuePool->createValue(image.imageSlices().left().value(), CSSPrimitiveValue::CSS_PERCENTAGE);
+                    left = cssValuePool().createValue(image.imageSlices().left().value(), CSSPrimitiveValue::CSS_PERCENTAGE);
                 else
-                    left = cssValuePool->createValue(image.imageSlices().left().value(), CSSPrimitiveValue::CSS_NUMBER);
+                    left = cssValuePool().createValue(image.imageSlices().left().value(), CSSPrimitiveValue::CSS_NUMBER);
             }
         }
     }
@@ -425,10 +425,10 @@ static PassRefPtr<CSSBorderImageSliceValue> valueForNinePieceImageSlice(const Ni
     quad->setBottom(bottom);
     quad->setLeft(left);
 
-    return CSSBorderImageSliceValue::create(cssValuePool->createValue(quad.release()), image.fill());
+    return CSSBorderImageSliceValue::create(cssValuePool().createValue(quad.release()), image.fill());
 }
 
-static PassRefPtr<CSSPrimitiveValue> valueForNinePieceImageQuad(const LengthBox& box, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSPrimitiveValue> valueForNinePieceImageQuad(const LengthBox& box)
 {
     // Create the slices.
     RefPtr<CSSPrimitiveValue> top;
@@ -437,9 +437,9 @@ static PassRefPtr<CSSPrimitiveValue> valueForNinePieceImageQuad(const LengthBox&
     RefPtr<CSSPrimitiveValue> left;
 
     if (box.top().isRelative())
-        top = cssValuePool->createValue(box.top().value(), CSSPrimitiveValue::CSS_NUMBER);
+        top = cssValuePool().createValue(box.top().value(), CSSPrimitiveValue::CSS_NUMBER);
     else
-        top = cssValuePool->createValue(box.top());
+        top = cssValuePool().createValue(box.top());
 
     if (box.right() == box.top() && box.bottom() == box.top() && box.left() == box.top()) {
         right = top;
@@ -447,26 +447,26 @@ static PassRefPtr<CSSPrimitiveValue> valueForNinePieceImageQuad(const LengthBox&
         left = top;
     } else {
         if (box.right().isRelative())
-            right = cssValuePool->createValue(box.right().value(), CSSPrimitiveValue::CSS_NUMBER);
+            right = cssValuePool().createValue(box.right().value(), CSSPrimitiveValue::CSS_NUMBER);
         else
-            right = cssValuePool->createValue(box.right());
+            right = cssValuePool().createValue(box.right());
 
         if (box.bottom() == box.top() && box.right() == box.left()) {
             bottom = top;
             left = right;
         } else {
             if (box.bottom().isRelative())
-                bottom = cssValuePool->createValue(box.bottom().value(), CSSPrimitiveValue::CSS_NUMBER);
+                bottom = cssValuePool().createValue(box.bottom().value(), CSSPrimitiveValue::CSS_NUMBER);
             else
-                bottom = cssValuePool->createValue(box.bottom());
+                bottom = cssValuePool().createValue(box.bottom());
 
             if (box.left() == box.right())
                 left = right;
             else {
                 if (box.left().isRelative())
-                    left = cssValuePool->createValue(box.left().value(), CSSPrimitiveValue::CSS_NUMBER);
+                    left = cssValuePool().createValue(box.left().value(), CSSPrimitiveValue::CSS_NUMBER);
                 else
-                    left = cssValuePool->createValue(box.left());
+                    left = cssValuePool().createValue(box.left());
             }
         }
     }
@@ -477,26 +477,26 @@ static PassRefPtr<CSSPrimitiveValue> valueForNinePieceImageQuad(const LengthBox&
     quad->setBottom(bottom);
     quad->setLeft(left);
 
-    return cssValuePool->createValue(quad.release());
+    return cssValuePool().createValue(quad.release());
 }
 
-static PassRefPtr<CSSValue> valueForNinePieceImageRepeat(const NinePieceImage& image, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> valueForNinePieceImageRepeat(const NinePieceImage& image)
 {
     RefPtr<CSSPrimitiveValue> horizontalRepeat;
     RefPtr<CSSPrimitiveValue> verticalRepeat;
 
-    horizontalRepeat = cssValuePool->createIdentifierValue(valueForRepeatRule(image.horizontalRule()));
+    horizontalRepeat = cssValuePool().createIdentifierValue(valueForRepeatRule(image.horizontalRule()));
     if (image.horizontalRule() == image.verticalRule())
         verticalRepeat = horizontalRepeat;
     else
-        verticalRepeat = cssValuePool->createIdentifierValue(valueForRepeatRule(image.verticalRule()));
-    return cssValuePool->createValue(Pair::create(horizontalRepeat.release(), verticalRepeat.release()));
+        verticalRepeat = cssValuePool().createIdentifierValue(valueForRepeatRule(image.verticalRule()));
+    return cssValuePool().createValue(Pair::create(horizontalRepeat.release(), verticalRepeat.release()));
 }
 
-static PassRefPtr<CSSValue> valueForNinePieceImage(const NinePieceImage& image, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> valueForNinePieceImage(const NinePieceImage& image)
 {
     if (!image.hasImage())
-        return cssValuePool->createIdentifierValue(CSSValueNone);
+        return cssValuePool().createIdentifierValue(CSSValueNone);
 
     // Image first.
     RefPtr<CSSValue> imageValue;
@@ -504,52 +504,52 @@ static PassRefPtr<CSSValue> valueForNinePieceImage(const NinePieceImage& image,
         imageValue = image.image()->cssValue();
 
     // Create the image slice.
-    RefPtr<CSSBorderImageSliceValue> imageSlices = valueForNinePieceImageSlice(image, cssValuePool);
+    RefPtr<CSSBorderImageSliceValue> imageSlices = valueForNinePieceImageSlice(image);
 
     // Create the border area slices.
-    RefPtr<CSSValue> borderSlices = valueForNinePieceImageQuad(image.borderSlices(), cssValuePool);
+    RefPtr<CSSValue> borderSlices = valueForNinePieceImageQuad(image.borderSlices());
 
     // Create the border outset.
-    RefPtr<CSSValue> outset = valueForNinePieceImageQuad(image.outset(), cssValuePool);
+    RefPtr<CSSValue> outset = valueForNinePieceImageQuad(image.outset());
 
     // Create the repeat rules.
-    RefPtr<CSSValue> repeat = valueForNinePieceImageRepeat(image, cssValuePool);
+    RefPtr<CSSValue> repeat = valueForNinePieceImageRepeat(image);
 
     return createBorderImageValue(imageValue, imageSlices, borderSlices, outset, repeat);
 }
 
-inline static PassRefPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(int value, const RenderStyle* style, CSSValuePool* cssValuePool)
+inline static PassRefPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(int value, const RenderStyle* style)
 {
-    return cssValuePool->createValue(adjustForAbsoluteZoom(value, style), CSSPrimitiveValue::CSS_PX);
+    return cssValuePool().createValue(adjustForAbsoluteZoom(value, style), CSSPrimitiveValue::CSS_PX);
 }
 
-inline static PassRefPtr<CSSPrimitiveValue> zoomAdjustedNumberValue(double value, const RenderStyle* style, CSSValuePool* cssValuePool)
+inline static PassRefPtr<CSSPrimitiveValue> zoomAdjustedNumberValue(double value, const RenderStyle* style)
 {
-    return cssValuePool->createValue(value / style->effectiveZoom(), CSSPrimitiveValue::CSS_NUMBER);
+    return cssValuePool().createValue(value / style->effectiveZoom(), CSSPrimitiveValue::CSS_NUMBER);
 }
 
-static PassRefPtr<CSSValue> zoomAdjustedPixelValueForLength(const Length& length, const RenderStyle* style, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> zoomAdjustedPixelValueForLength(const Length& length, const RenderStyle* style)
 {
     if (length.isFixed())
-        return zoomAdjustedPixelValue(length.value(), style, cssValuePool);
-    return cssValuePool->createValue(length);
+        return zoomAdjustedPixelValue(length.value(), style);
+    return cssValuePool().createValue(length);
 }
 
-static PassRefPtr<CSSValue> valueForReflection(const StyleReflection* reflection, const RenderStyle* style, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> valueForReflection(const StyleReflection* reflection, const RenderStyle* style)
 {
     if (!reflection)
-        return cssValuePool->createIdentifierValue(CSSValueNone);
+        return cssValuePool().createIdentifierValue(CSSValueNone);
 
     RefPtr<CSSPrimitiveValue> offset;
     if (reflection->offset().isPercent())
-        offset = cssValuePool->createValue(reflection->offset().percent(), CSSPrimitiveValue::CSS_PERCENTAGE);
+        offset = cssValuePool().createValue(reflection->offset().percent(), CSSPrimitiveValue::CSS_PERCENTAGE);
     else
-        offset = zoomAdjustedPixelValue(reflection->offset().value(), style, cssValuePool);
+        offset = zoomAdjustedPixelValue(reflection->offset().value(), style);
 
-    return CSSReflectValue::create(reflection->direction(), offset.release(), valueForNinePieceImage(reflection->mask(), cssValuePool));
+    return CSSReflectValue::create(reflection->direction(), offset.release(), valueForNinePieceImage(reflection->mask()));
 }
 
-static PassRefPtr<CSSValue> getPositionOffsetValue(RenderStyle* style, CSSPropertyID propertyID, CSSValuePool* cssValuePool, RenderView* renderView)
+static PassRefPtr<CSSValue> getPositionOffsetValue(RenderStyle* style, CSSPropertyID propertyID, RenderView* renderView)
 {
     if (!style)
         return 0;
@@ -574,55 +574,54 @@ static PassRefPtr<CSSValue> getPositionOffsetValue(RenderStyle* style, CSSProper
 
     if (style->position() == AbsolutePosition || style->position() == FixedPosition) {
         if (l.type() == WebCore::Fixed)
-            return zoomAdjustedPixelValue(l.value(), style, cssValuePool);
+            return zoomAdjustedPixelValue(l.value(), style);
         else if (l.isViewportPercentage())
-            return zoomAdjustedPixelValue(valueForLength(l, 0, renderView), style, cssValuePool);
-        return cssValuePool->createValue(l);
+            return zoomAdjustedPixelValue(valueForLength(l, 0, renderView), style);
+        return cssValuePool().createValue(l);
     }
 
     if (style->position() == RelativePosition)
         // FIXME: It's not enough to simply return "auto" values for one offset if the other side is defined.
         // In other words if left is auto and right is not auto, then left's computed value is negative right().
         // So we should get the opposite length unit and see if it is auto.
-        return cssValuePool->createValue(l);
+        return cssValuePool().createValue(l);
 
-    return cssValuePool->createIdentifierValue(CSSValueAuto);
+    return cssValuePool().createIdentifierValue(CSSValueAuto);
 }
 
 PassRefPtr<CSSPrimitiveValue> CSSComputedStyleDeclaration::currentColorOrValidColor(RenderStyle* style, const Color& color) const
 {
     // This function does NOT look at visited information, so that computed style doesn't expose that.
-    CSSValuePool* cssValuePool = m_node->document()->cssValuePool().get();
     if (!color.isValid())
-        return cssValuePool->createColorValue(style->color().rgb());
-    return cssValuePool->createColorValue(color.rgb());
+        return cssValuePool().createColorValue(style->color().rgb());
+    return cssValuePool().createColorValue(color.rgb());
 }
 
-static PassRefPtr<CSSValueList> getBorderRadiusCornerValues(LengthSize radius, const RenderStyle* style, CSSValuePool* cssValuePool, RenderView* renderView)
+static PassRefPtr<CSSValueList> getBorderRadiusCornerValues(LengthSize radius, const RenderStyle* style, RenderView* renderView)
 {
     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
     if (radius.width().type() == Percent)
-        list->append(cssValuePool->createValue(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
+        list->append(cssValuePool().createValue(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
     else
-        list->append(zoomAdjustedPixelValue(valueForLength(radius.width(), 0, renderView), style, cssValuePool));
+        list->append(zoomAdjustedPixelValue(valueForLength(radius.width(), 0, renderView), style));
     if (radius.height().type() == Percent)
-        list->append(cssValuePool->createValue(radius.height().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
+        list->append(cssValuePool().createValue(radius.height().percent(), CSSPrimitiveValue::CSS_PERCENTAGE));
     else
-        list->append(zoomAdjustedPixelValue(valueForLength(radius.height(), 0, renderView), style, cssValuePool));
+        list->append(zoomAdjustedPixelValue(valueForLength(radius.height(), 0, renderView), style));
     return list.release();
 }
 
-static PassRefPtr<CSSValue> getBorderRadiusCornerValue(LengthSize radius, const RenderStyle* style, CSSValuePool* cssValuePool, RenderView* renderView)
+static PassRefPtr<CSSValue> getBorderRadiusCornerValue(LengthSize radius, const RenderStyle* style, RenderView* renderView)
 {
     if (radius.width() == radius.height()) {
         if (radius.width().type() == Percent)
-            return cssValuePool->createValue(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE);
-        return zoomAdjustedPixelValue(valueForLength(radius.width(), 0, renderView), style, cssValuePool);
+            return cssValuePool().createValue(radius.width().percent(), CSSPrimitiveValue::CSS_PERCENTAGE);
+        return zoomAdjustedPixelValue(valueForLength(radius.width(), 0, renderView), style);
     }
-    return getBorderRadiusCornerValues(radius, style, cssValuePool, renderView);
+    return getBorderRadiusCornerValues(radius, style, renderView);
 }
 
-static PassRefPtr<CSSValueList> getBorderRadiusShorthandValue(const RenderStyle* style, CSSValuePool* cssValuePool, RenderView* renderView)
+static PassRefPtr<CSSValueList> getBorderRadiusShorthandValue(const RenderStyle* style, RenderView* renderView)
 {
     RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
     bool showHorizontalBottomLeft = style->borderTopRightRadius().width() != style->borderBottomLeftRadius().width();
@@ -634,10 +633,10 @@ static PassRefPtr<CSSValueList> getBorderRadiusShorthandValue(const RenderStyle*
     bool showVerticalTopRight = (style->borderTopRightRadius().height() != style->borderTopLeftRadius().height()) || showVerticalBottomRight;
     bool showVerticalTopLeft = (style->borderTopLeftRadius().width() != style->borderTopLeftRadius().height());
 
-    RefPtr<CSSValueList> topLeftRadius = getBorderRadiusCornerValues(style->borderTopLeftRadius(), style, cssValuePool, renderView);
-    RefPtr<CSSValueList> topRightRadius = getBorderRadiusCornerValues(style->borderTopRightRadius(), style, cssValuePool, renderView);
-    RefPtr<CSSValueList> bottomRightRadius = getBorderRadiusCornerValues(style->borderBottomRightRadius(), style, cssValuePool, renderView);
-    RefPtr<CSSValueList> bottomLeftRadius = getBorderRadiusCornerValues(style->borderBottomLeftRadius(), style, cssValuePool, renderView);
+    RefPtr<CSSValueList> topLeftRadius = getBorderRadiusCornerValues(style->borderTopLeftRadius(), style, renderView);
+    RefPtr<CSSValueList> topRightRadius = getBorderRadiusCornerValues(style->borderTopRightRadius(), style, renderView);
+    RefPtr<CSSValueList> bottomRightRadius = getBorderRadiusCornerValues(style->borderBottomRightRadius(), style, renderView);
+    RefPtr<CSSValueList> bottomLeftRadius = getBorderRadiusCornerValues(style->borderBottomLeftRadius(), style, renderView);
 
     RefPtr<CSSValueList> horizontalRadii = CSSValueList::createSpaceSeparated();
     horizontalRadii->append(topLeftRadius->item(0));
@@ -684,10 +683,10 @@ static inline bool hasCompositedLayer(RenderObject* renderer)
     return renderer && renderer->hasLayer() && toRenderBoxModelObject(renderer)->layer()->isComposited();
 }
 
-static PassRefPtr<CSSValue> computedTransform(RenderObject* renderer, const RenderStyle* style, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> computedTransform(RenderObject* renderer, const RenderStyle* style)
 {
     if (!renderer || style->transform().operations().isEmpty())
-        return cssValuePool->createIdentifierValue(CSSValueNone);
+        return cssValuePool().createIdentifierValue(CSSValueNone);
 
     LayoutRect box = sizingBox(renderer);
 
@@ -701,34 +700,34 @@ static PassRefPtr<CSSValue> computedTransform(RenderObject* renderer, const Rend
     if (transform.isAffine()) {
         transformVal = WebKitCSSTransformValue::create(WebKitCSSTransformValue::MatrixTransformOperation);
 
-        transformVal->append(cssValuePool->createValue(transform.a(), CSSPrimitiveValue::CSS_NUMBER));
-        transformVal->append(cssValuePool->createValue(transform.b(), CSSPrimitiveValue::CSS_NUMBER));
-        transformVal->append(cssValuePool->createValue(transform.c(), CSSPrimitiveValue::CSS_NUMBER));
-        transformVal->append(cssValuePool->createValue(transform.d(), CSSPrimitiveValue::CSS_NUMBER));
-        transformVal->append(zoomAdjustedNumberValue(transform.e(), style, cssValuePool));
-        transformVal->append(zoomAdjustedNumberValue(transform.f(), style, cssValuePool));
+        transformVal->append(cssValuePool().createValue(transform.a(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(cssValuePool().createValue(transform.b(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(cssValuePool().createValue(transform.c(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(cssValuePool().createValue(transform.d(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(zoomAdjustedNumberValue(transform.e(), style));
+        transformVal->append(zoomAdjustedNumberValue(transform.f(), style));
     } else {
         transformVal = WebKitCSSTransformValue::create(WebKitCSSTransformValue::Matrix3DTransformOperation);
 
-        transformVal->append(cssValuePool->createValue(transform.m11(), CSSPrimitiveValue::CSS_NUMBER));
-        transformVal->append(cssValuePool->createValue(transform.m12(), CSSPrimitiveValue::CSS_NUMBER));
-        transformVal->append(cssValuePool->createValue(transform.m13(), CSSPrimitiveValue::CSS_NUMBER));
-        transformVal->append(cssValuePool->createValue(transform.m14(), CSSPrimitiveValue::CSS_NUMBER));
-
-        transformVal->append(cssValuePool->createValue(transform.m21(), CSSPrimitiveValue::CSS_NUMBER));
-        transformVal->append(cssValuePool->createValue(transform.m22(), CSSPrimitiveValue::CSS_NUMBER));
-        transformVal->append(cssValuePool->createValue(transform.m23(), CSSPrimitiveValue::CSS_NUMBER));
-        transformVal->append(cssValuePool->createValue(transform.m24(), CSSPrimitiveValue::CSS_NUMBER));
-
-        transformVal->append(cssValuePool->createValue(transform.m31(), CSSPrimitiveValue::CSS_NUMBER));
-        transformVal->append(cssValuePool->createValue(transform.m32(), CSSPrimitiveValue::CSS_NUMBER));
-        transformVal->append(cssValuePool->createValue(transform.m33(), CSSPrimitiveValue::CSS_NUMBER));
-        transformVal->append(cssValuePool->createValue(transform.m34(), CSSPrimitiveValue::CSS_NUMBER));
-
-        transformVal->append(zoomAdjustedNumberValue(transform.m41(), style, cssValuePool));
-        transformVal->append(zoomAdjustedNumberValue(transform.m42(), style, cssValuePool));
-        transformVal->append(zoomAdjustedNumberValue(transform.m43(), style, cssValuePool));
-        transformVal->append(cssValuePool->createValue(transform.m44(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(cssValuePool().createValue(transform.m11(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(cssValuePool().createValue(transform.m12(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(cssValuePool().createValue(transform.m13(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(cssValuePool().createValue(transform.m14(), CSSPrimitiveValue::CSS_NUMBER));
+
+        transformVal->append(cssValuePool().createValue(transform.m21(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(cssValuePool().createValue(transform.m22(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(cssValuePool().createValue(transform.m23(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(cssValuePool().createValue(transform.m24(), CSSPrimitiveValue::CSS_NUMBER));
+
+        transformVal->append(cssValuePool().createValue(transform.m31(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(cssValuePool().createValue(transform.m32(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(cssValuePool().createValue(transform.m33(), CSSPrimitiveValue::CSS_NUMBER));
+        transformVal->append(cssValuePool().createValue(transform.m34(), CSSPrimitiveValue::CSS_NUMBER));
+
+        transformVal->append(zoomAdjustedNumberValue(transform.m41(), style));
+        transformVal->append(zoomAdjustedNumberValue(transform.m42(), style));
+        transformVal->append(zoomAdjustedNumberValue(transform.m43(), style));
+        transformVal->append(cssValuePool().createValue(transform.m44(), CSSPrimitiveValue::CSS_NUMBER));
     }
 
     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
@@ -741,9 +740,8 @@ static PassRefPtr<CSSValue> computedTransform(RenderObject* renderer, const Rend
 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::valueForCustomFilterNumberParameter(const CustomFilterNumberParameter* numberParameter) const
 {
     RefPtr<CSSValueList> numberParameterValue = CSSValueList::createSpaceSeparated();
-    CSSValuePool* cssValuePool = m_node->document()->cssValuePool().get();
     for (unsigned i = 0; i < numberParameter->size(); ++i)
-        numberParameterValue->append(cssValuePool->createValue(numberParameter->valueAt(i), CSSPrimitiveValue::CSS_NUMBER));
+        numberParameterValue->append(cssValuePool().createValue(numberParameter->valueAt(i), CSSPrimitiveValue::CSS_NUMBER));
     return numberParameterValue.release();
 }
 
@@ -764,10 +762,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::valueForCustomFilterParameter(
 #if ENABLE(CSS_FILTERS)
 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::valueForFilter(RenderStyle* style) const
 {
-    CSSValuePool* cssValuePool = m_node->document()->cssValuePool().get();
-
     if (style->filter().operations().isEmpty())
-        return cssValuePool->createIdentifierValue(CSSValueNone);
+        return cssValuePool().createIdentifierValue(CSSValueNone);
 
     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
 
@@ -780,61 +776,61 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::valueForFilter(RenderStyle* st
         case FilterOperation::REFERENCE: {
             ReferenceFilterOperation* referenceOperation = static_cast<ReferenceFilterOperation*>(filterOperation);
             filterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::ReferenceFilterOperation);
-            filterValue->append(cssValuePool->createValue(referenceOperation->reference(), CSSPrimitiveValue::CSS_STRING));
+            filterValue->append(cssValuePool().createValue(referenceOperation->reference(), CSSPrimitiveValue::CSS_STRING));
             break;
         }
         case FilterOperation::GRAYSCALE: {
             BasicColorMatrixFilterOperation* colorMatrixOperation = static_cast<BasicColorMatrixFilterOperation*>(filterOperation);
             filterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::GrayscaleFilterOperation);
-            filterValue->append(cssValuePool->createValue(colorMatrixOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
+            filterValue->append(cssValuePool().createValue(colorMatrixOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
             break;
         }
         case FilterOperation::SEPIA: {
             BasicColorMatrixFilterOperation* colorMatrixOperation = static_cast<BasicColorMatrixFilterOperation*>(filterOperation);
             filterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::SepiaFilterOperation);
-            filterValue->append(cssValuePool->createValue(colorMatrixOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
+            filterValue->append(cssValuePool().createValue(colorMatrixOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
             break;
         }
         case FilterOperation::SATURATE: {
             BasicColorMatrixFilterOperation* colorMatrixOperation = static_cast<BasicColorMatrixFilterOperation*>(filterOperation);
             filterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::SaturateFilterOperation);
-            filterValue->append(cssValuePool->createValue(colorMatrixOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
+            filterValue->append(cssValuePool().createValue(colorMatrixOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
             break;
         }
         case FilterOperation::HUE_ROTATE: {
             BasicColorMatrixFilterOperation* colorMatrixOperation = static_cast<BasicColorMatrixFilterOperation*>(filterOperation);
             filterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::HueRotateFilterOperation);
-            filterValue->append(cssValuePool->createValue(colorMatrixOperation->amount(), CSSPrimitiveValue::CSS_DEG));
+            filterValue->append(cssValuePool().createValue(colorMatrixOperation->amount(), CSSPrimitiveValue::CSS_DEG));
             break;
         }
         case FilterOperation::INVERT: {
             BasicComponentTransferFilterOperation* componentTransferOperation = static_cast<BasicComponentTransferFilterOperation*>(filterOperation);
             filterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::InvertFilterOperation);
-            filterValue->append(cssValuePool->createValue(componentTransferOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
+            filterValue->append(cssValuePool().createValue(componentTransferOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
             break;
         }
         case FilterOperation::OPACITY: {
             BasicComponentTransferFilterOperation* componentTransferOperation = static_cast<BasicComponentTransferFilterOperation*>(filterOperation);
             filterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::OpacityFilterOperation);
-            filterValue->append(cssValuePool->createValue(componentTransferOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
+            filterValue->append(cssValuePool().createValue(componentTransferOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
             break;
         }
         case FilterOperation::BRIGHTNESS: {
             BasicComponentTransferFilterOperation* brightnessOperation = static_cast<BasicComponentTransferFilterOperation*>(filterOperation);
             filterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::BrightnessFilterOperation);
-            filterValue->append(cssValuePool->createValue(brightnessOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
+            filterValue->append(cssValuePool().createValue(brightnessOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
             break;
         }
         case FilterOperation::CONTRAST: {
             BasicComponentTransferFilterOperation* contrastOperation = static_cast<BasicComponentTransferFilterOperation*>(filterOperation);
             filterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::ContrastFilterOperation);
-            filterValue->append(cssValuePool->createValue(contrastOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
+            filterValue->append(cssValuePool().createValue(contrastOperation->amount(), CSSPrimitiveValue::CSS_NUMBER));
             break;
         }
         case FilterOperation::BLUR: {
             BlurFilterOperation* blurOperation = static_cast<BlurFilterOperation*>(filterOperation);
             filterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::BlurFilterOperation);
-            filterValue->append(zoomAdjustedPixelValue(blurOperation->stdDeviation().value(), style, cssValuePool));
+            filterValue->append(zoomAdjustedPixelValue(blurOperation->stdDeviation().value(), style));
             break;
         }
         case FilterOperation::DROP_SHADOW: {
@@ -859,22 +855,22 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::valueForFilter(RenderStyle* st
             if (program->vertexShader())
                 shadersList->append(program->vertexShader()->cssValue());
             else
-                shadersList->append(cssValuePool->createIdentifierValue(CSSValueNone));
+                shadersList->append(cssValuePool().createIdentifierValue(CSSValueNone));
             if (program->fragmentShader())
                 shadersList->append(program->fragmentShader()->cssValue());
             else
-                shadersList->append(cssValuePool->createIdentifierValue(CSSValueNone));
+                shadersList->append(cssValuePool().createIdentifierValue(CSSValueNone));
             filterValue->append(shadersList.release());
             
             RefPtr<CSSValueList> meshParameters = CSSValueList::createSpaceSeparated();
-            meshParameters->append(cssValuePool->createValue(customOperation->meshRows(), CSSPrimitiveValue::CSS_NUMBER));
-            meshParameters->append(cssValuePool->createValue(customOperation->meshColumns(), CSSPrimitiveValue::CSS_NUMBER));
-            meshParameters->append(cssValuePool->createValue(customOperation->meshBoxType()));
+            meshParameters->append(cssValuePool().createValue(customOperation->meshRows(), CSSPrimitiveValue::CSS_NUMBER));
+            meshParameters->append(cssValuePool().createValue(customOperation->meshColumns(), CSSPrimitiveValue::CSS_NUMBER));
+            meshParameters->append(cssValuePool().createValue(customOperation->meshBoxType()));
             
             // FIXME: The specification doesn't have any "attached" identifier. Should we add one?
             // https://bugs.webkit.org/show_bug.cgi?id=72700
             if (customOperation->meshType() == CustomFilterOperation::DETACHED)
-                meshParameters->append(cssValuePool->createIdentifierValue(CSSValueDetached));
+                meshParameters->append(cssValuePool().createIdentifierValue(CSSValueDetached));
             
             filterValue->append(meshParameters.release());
             
@@ -886,7 +882,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::valueForFilter(RenderStyle* st
             for (size_t i = 0; i < parametersSize; ++i) {
                 const CustomFilterParameter* parameter = parameters.at(i).get();
                 RefPtr<CSSValueList> parameterCSSNameAndValue = CSSValueList::createSpaceSeparated();
-                parameterCSSNameAndValue->append(cssValuePool->createValue(parameter->name(), CSSPrimitiveValue::CSS_STRING));
+                parameterCSSNameAndValue->append(cssValuePool().createValue(parameter->name(), CSSPrimitiveValue::CSS_STRING));
                 parameterCSSNameAndValue->append(valueForCustomFilterParameter(parameter));
                 parametersCSSValue->append(parameterCSSNameAndValue.release());
             }
@@ -907,62 +903,62 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::valueForFilter(RenderStyle* st
 #endif
 
 #if ENABLE(CSS_GRID_LAYOUT)
-static PassRefPtr<CSSValue> valueForGridTrackBreadth(const Length& trackLength, const RenderStyle* style, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> valueForGridTrackBreadth(const Length& trackLength, const RenderStyle* style)
 {
     if (trackLength.isPercent())
-        return cssValuePool->createValue(trackLength);
+        return cssValuePool().createValue(trackLength);
     if (trackLength.isAuto())
-        return cssValuePool->createIdentifierValue(CSSValueAuto);
-    return zoomAdjustedPixelValue(trackLength.value(), style, cssValuePool);
+        return cssValuePool().createIdentifierValue(CSSValueAuto);
+    return zoomAdjustedPixelValue(trackLength.value(), style);
 }
 
-static PassRefPtr<CSSValue> valueForGridTrackList(const Vector<Length>& trackLengths, const RenderStyle* style, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> valueForGridTrackList(const Vector<Length>& trackLengths, const RenderStyle* style)
 {
     // We should have at least an element!
     ASSERT(trackLengths.size());
 
     // Handle the 'none' case here.
     if (trackLengths.size() == 1 && trackLengths[0].isUndefined())
-        return cssValuePool->createIdentifierValue(CSSValueNone);
+        return cssValuePool().createIdentifierValue(CSSValueNone);
 
     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
     for (size_t i = 0; i < trackLengths.size(); ++i)
-        list->append(valueForGridTrackBreadth(trackLengths[i], style, cssValuePool));
+        list->append(valueForGridTrackBreadth(trackLengths[i], style));
     return list.release();
 }
 
-static PassRefPtr<CSSValue> valueForGridPosition(const Length& position, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> valueForGridPosition(const Length& position)
 {
     if (position.isAuto())
-        return cssValuePool->createIdentifierValue(CSSValueAuto);
+        return cssValuePool().createIdentifierValue(CSSValueAuto);
 
     ASSERT(position.isFixed());
-    return cssValuePool->createValue(position.value(), CSSPrimitiveValue::CSS_NUMBER);
+    return cssValuePool().createValue(position.value(), CSSPrimitiveValue::CSS_NUMBER);
 }
 #endif
 
-static PassRefPtr<CSSValue> getDelayValue(const AnimationList* animList, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> getDelayValue(const AnimationList* animList)
 {
     RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
     if (animList) {
         for (size_t i = 0; i < animList->size(); ++i)
-            list->append(cssValuePool->createValue(animList->animation(i)->delay(), CSSPrimitiveValue::CSS_S));
+            list->append(cssValuePool().createValue(animList->animation(i)->delay(), CSSPrimitiveValue::CSS_S));
     } else {
         // Note that initialAnimationDelay() is used for both transitions and animations
-        list->append(cssValuePool->createValue(Animation::initialAnimationDelay(), CSSPrimitiveValue::CSS_S));
+        list->append(cssValuePool().createValue(Animation::initialAnimationDelay(), CSSPrimitiveValue::CSS_S));
     }
     return list.release();
 }
 
-static PassRefPtr<CSSValue> getDurationValue(const AnimationList* animList, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> getDurationValue(const AnimationList* animList)
 {
     RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
     if (animList) {
         for (size_t i = 0; i < animList->size(); ++i)
-            list->append(cssValuePool->createValue(animList->animation(i)->duration(), CSSPrimitiveValue::CSS_S));
+            list->append(cssValuePool().createValue(animList->animation(i)->duration(), CSSPrimitiveValue::CSS_S));
     } else {
         // Note that initialAnimationDuration() is used for both transitions and animations
-        list->append(cssValuePool->createValue(Animation::initialAnimationDuration(), CSSPrimitiveValue::CSS_S));
+        list->append(cssValuePool().createValue(Animation::initialAnimationDuration(), CSSPrimitiveValue::CSS_S));
     }
     return list.release();
 }
@@ -999,10 +995,10 @@ static PassRefPtr<CSSValue> getTimingFunctionValue(const AnimationList* animList
     return list.release();
 }
 
-static PassRefPtr<CSSValue> createLineBoxContainValue(CSSValuePool* cssValuePool, unsigned lineBoxContain)
+static PassRefPtr<CSSValue> createLineBoxContainValue(unsigned lineBoxContain)
 {
     if (!lineBoxContain)
-        return cssValuePool->createIdentifierValue(CSSValueNone);
+        return cssValuePool().createIdentifierValue(CSSValueNone);
     return CSSLineBoxContainValue::create(lineBoxContain);
 }
 
@@ -1071,13 +1067,11 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getFontSizeCSSValuePreferringK
     if (!style)
         return 0;
 
-    CSSValuePool* cssValuePool = m_node->document()->cssValuePool().get();
-
     if (int keywordSize = style->fontDescription().keywordSize())
-        return cssValuePool->createIdentifierValue(cssIdentifierForFontSizeKeyword(keywordSize));
+        return cssValuePool().createIdentifierValue(cssIdentifierForFontSizeKeyword(keywordSize));
 
 
-    return zoomAdjustedPixelValue(style->fontDescription().computedPixelSize(), style.get(), cssValuePool);
+    return zoomAdjustedPixelValue(style->fontDescription().computedPixelSize(), style.get());
 }
 
 bool CSSComputedStyleDeclaration::useFixedFontDefaultSize() const
@@ -1094,18 +1088,17 @@ bool CSSComputedStyleDeclaration::useFixedFontDefaultSize() const
 
 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::valueForShadow(const ShadowData* shadow, CSSPropertyID propertyID, RenderStyle* style) const
 {
-    CSSValuePool* cssValuePool = m_node->document()->cssValuePool().get();
     if (!shadow)
-        return cssValuePool->createIdentifierValue(CSSValueNone);
+        return cssValuePool().createIdentifierValue(CSSValueNone);
 
     RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
     for (const ShadowData* s = shadow; s; s = s->next()) {
-        RefPtr<CSSPrimitiveValue> x = zoomAdjustedPixelValue(s->x(), style, cssValuePool);
-        RefPtr<CSSPrimitiveValue> y = zoomAdjustedPixelValue(s->y(), style, cssValuePool);
-        RefPtr<CSSPrimitiveValue> blur = zoomAdjustedPixelValue(s->blur(), style, cssValuePool);
-        RefPtr<CSSPrimitiveValue> spread = propertyID == CSSPropertyTextShadow ? PassRefPtr<CSSPrimitiveValue>() : zoomAdjustedPixelValue(s->spread(), style, cssValuePool);
-        RefPtr<CSSPrimitiveValue> style = propertyID == CSSPropertyTextShadow || s->style() == Normal ? PassRefPtr<CSSPrimitiveValue>() : cssValuePool->createIdentifierValue(CSSValueInset);
-        RefPtr<CSSPrimitiveValue> color = cssValuePool->createColorValue(s->color().rgb());
+        RefPtr<CSSPrimitiveValue> x = zoomAdjustedPixelValue(s->x(), style);
+        RefPtr<CSSPrimitiveValue> y = zoomAdjustedPixelValue(s->y(), style);
+        RefPtr<CSSPrimitiveValue> blur = zoomAdjustedPixelValue(s->blur(), style);
+        RefPtr<CSSPrimitiveValue> spread = propertyID == CSSPropertyTextShadow ? PassRefPtr<CSSPrimitiveValue>() : zoomAdjustedPixelValue(s->spread(), style);
+        RefPtr<CSSPrimitiveValue> style = propertyID == CSSPropertyTextShadow || s->style() == Normal ? PassRefPtr<CSSPrimitiveValue>() : cssValuePool().createIdentifierValue(CSSValueInset);
+        RefPtr<CSSPrimitiveValue> color = cssValuePool().createColorValue(s->color().rgb());
         list->prepend(ShadowValue::create(x.release(), y.release(), blur.release(), spread.release(), style.release(), color.release()));
     }
     return list.release();
@@ -1133,31 +1126,31 @@ static int identifierForFamily(const AtomicString& family)
     return 0;
 }
 
-static PassRefPtr<CSSPrimitiveValue> valueForFamily(const AtomicString& family, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSPrimitiveValue> valueForFamily(const AtomicString& family)
 {
     if (int familyIdentifier = identifierForFamily(family))
-        return cssValuePool->createIdentifierValue(familyIdentifier);
-    return cssValuePool->createValue(family.string(), CSSPrimitiveValue::CSS_STRING);
+        return cssValuePool().createIdentifierValue(familyIdentifier);
+    return cssValuePool().createValue(family.string(), CSSPrimitiveValue::CSS_STRING);
 }
 
-static PassRefPtr<CSSValue> renderUnicodeBidiFlagsToCSSValue(EUnicodeBidi unicodeBidi, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> renderUnicodeBidiFlagsToCSSValue(EUnicodeBidi unicodeBidi)
 {
     switch (unicodeBidi) {
     case UBNormal:
-        return cssValuePool->createIdentifierValue(CSSValueNormal);
+        return cssValuePool().createIdentifierValue(CSSValueNormal);
     case Embed:
-        return cssValuePool->createIdentifierValue(CSSValueEmbed);
+        return cssValuePool().createIdentifierValue(CSSValueEmbed);
     case Plaintext:
-        return cssValuePool->createIdentifierValue(CSSValueWebkitPlaintext);
+        return cssValuePool().createIdentifierValue(CSSValueWebkitPlaintext);
     case Override:
-        return cssValuePool->createIdentifierValue(CSSValueBidiOverride);
+        return cssValuePool().createIdentifierValue(CSSValueBidiOverride);
     case Isolate:
-        return cssValuePool->createIdentifierValue(CSSValueWebkitIsolate);
+        return cssValuePool().createIdentifierValue(CSSValueWebkitIsolate);
     case OverrideIsolate:
     {
         RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
-        list->append(cssValuePool->createIdentifierValue(CSSValueBidiOverride));
-        list->append(cssValuePool->createIdentifierValue(CSSValueWebkitIsolate));
+        list->append(cssValuePool().createIdentifierValue(CSSValueBidiOverride));
+        list->append(cssValuePool().createIdentifierValue(CSSValueWebkitIsolate));
         return list;
     }
     }
@@ -1165,78 +1158,78 @@ static PassRefPtr<CSSValue> renderUnicodeBidiFlagsToCSSValue(EUnicodeBidi unicod
     return 0;
 }
 
-static PassRefPtr<CSSValue> renderTextDecorationFlagsToCSSValue(int textDecoration, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> renderTextDecorationFlagsToCSSValue(int textDecoration)
 {
     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
     if (textDecoration & UNDERLINE)
-        list->append(cssValuePool->createIdentifierValue(CSSValueUnderline));
+        list->append(cssValuePool().createIdentifierValue(CSSValueUnderline));
     if (textDecoration & OVERLINE)
-        list->append(cssValuePool->createIdentifierValue(CSSValueOverline));
+        list->append(cssValuePool().createIdentifierValue(CSSValueOverline));
     if (textDecoration & LINE_THROUGH)
-        list->append(cssValuePool->createIdentifierValue(CSSValueLineThrough));
+        list->append(cssValuePool().createIdentifierValue(CSSValueLineThrough));
     if (textDecoration & BLINK)
-        list->append(cssValuePool->createIdentifierValue(CSSValueBlink));
+        list->append(cssValuePool().createIdentifierValue(CSSValueBlink));
 
     if (!list->length())
-        return cssValuePool->createIdentifierValue(CSSValueNone);
+        return cssValuePool().createIdentifierValue(CSSValueNone);
     return list;
 }
 
-static PassRefPtr<CSSValue> fillRepeatToCSSValue(EFillRepeat xRepeat, EFillRepeat yRepeat, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> fillRepeatToCSSValue(EFillRepeat xRepeat, EFillRepeat yRepeat)
 {
     // For backwards compatibility, if both values are equal, just return one of them. And
     // if the two values are equivalent to repeat-x or repeat-y, just return the shorthand.
     if (xRepeat == yRepeat)
-        return cssValuePool->createValue(xRepeat);
+        return cssValuePool().createValue(xRepeat);
     if (xRepeat == RepeatFill && yRepeat == NoRepeatFill)
-        return cssValuePool->createIdentifierValue(CSSValueRepeatX);
+        return cssValuePool().createIdentifierValue(CSSValueRepeatX);
     if (xRepeat == NoRepeatFill && yRepeat == RepeatFill)
-        return cssValuePool->createIdentifierValue(CSSValueRepeatY);
+        return cssValuePool().createIdentifierValue(CSSValueRepeatY);
 
     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
-    list->append(cssValuePool->createValue(xRepeat));
-    list->append(cssValuePool->createValue(yRepeat));
+    list->append(cssValuePool().createValue(xRepeat));
+    list->append(cssValuePool().createValue(yRepeat));
     return list.release();
 }
 
-static PassRefPtr<CSSValue> fillSizeToCSSValue(const FillSize& fillSize, const RenderStyle* style, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> fillSizeToCSSValue(const FillSize& fillSize, const RenderStyle* style)
 {
     if (fillSize.type == Contain)
-        return cssValuePool->createIdentifierValue(CSSValueContain);
+        return cssValuePool().createIdentifierValue(CSSValueContain);
 
     if (fillSize.type == Cover)
-        return cssValuePool->createIdentifierValue(CSSValueCover);
+        return cssValuePool().createIdentifierValue(CSSValueCover);
 
     if (fillSize.size.height().isAuto())
-        return zoomAdjustedPixelValueForLength(fillSize.size.width(), style, cssValuePool);
+        return zoomAdjustedPixelValueForLength(fillSize.size.width(), style);
 
     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
-    list->append(zoomAdjustedPixelValueForLength(fillSize.size.width(), style, cssValuePool));
-    list->append(zoomAdjustedPixelValueForLength(fillSize.size.height(), style, cssValuePool));
+    list->append(zoomAdjustedPixelValueForLength(fillSize.size.width(), style));
+    list->append(zoomAdjustedPixelValueForLength(fillSize.size.height(), style));
     return list.release();
 }
 
-static PassRefPtr<CSSValue> contentToCSSValue(const RenderStyle* style, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> contentToCSSValue(const RenderStyle* style)
 {
     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
     for (const ContentData* contentData = style->contentData(); contentData; contentData = contentData->next()) {
         if (contentData->isCounter()) {
             const CounterContent* counter = static_cast<const CounterContentData*>(contentData)->counter();
             ASSERT(counter);
-            list->append(cssValuePool->createValue(counter->identifier(), CSSPrimitiveValue::CSS_COUNTER_NAME));
+            list->append(cssValuePool().createValue(counter->identifier(), CSSPrimitiveValue::CSS_COUNTER_NAME));
         } else if (contentData->isImage()) {
             const StyleImage* image = static_cast<const ImageContentData*>(contentData)->image();
             ASSERT(image);
             list->append(image->cssValue());
         } else if (contentData->isText())
-            list->append(cssValuePool->createValue(static_cast<const TextContentData*>(contentData)->text(), CSSPrimitiveValue::CSS_STRING));
+            list->append(cssValuePool().createValue(static_cast<const TextContentData*>(contentData)->text(), CSSPrimitiveValue::CSS_STRING));
     }
     if (!style->regionThread().isNull())
-        list->append(cssValuePool->createValue(style->regionThread(), CSSPrimitiveValue::CSS_STRING));
+        list->append(cssValuePool().createValue(style->regionThread(), CSSPrimitiveValue::CSS_STRING));
     return list.release();
 }
 
-static PassRefPtr<CSSValue> counterToCSSValue(const RenderStyle* style, CSSPropertyID propertyID, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValue> counterToCSSValue(const RenderStyle* style, CSSPropertyID propertyID)
 {
     const CounterDirectiveMap* map = style->counterDirectives();
     if (!map)
@@ -1244,9 +1237,9 @@ static PassRefPtr<CSSValue> counterToCSSValue(const RenderStyle* style, CSSPrope
 
     RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
     for (CounterDirectiveMap::const_iterator it = map->begin(); it != map->end(); ++it) {
-        list->append(cssValuePool->createValue(it->first.get(), CSSPrimitiveValue::CSS_STRING));
+        list->append(cssValuePool().createValue(it->first.get(), CSSPrimitiveValue::CSS_STRING));
         short number = propertyID == CSSPropertyCounterIncrement ? it->second.m_incrementValue : it->second.m_resetValue;
-        list->append(cssValuePool->createValue((double)number, CSSPrimitiveValue::CSS_NUMBER));
+        list->append(cssValuePool().createValue((double)number, CSSPrimitiveValue::CSS_NUMBER));
     }
     return list.release();
 }
@@ -1260,72 +1253,72 @@ static void logUnimplementedPropertyID(CSSPropertyID propertyID)
     LOG_ERROR("WebKit does not yet implement getComputedStyle for '%s'.", getPropertyName(propertyID));
 }
 
-static PassRefPtr<CSSValueList> fontFamilyFromStyle(RenderStyle* style, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSValueList> fontFamilyFromStyle(RenderStyle* style)
 {
     const FontFamily& firstFamily = style->fontDescription().family();
     RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
     for (const FontFamily* family = &firstFamily; family; family = family->next())
-        list->append(valueForFamily(family->family(), cssValuePool));
+        list->append(valueForFamily(family->family()));
     return list.release();
 }
 
-static PassRefPtr<CSSPrimitiveValue> lineHeightFromStyle(RenderStyle* style, CSSValuePool* cssValuePool, RenderView* renderView)
+static PassRefPtr<CSSPrimitiveValue> lineHeightFromStyle(RenderStyle* style, RenderView* renderView)
 {
     Length length = style->lineHeight();
     if (length.isNegative())
-        return cssValuePool->createIdentifierValue(CSSValueNormal);
+        return cssValuePool().createIdentifierValue(CSSValueNormal);
     if (length.isPercent())
         // This is imperfect, because it doesn't include the zoom factor and the real computation
         // for how high to be in pixels does include things like minimum font size and the zoom factor.
         // On the other hand, since font-size doesn't include the zoom factor, we really can't do
         // that here either.
-        return zoomAdjustedPixelValue(static_cast<int>(length.percent() * style->fontDescription().specifiedSize()) / 100, style, cssValuePool);
-    return zoomAdjustedPixelValue(valueForLength(length, 0, renderView), style, cssValuePool);
+        return zoomAdjustedPixelValue(static_cast<int>(length.percent() * style->fontDescription().specifiedSize()) / 100, style);
+    return zoomAdjustedPixelValue(valueForLength(length, 0, renderView), style);
 }
 
-static PassRefPtr<CSSPrimitiveValue> fontSizeFromStyle(RenderStyle* style, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSPrimitiveValue> fontSizeFromStyle(RenderStyle* style)
 {
-    return zoomAdjustedPixelValue(style->fontDescription().computedPixelSize(), style, cssValuePool);
+    return zoomAdjustedPixelValue(style->fontDescription().computedPixelSize(), style);
 }
 
-static PassRefPtr<CSSPrimitiveValue> fontStyleFromStyle(RenderStyle* style, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSPrimitiveValue> fontStyleFromStyle(RenderStyle* style)
 {
     if (style->fontDescription().italic())
-        return cssValuePool->createIdentifierValue(CSSValueItalic);
-    return cssValuePool->createIdentifierValue(CSSValueNormal);
+        return cssValuePool().createIdentifierValue(CSSValueItalic);
+    return cssValuePool().createIdentifierValue(CSSValueNormal);
 }
 
-static PassRefPtr<CSSPrimitiveValue> fontVariantFromStyle(RenderStyle* style, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSPrimitiveValue> fontVariantFromStyle(RenderStyle* style)
 {
     if (style->fontDescription().smallCaps())
-        return cssValuePool->createIdentifierValue(CSSValueSmallCaps);
-    return cssValuePool->createIdentifierValue(CSSValueNormal);
+        return cssValuePool().createIdentifierValue(CSSValueSmallCaps);
+    return cssValuePool().createIdentifierValue(CSSValueNormal);
 }
 
-static PassRefPtr<CSSPrimitiveValue> fontWeightFromStyle(RenderStyle* style, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSPrimitiveValue> fontWeightFromStyle(RenderStyle* style)
 {
     switch (style->fontDescription().weight()) {
     case FontWeight100:
-        return cssValuePool->createIdentifierValue(CSSValue100);
+        return cssValuePool().createIdentifierValue(CSSValue100);
     case FontWeight200:
-        return cssValuePool->createIdentifierValue(CSSValue200);
+        return cssValuePool().createIdentifierValue(CSSValue200);
     case FontWeight300:
-        return cssValuePool->createIdentifierValue(CSSValue300);
+        return cssValuePool().createIdentifierValue(CSSValue300);
     case FontWeightNormal:
-        return cssValuePool->createIdentifierValue(CSSValueNormal);
+        return cssValuePool().createIdentifierValue(CSSValueNormal);
     case FontWeight500:
-        return cssValuePool->createIdentifierValue(CSSValue500);
+        return cssValuePool().createIdentifierValue(CSSValue500);
     case FontWeight600:
-        return cssValuePool->createIdentifierValue(CSSValue600);
+        return cssValuePool().createIdentifierValue(CSSValue600);
     case FontWeightBold:
-        return cssValuePool->createIdentifierValue(CSSValueBold);
+        return cssValuePool().createIdentifierValue(CSSValueBold);
     case FontWeight800:
-        return cssValuePool->createIdentifierValue(CSSValue800);
+        return cssValuePool().createIdentifierValue(CSSValue800);
     case FontWeight900:
-        return cssValuePool->createIdentifierValue(CSSValue900);
+        return cssValuePool().createIdentifierValue(CSSValue900);
     }
     ASSERT_NOT_REACHED();
-    return cssValuePool->createIdentifierValue(CSSValueNormal);
+    return cssValuePool().createIdentifierValue(CSSValueNormal);
 }
 
 PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropertyID propertyID, EUpdateLayout updateLayout) const
@@ -1360,8 +1353,6 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
             renderer = renderer->beforePseudoElementRenderer();
     }
 
-    CSSValuePool* cssValuePool = node->document()->cssValuePool().get();
-
     propertyID = CSSProperty::resolveDirectionAwareProperty(propertyID, style->direction(), style->writingMode());
 
     switch (propertyID) {
@@ -1369,18 +1360,18 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
             break;
 
         case CSSPropertyBackgroundColor:
-            return cssValuePool->createColorValue(m_allowVisitedStyle? style->visitedDependentColor(CSSPropertyBackgroundColor).rgb() : style->backgroundColor().rgb());
+            return cssValuePool().createColorValue(m_allowVisitedStyle? style->visitedDependentColor(CSSPropertyBackgroundColor).rgb() : style->backgroundColor().rgb());
         case CSSPropertyBackgroundImage:
         case CSSPropertyWebkitMaskImage: {
             const FillLayer* layers = propertyID == CSSPropertyWebkitMaskImage ? style->maskLayers() : style->backgroundLayers();
             if (!layers)
-                return cssValuePool->createIdentifierValue(CSSValueNone);
+                return cssValuePool().createIdentifierValue(CSSValueNone);
 
             if (!layers->next()) {
                 if (layers->image())
                     return layers->image()->cssValue();
 
-                return cssValuePool->createIdentifierValue(CSSValueNone);
+                return cssValuePool().createIdentifierValue(CSSValueNone);
             }
 
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
@@ -1388,7 +1379,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
                 if (currLayer->image())
                     list->append(currLayer->image()->cssValue());
                 else
-                    list->append(cssValuePool->createIdentifierValue(CSSValueNone));
+                    list->append(cssValuePool().createIdentifierValue(CSSValueNone));
             }
             return list.release();
         }
@@ -1397,11 +1388,11 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
         case CSSPropertyWebkitMaskSize: {
             const FillLayer* layers = propertyID == CSSPropertyWebkitMaskSize ? style->maskLayers() : style->backgroundLayers();
             if (!layers->next())
-                return fillSizeToCSSValue(layers->size(), style.get(), cssValuePool);
+                return fillSizeToCSSValue(layers->size(), style.get());
 
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
-                list->append(fillSizeToCSSValue(currLayer->size(), style.get(), cssValuePool));
+                list->append(fillSizeToCSSValue(currLayer->size(), style.get()));
 
             return list.release();
         }
@@ -1409,11 +1400,11 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
         case CSSPropertyWebkitMaskRepeat: {
             const FillLayer* layers = propertyID == CSSPropertyWebkitMaskRepeat ? style->maskLayers() : style->backgroundLayers();
             if (!layers->next())
-                return fillRepeatToCSSValue(layers->repeatX(), layers->repeatY(), cssValuePool);
+                return fillRepeatToCSSValue(layers->repeatX(), layers->repeatY());
 
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
-                list->append(fillRepeatToCSSValue(currLayer->repeatX(), currLayer->repeatY(), cssValuePool));
+                list->append(fillRepeatToCSSValue(currLayer->repeatX(), currLayer->repeatY()));
 
             return list.release();
         }
@@ -1421,11 +1412,11 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
         case CSSPropertyWebkitMaskComposite: {
             const FillLayer* layers = propertyID == CSSPropertyWebkitMaskComposite ? style->maskLayers() : style->backgroundLayers();
             if (!layers->next())
-                return cssValuePool->createValue(layers->composite());
+                return cssValuePool().createValue(layers->composite());
 
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
-                list->append(cssValuePool->createValue(currLayer->composite()));
+                list->append(cssValuePool().createValue(currLayer->composite()));
 
             return list.release();
         }
@@ -1433,11 +1424,11 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
         case CSSPropertyWebkitMaskAttachment: {
             const FillLayer* layers = propertyID == CSSPropertyWebkitMaskAttachment ? style->maskLayers() : style->backgroundLayers();
             if (!layers->next())
-                return cssValuePool->createValue(layers->attachment());
+                return cssValuePool().createValue(layers->attachment());
 
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
-                list->append(cssValuePool->createValue(currLayer->attachment()));
+                list->append(cssValuePool().createValue(currLayer->attachment()));
 
             return list.release();
         }
@@ -1451,13 +1442,13 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
             bool isClip = propertyID == CSSPropertyBackgroundClip || propertyID == CSSPropertyWebkitBackgroundClip || propertyID == CSSPropertyWebkitMaskClip;
             if (!layers->next()) {
                 EFillBox box = isClip ? layers->clip() : layers->origin();
-                return cssValuePool->createValue(box);
+                return cssValuePool().createValue(box);
             }
 
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next()) {
                 EFillBox box = isClip ? currLayer->clip() : currLayer->origin();
-                list->append(cssValuePool->createValue(box));
+                list->append(cssValuePool().createValue(box));
             }
 
             return list.release();
@@ -1467,16 +1458,16 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
             const FillLayer* layers = propertyID == CSSPropertyWebkitMaskPosition ? style->maskLayers() : style->backgroundLayers();
             if (!layers->next()) {
                 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
-                list->append(zoomAdjustedPixelValueForLength(layers->xPosition(), style.get(), cssValuePool));
-                list->append(zoomAdjustedPixelValueForLength(layers->yPosition(), style.get(), cssValuePool));
+                list->append(zoomAdjustedPixelValueForLength(layers->xPosition(), style.get()));
+                list->append(zoomAdjustedPixelValueForLength(layers->yPosition(), style.get()));
                 return list.release();
             }
 
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next()) {
                 RefPtr<CSSValueList> positionList = CSSValueList::createSpaceSeparated();
-                positionList->append(zoomAdjustedPixelValueForLength(currLayer->xPosition(), style.get(), cssValuePool));
-                positionList->append(zoomAdjustedPixelValueForLength(currLayer->yPosition(), style.get(), cssValuePool));
+                positionList->append(zoomAdjustedPixelValueForLength(currLayer->xPosition(), style.get()));
+                positionList->append(zoomAdjustedPixelValueForLength(currLayer->yPosition(), style.get()));
                 list->append(positionList);
             }
 
@@ -1486,11 +1477,11 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
         case CSSPropertyWebkitMaskPositionX: {
             const FillLayer* layers = propertyID == CSSPropertyWebkitMaskPositionX ? style->maskLayers() : style->backgroundLayers();
             if (!layers->next())
-                return cssValuePool->createValue(layers->xPosition());
+                return cssValuePool().createValue(layers->xPosition());
 
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
-                list->append(cssValuePool->createValue(currLayer->xPosition()));
+                list->append(cssValuePool().createValue(currLayer->xPosition()));
 
             return list.release();
         }
@@ -1498,123 +1489,123 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
         case CSSPropertyWebkitMaskPositionY: {
             const FillLayer* layers = propertyID == CSSPropertyWebkitMaskPositionY ? style->maskLayers() : style->backgroundLayers();
             if (!layers->next())
-                return cssValuePool->createValue(layers->yPosition());
+                return cssValuePool().createValue(layers->yPosition());
 
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             for (const FillLayer* currLayer = layers; currLayer; currLayer = currLayer->next())
-                list->append(cssValuePool->createValue(currLayer->yPosition()));
+                list->append(cssValuePool().createValue(currLayer->yPosition()));
 
             return list.release();
         }
         case CSSPropertyBorderCollapse:
             if (style->borderCollapse())
-                return cssValuePool->createIdentifierValue(CSSValueCollapse);
-            return cssValuePool->createIdentifierValue(CSSValueSeparate);
+                return cssValuePool().createIdentifierValue(CSSValueCollapse);
+            return cssValuePool().createIdentifierValue(CSSValueSeparate);
         case CSSPropertyBorderSpacing: {
             RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
-            list->append(zoomAdjustedPixelValue(style->horizontalBorderSpacing(), style.get(), cssValuePool));
-            list->append(zoomAdjustedPixelValue(style->verticalBorderSpacing(), style.get(), cssValuePool));
+            list->append(zoomAdjustedPixelValue(style->horizontalBorderSpacing(), style.get()));
+            list->append(zoomAdjustedPixelValue(style->verticalBorderSpacing(), style.get()));
             return list.release();
         }
         case CSSPropertyWebkitBorderHorizontalSpacing:
-            return zoomAdjustedPixelValue(style->horizontalBorderSpacing(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValue(style->horizontalBorderSpacing(), style.get());
         case CSSPropertyWebkitBorderVerticalSpacing:
-            return zoomAdjustedPixelValue(style->verticalBorderSpacing(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValue(style->verticalBorderSpacing(), style.get());
         case CSSPropertyBorderImageSource:
             if (style->borderImageSource())
                 return style->borderImageSource()->cssValue();
-            return cssValuePool->createIdentifierValue(CSSValueNone);
+            return cssValuePool().createIdentifierValue(CSSValueNone);
         case CSSPropertyBorderTopColor:
-            return m_allowVisitedStyle ? cssValuePool->createColorValue(style->visitedDependentColor(CSSPropertyBorderTopColor).rgb()) : currentColorOrValidColor(style.get(), style->borderTopColor());
+            return m_allowVisitedStyle ? cssValuePool().createColorValue(style->visitedDependentColor(CSSPropertyBorderTopColor).rgb()) : currentColorOrValidColor(style.get(), style->borderTopColor());
         case CSSPropertyBorderRightColor:
-            return m_allowVisitedStyle ? cssValuePool->createColorValue(style->visitedDependentColor(CSSPropertyBorderRightColor).rgb()) : currentColorOrValidColor(style.get(), style->borderRightColor());
+            return m_allowVisitedStyle ? cssValuePool().createColorValue(style->visitedDependentColor(CSSPropertyBorderRightColor).rgb()) : currentColorOrValidColor(style.get(), style->borderRightColor());
         case CSSPropertyBorderBottomColor:
-            return m_allowVisitedStyle ? cssValuePool->createColorValue(style->visitedDependentColor(CSSPropertyBorderBottomColor).rgb()) : currentColorOrValidColor(style.get(), style->borderBottomColor());
+            return m_allowVisitedStyle ? cssValuePool().createColorValue(style->visitedDependentColor(CSSPropertyBorderBottomColor).rgb()) : currentColorOrValidColor(style.get(), style->borderBottomColor());
         case CSSPropertyBorderLeftColor:
-            return m_allowVisitedStyle ? cssValuePool->createColorValue(style->visitedDependentColor(CSSPropertyBorderLeftColor).rgb()) : currentColorOrValidColor(style.get(), style->borderLeftColor());
+            return m_allowVisitedStyle ? cssValuePool().createColorValue(style->visitedDependentColor(CSSPropertyBorderLeftColor).rgb()) : currentColorOrValidColor(style.get(), style->borderLeftColor());
         case CSSPropertyBorderTopStyle:
-            return cssValuePool->createValue(style->borderTopStyle());
+            return cssValuePool().createValue(style->borderTopStyle());
         case CSSPropertyBorderRightStyle:
-            return cssValuePool->createValue(style->borderRightStyle());
+            return cssValuePool().createValue(style->borderRightStyle());
         case CSSPropertyBorderBottomStyle:
-            return cssValuePool->createValue(style->borderBottomStyle());
+            return cssValuePool().createValue(style->borderBottomStyle());
         case CSSPropertyBorderLeftStyle:
-            return cssValuePool->createValue(style->borderLeftStyle());
+            return cssValuePool().createValue(style->borderLeftStyle());
         case CSSPropertyBorderTopWidth:
-            return zoomAdjustedPixelValue(style->borderTopWidth(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValue(style->borderTopWidth(), style.get());
         case CSSPropertyBorderRightWidth:
-            return zoomAdjustedPixelValue(style->borderRightWidth(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValue(style->borderRightWidth(), style.get());
         case CSSPropertyBorderBottomWidth:
-            return zoomAdjustedPixelValue(style->borderBottomWidth(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValue(style->borderBottomWidth(), style.get());
         case CSSPropertyBorderLeftWidth:
-            return zoomAdjustedPixelValue(style->borderLeftWidth(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValue(style->borderLeftWidth(), style.get());
         case CSSPropertyBottom:
-            return getPositionOffsetValue(style.get(), CSSPropertyBottom, cssValuePool, m_node->document()->renderView());
+            return getPositionOffsetValue(style.get(), CSSPropertyBottom, m_node->document()->renderView());
         case CSSPropertyWebkitBoxAlign:
-            return cssValuePool->createValue(style->boxAlign());
+            return cssValuePool().createValue(style->boxAlign());
         case CSSPropertyWebkitBoxDirection:
-            return cssValuePool->createValue(style->boxDirection());
+            return cssValuePool().createValue(style->boxDirection());
         case CSSPropertyWebkitBoxFlex:
-            return cssValuePool->createValue(style->boxFlex(), CSSPrimitiveValue::CSS_NUMBER);
+            return cssValuePool().createValue(style->boxFlex(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyWebkitBoxFlexGroup:
-            return cssValuePool->createValue(style->boxFlexGroup(), CSSPrimitiveValue::CSS_NUMBER);
+            return cssValuePool().createValue(style->boxFlexGroup(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyWebkitBoxLines:
-            return cssValuePool->createValue(style->boxLines());
+            return cssValuePool().createValue(style->boxLines());
         case CSSPropertyWebkitBoxOrdinalGroup:
-            return cssValuePool->createValue(style->boxOrdinalGroup(), CSSPrimitiveValue::CSS_NUMBER);
+            return cssValuePool().createValue(style->boxOrdinalGroup(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyWebkitBoxOrient:
-            return cssValuePool->createValue(style->boxOrient());
+            return cssValuePool().createValue(style->boxOrient());
         case CSSPropertyWebkitBoxPack:
-            return cssValuePool->createValue(style->boxPack());
+            return cssValuePool().createValue(style->boxPack());
         case CSSPropertyWebkitBoxReflect:
-            return valueForReflection(style->boxReflect(), style.get(), cssValuePool);
+            return valueForReflection(style->boxReflect(), style.get());
         case CSSPropertyBoxShadow:
         case CSSPropertyWebkitBoxShadow:
             return valueForShadow(style->boxShadow(), propertyID, style.get());
         case CSSPropertyCaptionSide:
-            return cssValuePool->createValue(style->captionSide());
+            return cssValuePool().createValue(style->captionSide());
         case CSSPropertyClear:
-            return cssValuePool->createValue(style->clear());
+            return cssValuePool().createValue(style->clear());
         case CSSPropertyColor:
-            return cssValuePool->createColorValue(m_allowVisitedStyle ? style->visitedDependentColor(CSSPropertyColor).rgb() : style->color().rgb());
+            return cssValuePool().createColorValue(m_allowVisitedStyle ? style->visitedDependentColor(CSSPropertyColor).rgb() : style->color().rgb());
         case CSSPropertyWebkitPrintColorAdjust:
-            return cssValuePool->createValue(style->printColorAdjust());
+            return cssValuePool().createValue(style->printColorAdjust());
         case CSSPropertyWebkitColumnAxis:
-            return cssValuePool->createValue(style->columnAxis());
+            return cssValuePool().createValue(style->columnAxis());
         case CSSPropertyWebkitColumnCount:
             if (style->hasAutoColumnCount())
-                return cssValuePool->createIdentifierValue(CSSValueAuto);
-            return cssValuePool->createValue(style->columnCount(), CSSPrimitiveValue::CSS_NUMBER);
+                return cssValuePool().createIdentifierValue(CSSValueAuto);
+            return cssValuePool().createValue(style->columnCount(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyWebkitColumnGap:
             if (style->hasNormalColumnGap())
-                return cssValuePool->createIdentifierValue(CSSValueNormal);
-            return zoomAdjustedPixelValue(style->columnGap(), style.get(), cssValuePool);
+                return cssValuePool().createIdentifierValue(CSSValueNormal);
+            return zoomAdjustedPixelValue(style->columnGap(), style.get());
         case CSSPropertyWebkitColumnRuleColor:
-            return m_allowVisitedStyle ? cssValuePool->createColorValue(style->visitedDependentColor(CSSPropertyOutlineColor).rgb()) : currentColorOrValidColor(style.get(), style->columnRuleColor());
+            return m_allowVisitedStyle ? cssValuePool().createColorValue(style->visitedDependentColor(CSSPropertyOutlineColor).rgb()) : currentColorOrValidColor(style.get(), style->columnRuleColor());
         case CSSPropertyWebkitColumnRuleStyle:
-            return cssValuePool->createValue(style->columnRuleStyle());
+            return cssValuePool().createValue(style->columnRuleStyle());
         case CSSPropertyWebkitColumnRuleWidth:
-            return zoomAdjustedPixelValue(style->columnRuleWidth(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValue(style->columnRuleWidth(), style.get());
         case CSSPropertyWebkitColumnSpan:
             if (style->columnSpan())
-                return cssValuePool->createIdentifierValue(CSSValueAll);
-            return cssValuePool->createValue(1, CSSPrimitiveValue::CSS_NUMBER);
+                return cssValuePool().createIdentifierValue(CSSValueAll);
+            return cssValuePool().createValue(1, CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyWebkitColumnBreakAfter:
-            return cssValuePool->createValue(style->columnBreakAfter());
+            return cssValuePool().createValue(style->columnBreakAfter());
         case CSSPropertyWebkitColumnBreakBefore:
-            return cssValuePool->createValue(style->columnBreakBefore());
+            return cssValuePool().createValue(style->columnBreakBefore());
         case CSSPropertyWebkitColumnBreakInside:
-            return cssValuePool->createValue(style->columnBreakInside());
+            return cssValuePool().createValue(style->columnBreakInside());
         case CSSPropertyWebkitColumnWidth:
             if (style->hasAutoColumnWidth())
-                return cssValuePool->createIdentifierValue(CSSValueAuto);
-            return zoomAdjustedPixelValue(style->columnWidth(), style.get(), cssValuePool);
+                return cssValuePool().createIdentifierValue(CSSValueAuto);
+            return zoomAdjustedPixelValue(style->columnWidth(), style.get());
         case CSSPropertyWebkitRegionBreakAfter:
-            return cssValuePool->createValue(style->regionBreakAfter());
+            return cssValuePool().createValue(style->regionBreakAfter());
         case CSSPropertyWebkitRegionBreakBefore:
-            return cssValuePool->createValue(style->regionBreakBefore());
+            return cssValuePool().createValue(style->regionBreakBefore());
         case CSSPropertyWebkitRegionBreakInside:
-            return cssValuePool->createValue(style->regionBreakInside());
+            return cssValuePool().createValue(style->regionBreakInside());
         case CSSPropertyCursor: {
             RefPtr<CSSValueList> list;
             CursorList* cursors = style->cursors();
@@ -1624,7 +1615,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
                     if (StyleImage* image = cursors->at(i).image())
                         list->append(image->cssValue());
             }
-            RefPtr<CSSValue> value = cssValuePool->createValue(style->cursor());
+            RefPtr<CSSValue> value = cssValuePool().createValue(style->cursor());
             if (list) {
                 list->append(value);
                 return list.release();
@@ -1632,62 +1623,62 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
             return value.release();
         }
         case CSSPropertyDirection:
-            return cssValuePool->createValue(style->direction());
+            return cssValuePool().createValue(style->direction());
         case CSSPropertyDisplay:
-            return cssValuePool->createValue(style->display());
+            return cssValuePool().createValue(style->display());
         case CSSPropertyEmptyCells:
-            return cssValuePool->createValue(style->emptyCells());
+            return cssValuePool().createValue(style->emptyCells());
         case CSSPropertyWebkitFlex: {
             RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
-            list->append(cssValuePool->createValue(style->positiveFlex()));
-            list->append(cssValuePool->createValue(style->negativeFlex()));
+            list->append(cssValuePool().createValue(style->positiveFlex()));
+            list->append(cssValuePool().createValue(style->negativeFlex()));
 
             Length preferredSize = style->flexPreferredSize();
             if (preferredSize.isAuto())
-                list->append(cssValuePool->createIdentifierValue(CSSValueAuto));
+                list->append(cssValuePool().createIdentifierValue(CSSValueAuto));
             else if (preferredSize.isPercent())
-                list->append(cssValuePool->createValue(preferredSize.value(), CSSPrimitiveValue::CSS_PERCENTAGE));
+                list->append(cssValuePool().createValue(preferredSize.value(), CSSPrimitiveValue::CSS_PERCENTAGE));
             else
-                list->append(cssValuePool->createValue(preferredSize.value(), CSSPrimitiveValue::CSS_PX));
+                list->append(cssValuePool().createValue(preferredSize.value(), CSSPrimitiveValue::CSS_PX));
 
             return list.release();
         }
         case CSSPropertyWebkitFlexOrder:
-            return cssValuePool->createValue(style->flexOrder(), CSSPrimitiveValue::CSS_NUMBER);
+            return cssValuePool().createValue(style->flexOrder(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyWebkitFlexPack:
-            return cssValuePool->createValue(style->flexPack());
+            return cssValuePool().createValue(style->flexPack());
         case CSSPropertyWebkitFlexAlign:
-            return cssValuePool->createValue(style->flexAlign());
+            return cssValuePool().createValue(style->flexAlign());
         case CSSPropertyWebkitFlexItemAlign:
             if (style->flexItemAlign() == AlignAuto && m_node && m_node->parentNode() && m_node->parentNode()->computedStyle())
-                return cssValuePool->createValue(m_node->parentNode()->computedStyle()->flexAlign());
-            return cssValuePool->createValue(style->flexItemAlign());
+                return cssValuePool().createValue(m_node->parentNode()->computedStyle()->flexAlign());
+            return cssValuePool().createValue(style->flexItemAlign());
         case CSSPropertyWebkitFlexDirection:
-            return cssValuePool->createValue(style->flexDirection());
+            return cssValuePool().createValue(style->flexDirection());
         case CSSPropertyWebkitFlexWrap:
-            return cssValuePool->createValue(style->flexWrap());
+            return cssValuePool().createValue(style->flexWrap());
         case CSSPropertyWebkitFlexLinePack:
-            return cssValuePool->createValue(style->flexLinePack());
+            return cssValuePool().createValue(style->flexLinePack());
         case CSSPropertyWebkitFlexFlow: {
             RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
-            list->append(cssValuePool->createValue(style->flexDirection()));
-            list->append(cssValuePool->createValue(style->flexWrap()));
+            list->append(cssValuePool().createValue(style->flexDirection()));
+            list->append(cssValuePool().createValue(style->flexWrap()));
             return list.release();
         }
         case CSSPropertyFloat:
-            return cssValuePool->createValue(style->floating());
+            return cssValuePool().createValue(style->floating());
         case CSSPropertyFont: {
             RefPtr<FontValue> computedFont = FontValue::create();
-            computedFont->style = fontStyleFromStyle(style.get(), cssValuePool);
-            computedFont->variant = fontVariantFromStyle(style.get(), cssValuePool);
-            computedFont->weight = fontWeightFromStyle(style.get(), cssValuePool);
-            computedFont->size = fontSizeFromStyle(style.get(), cssValuePool);
-            computedFont->lineHeight = lineHeightFromStyle(style.get(), cssValuePool, m_node->document()->renderView());
-            computedFont->family = fontFamilyFromStyle(style.get(), cssValuePool);
+            computedFont->style = fontStyleFromStyle(style.get());
+            computedFont->variant = fontVariantFromStyle(style.get());
+            computedFont->weight = fontWeightFromStyle(style.get());
+            computedFont->size = fontSizeFromStyle(style.get());
+            computedFont->lineHeight = lineHeightFromStyle(style.get(), m_node->document()->renderView());
+            computedFont->family = fontFamilyFromStyle(style.get());
             return computedFont.release();
         }
         case CSSPropertyFontFamily: {
-            RefPtr<CSSValueList> fontFamilyList = fontFamilyFromStyle(style.get(), cssValuePool);
+            RefPtr<CSSValueList> fontFamilyList = fontFamilyFromStyle(style.get());
             // If there's only a single family, return that as a CSSPrimitiveValue.
             // NOTE: Gecko always returns this as a comma-separated CSSPrimitiveValue string.
             if (fontFamilyList->length() == 1)
@@ -1695,17 +1686,17 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
             return fontFamilyList.release();
         }
         case CSSPropertyFontSize:
-            return fontSizeFromStyle(style.get(), cssValuePool);
+            return fontSizeFromStyle(style.get());
         case CSSPropertyFontStyle:
-            return fontStyleFromStyle(style.get(), cssValuePool);
+            return fontStyleFromStyle(style.get());
         case CSSPropertyFontVariant:
-            return fontVariantFromStyle(style.get(), cssValuePool);
+            return fontVariantFromStyle(style.get());
         case CSSPropertyFontWeight:
-            return fontWeightFromStyle(style.get(), cssValuePool);
+            return fontWeightFromStyle(style.get());
         case CSSPropertyWebkitFontFeatureSettings: {
             const FontFeatureSettings* featureSettings = style->fontDescription().featureSettings();
             if (!featureSettings || !featureSettings->size())
-                return cssValuePool->createIdentifierValue(CSSValueNormal);
+                return cssValuePool().createIdentifierValue(CSSValueNormal);
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             for (unsigned i = 0; i < featureSettings->size(); ++i) {
                 const FontFeature& feature = featureSettings->at(i);
@@ -1716,36 +1707,36 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
         }
 #if ENABLE(CSS_GRID_LAYOUT)
         case CSSPropertyWebkitGridColumns: {
-            return valueForGridTrackList(style->gridColumns(), style.get(), cssValuePool);
+            return valueForGridTrackList(style->gridColumns(), style.get());
         }
         case CSSPropertyWebkitGridRows: {
-            return valueForGridTrackList(style->gridRows(), style.get(), cssValuePool);
+            return valueForGridTrackList(style->gridRows(), style.get());
         }
 
         case CSSPropertyWebkitGridColumn:
-            return valueForGridPosition(style->gridItemColumn(), cssValuePool);
+            return valueForGridPosition(style->gridItemColumn());
         case CSSPropertyWebkitGridRow:
-            return valueForGridPosition(style->gridItemRow(), cssValuePool);
+            return valueForGridPosition(style->gridItemRow());
 #endif
         case CSSPropertyHeight:
             if (renderer) {
                 // According to http://www.w3.org/TR/CSS2/visudet.html#the-height-property,
                 // the "height" property does not apply for non-replaced inline elements.
                 if (!renderer->isReplaced() && renderer->isInline())
-                    return cssValuePool->createIdentifierValue(CSSValueAuto);
-                return zoomAdjustedPixelValue(sizingBox(renderer).height(), style.get(), cssValuePool);
+                    return cssValuePool().createIdentifierValue(CSSValueAuto);
+                return zoomAdjustedPixelValue(sizingBox(renderer).height(), style.get());
             }
-            return zoomAdjustedPixelValueForLength(style->height(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValueForLength(style->height(), style.get());
         case CSSPropertyWebkitHighlight:
             if (style->highlight() == nullAtom)
-                return cssValuePool->createIdentifierValue(CSSValueNone);
-            return cssValuePool->createValue(style->highlight(), CSSPrimitiveValue::CSS_STRING);
+                return cssValuePool().createIdentifierValue(CSSValueNone);
+            return cssValuePool().createValue(style->highlight(), CSSPrimitiveValue::CSS_STRING);
         case CSSPropertyWebkitHyphens:
-            return cssValuePool->createValue(style->hyphens());
+            return cssValuePool().createValue(style->hyphens());
         case CSSPropertyWebkitHyphenateCharacter:
             if (style->hyphenationString().isNull())
-                return cssValuePool->createIdentifierValue(CSSValueAuto);
-            return cssValuePool->createValue(style->hyphenationString(), CSSPrimitiveValue::CSS_STRING);
+                return cssValuePool().createIdentifierValue(CSSValueAuto);
+            return cssValuePool().createValue(style->hyphenationString(), CSSPrimitiveValue::CSS_STRING);
         case CSSPropertyWebkitHyphenateLimitAfter:
             if (style->hyphenationLimitAfter() < 0)
                 return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
@@ -1760,44 +1751,44 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
             return CSSPrimitiveValue::create(style->hyphenationLimitLines(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyWebkitBorderFit:
             if (style->borderFit() == BorderFitBorder)
-                return cssValuePool->createIdentifierValue(CSSValueBorder);
-            return cssValuePool->createIdentifierValue(CSSValueLines);
+                return cssValuePool().createIdentifierValue(CSSValueBorder);
+            return cssValuePool().createIdentifierValue(CSSValueLines);
         case CSSPropertyImageRendering:
             return CSSPrimitiveValue::create(style->imageRendering());
         case CSSPropertyLeft:
-            return getPositionOffsetValue(style.get(), CSSPropertyLeft, cssValuePool, m_node->document()->renderView());
+            return getPositionOffsetValue(style.get(), CSSPropertyLeft, m_node->document()->renderView());
         case CSSPropertyLetterSpacing:
             if (!style->letterSpacing())
-                return cssValuePool->createIdentifierValue(CSSValueNormal);
-            return zoomAdjustedPixelValue(style->letterSpacing(), style.get(), cssValuePool);
+                return cssValuePool().createIdentifierValue(CSSValueNormal);
+            return zoomAdjustedPixelValue(style->letterSpacing(), style.get());
         case CSSPropertyWebkitLineClamp:
             if (style->lineClamp().isNone())
-                return cssValuePool->createIdentifierValue(CSSValueNone);
-            return cssValuePool->createValue(style->lineClamp().value(), style->lineClamp().isPercentage() ? CSSPrimitiveValue::CSS_PERCENTAGE : CSSPrimitiveValue::CSS_NUMBER);
+                return cssValuePool().createIdentifierValue(CSSValueNone);
+            return cssValuePool().createValue(style->lineClamp().value(), style->lineClamp().isPercentage() ? CSSPrimitiveValue::CSS_PERCENTAGE : CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyLineHeight:
-            return lineHeightFromStyle(style.get(), cssValuePool, m_node->document()->renderView());
+            return lineHeightFromStyle(style.get(), m_node->document()->renderView());
         case CSSPropertyListStyleImage:
             if (style->listStyleImage())
                 return style->listStyleImage()->cssValue();
-            return cssValuePool->createIdentifierValue(CSSValueNone);
+            return cssValuePool().createIdentifierValue(CSSValueNone);
         case CSSPropertyListStylePosition:
-            return cssValuePool->createValue(style->listStylePosition());
+            return cssValuePool().createValue(style->listStylePosition());
         case CSSPropertyListStyleType:
-            return cssValuePool->createValue(style->listStyleType());
+            return cssValuePool().createValue(style->listStyleType());
         case CSSPropertyWebkitLocale:
             if (style->locale().isNull())
-                return cssValuePool->createIdentifierValue(CSSValueAuto);
-            return cssValuePool->createValue(style->locale(), CSSPrimitiveValue::CSS_STRING);
+                return cssValuePool().createIdentifierValue(CSSValueAuto);
+            return cssValuePool().createValue(style->locale(), CSSPrimitiveValue::CSS_STRING);
         case CSSPropertyMarginTop: {
             Length marginTop = style->marginTop();
             if (marginTop.isFixed() || !renderer || !renderer->isBox())
-                return zoomAdjustedPixelValueForLength(marginTop, style.get(), cssValuePool);
-            return zoomAdjustedPixelValue(toRenderBox(renderer)->marginTop(), style.get(), cssValuePool);
+                return zoomAdjustedPixelValueForLength(marginTop, style.get());
+            return zoomAdjustedPixelValue(toRenderBox(renderer)->marginTop(), style.get());
         }
         case CSSPropertyMarginRight: {
             Length marginRight = style->marginRight();
             if (marginRight.isFixed() || !renderer || !renderer->isBox())
-                return zoomAdjustedPixelValueForLength(marginRight, style.get(), cssValuePool);
+                return zoomAdjustedPixelValueForLength(marginRight, style.get());
             int value;
             if (marginRight.isPercent() || marginRight.isViewportPercentage())
                 // RenderBox gives a marginRight() that is the distance between the right-edge of the child box
@@ -1806,119 +1797,119 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
                 value = minimumValueForLength(marginRight, toRenderBox(renderer)->containingBlockLogicalWidthForContent(), m_node->document()->renderView());
             else
                 value = toRenderBox(renderer)->marginRight();
-            return zoomAdjustedPixelValue(value, style.get(), cssValuePool);
+            return zoomAdjustedPixelValue(value, style.get());
         }
         case CSSPropertyMarginBottom: {
             Length marginBottom = style->marginBottom();
             if (marginBottom.isFixed() || !renderer || !renderer->isBox())
-                return zoomAdjustedPixelValueForLength(marginBottom, style.get(), cssValuePool);
-            return zoomAdjustedPixelValue(toRenderBox(renderer)->marginBottom(), style.get(), cssValuePool);
+                return zoomAdjustedPixelValueForLength(marginBottom, style.get());
+            return zoomAdjustedPixelValue(toRenderBox(renderer)->marginBottom(), style.get());
         }
         case CSSPropertyMarginLeft: {
             Length marginLeft = style->marginLeft();
             if (marginLeft.isFixed() || !renderer || !renderer->isBox())
-                return zoomAdjustedPixelValueForLength(marginLeft, style.get(), cssValuePool);
-            return zoomAdjustedPixelValue(toRenderBox(renderer)->marginLeft(), style.get(), cssValuePool);
+                return zoomAdjustedPixelValueForLength(marginLeft, style.get());
+            return zoomAdjustedPixelValue(toRenderBox(renderer)->marginLeft(), style.get());
         }
         case CSSPropertyWebkitMarqueeDirection:
-            return cssValuePool->createValue(style->marqueeDirection());
+            return cssValuePool().createValue(style->marqueeDirection());
         case CSSPropertyWebkitMarqueeIncrement:
-            return cssValuePool->createValue(style->marqueeIncrement());
+            return cssValuePool().createValue(style->marqueeIncrement());
         case CSSPropertyWebkitMarqueeRepetition:
             if (style->marqueeLoopCount() < 0)
-                return cssValuePool->createIdentifierValue(CSSValueInfinite);
-            return cssValuePool->createValue(style->marqueeLoopCount(), CSSPrimitiveValue::CSS_NUMBER);
+                return cssValuePool().createIdentifierValue(CSSValueInfinite);
+            return cssValuePool().createValue(style->marqueeLoopCount(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyWebkitMarqueeStyle:
-            return cssValuePool->createValue(style->marqueeBehavior());
+            return cssValuePool().createValue(style->marqueeBehavior());
         case CSSPropertyWebkitUserModify:
-            return cssValuePool->createValue(style->userModify());
+            return cssValuePool().createValue(style->userModify());
         case CSSPropertyMaxHeight: {
             const Length& maxHeight = style->maxHeight();
             if (maxHeight.isUndefined())
-                return cssValuePool->createIdentifierValue(CSSValueNone);
-            return zoomAdjustedPixelValueForLength(maxHeight, style.get(), cssValuePool);
+                return cssValuePool().createIdentifierValue(CSSValueNone);
+            return zoomAdjustedPixelValueForLength(maxHeight, style.get());
         }
         case CSSPropertyMaxWidth: {
             const Length& maxWidth = style->maxWidth();
             if (maxWidth.isUndefined())
-                return cssValuePool->createIdentifierValue(CSSValueNone);
-            return zoomAdjustedPixelValueForLength(maxWidth, style.get(), cssValuePool);
+                return cssValuePool().createIdentifierValue(CSSValueNone);
+            return zoomAdjustedPixelValueForLength(maxWidth, style.get());
         }
         case CSSPropertyMinHeight:
-            return zoomAdjustedPixelValueForLength(style->minHeight(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValueForLength(style->minHeight(), style.get());
         case CSSPropertyMinWidth:
-            return zoomAdjustedPixelValueForLength(style->minWidth(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValueForLength(style->minWidth(), style.get());
         case CSSPropertyOpacity:
-            return cssValuePool->createValue(style->opacity(), CSSPrimitiveValue::CSS_NUMBER);
+            return cssValuePool().createValue(style->opacity(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyOrphans:
-            return cssValuePool->createValue(style->orphans(), CSSPrimitiveValue::CSS_NUMBER);
+            return cssValuePool().createValue(style->orphans(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyOutlineColor:
-            return m_allowVisitedStyle ? cssValuePool->createColorValue(style->visitedDependentColor(CSSPropertyOutlineColor).rgb()) : currentColorOrValidColor(style.get(), style->outlineColor());
+            return m_allowVisitedStyle ? cssValuePool().createColorValue(style->visitedDependentColor(CSSPropertyOutlineColor).rgb()) : currentColorOrValidColor(style.get(), style->outlineColor());
         case CSSPropertyOutlineOffset:
-            return zoomAdjustedPixelValue(style->outlineOffset(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValue(style->outlineOffset(), style.get());
         case CSSPropertyOutlineStyle:
             if (style->outlineStyleIsAuto())
-                return cssValuePool->createIdentifierValue(CSSValueAuto);
-            return cssValuePool->createValue(style->outlineStyle());
+                return cssValuePool().createIdentifierValue(CSSValueAuto);
+            return cssValuePool().createValue(style->outlineStyle());
         case CSSPropertyOutlineWidth:
-            return zoomAdjustedPixelValue(style->outlineWidth(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValue(style->outlineWidth(), style.get());
         case CSSPropertyOverflow:
-            return cssValuePool->createValue(max(style->overflowX(), style->overflowY()));
+            return cssValuePool().createValue(max(style->overflowX(), style->overflowY()));
         case CSSPropertyOverflowX:
-            return cssValuePool->createValue(style->overflowX());
+            return cssValuePool().createValue(style->overflowX());
         case CSSPropertyOverflowY:
-            return cssValuePool->createValue(style->overflowY());
+            return cssValuePool().createValue(style->overflowY());
         case CSSPropertyPaddingTop:
             if (renderer && renderer->isBox())
-                return zoomAdjustedPixelValue(toRenderBox(renderer)->paddingTop(ExcludeIntrinsicPadding), style.get(), cssValuePool);
-            return zoomAdjustedPixelValueForLength(style->paddingTop(), style.get(), cssValuePool);
+                return zoomAdjustedPixelValue(toRenderBox(renderer)->paddingTop(ExcludeIntrinsicPadding), style.get());
+            return zoomAdjustedPixelValueForLength(style->paddingTop(), style.get());
         case CSSPropertyPaddingRight:
             if (renderer && renderer->isBox())
-                return zoomAdjustedPixelValue(toRenderBox(renderer)->paddingRight(ExcludeIntrinsicPadding), style.get(), cssValuePool);
-            return zoomAdjustedPixelValueForLength(style->paddingRight(), style.get(), cssValuePool);
+                return zoomAdjustedPixelValue(toRenderBox(renderer)->paddingRight(ExcludeIntrinsicPadding), style.get());
+            return zoomAdjustedPixelValueForLength(style->paddingRight(), style.get());
         case CSSPropertyPaddingBottom:
             if (renderer && renderer->isBox())
-                return zoomAdjustedPixelValue(toRenderBox(renderer)->paddingBottom(ExcludeIntrinsicPadding), style.get(), cssValuePool);
-            return zoomAdjustedPixelValueForLength(style->paddingBottom(), style.get(), cssValuePool);
+                return zoomAdjustedPixelValue(toRenderBox(renderer)->paddingBottom(ExcludeIntrinsicPadding), style.get());
+            return zoomAdjustedPixelValueForLength(style->paddingBottom(), style.get());
         case CSSPropertyPaddingLeft:
             if (renderer && renderer->isBox())
-                return zoomAdjustedPixelValue(toRenderBox(renderer)->paddingLeft(ExcludeIntrinsicPadding), style.get(), cssValuePool);
-            return zoomAdjustedPixelValueForLength(style->paddingLeft(), style.get(), cssValuePool);
+                return zoomAdjustedPixelValue(toRenderBox(renderer)->paddingLeft(ExcludeIntrinsicPadding), style.get());
+            return zoomAdjustedPixelValueForLength(style->paddingLeft(), style.get());
         case CSSPropertyPageBreakAfter:
-            return cssValuePool->createValue(style->pageBreakAfter());
+            return cssValuePool().createValue(style->pageBreakAfter());
         case CSSPropertyPageBreakBefore:
-            return cssValuePool->createValue(style->pageBreakBefore());
+            return cssValuePool().createValue(style->pageBreakBefore());
         case CSSPropertyPageBreakInside: {
             EPageBreak pageBreak = style->pageBreakInside();
             ASSERT(pageBreak != PBALWAYS);
             if (pageBreak == PBALWAYS)
                 return 0;
-            return cssValuePool->createValue(style->pageBreakInside());
+            return cssValuePool().createValue(style->pageBreakInside());
         }
         case CSSPropertyPosition:
-            return cssValuePool->createValue(style->position());
+            return cssValuePool().createValue(style->position());
         case CSSPropertyRight:
-            return getPositionOffsetValue(style.get(), CSSPropertyRight, cssValuePool, m_node->document()->renderView());
+            return getPositionOffsetValue(style.get(), CSSPropertyRight, m_node->document()->renderView());
         case CSSPropertyTableLayout:
-            return cssValuePool->createValue(style->tableLayout());
+            return cssValuePool().createValue(style->tableLayout());
         case CSSPropertyTextAlign:
-            return cssValuePool->createValue(style->textAlign());
+            return cssValuePool().createValue(style->textAlign());
         case CSSPropertyTextDecoration:
-            return renderTextDecorationFlagsToCSSValue(style->textDecoration(), cssValuePool);
+            return renderTextDecorationFlagsToCSSValue(style->textDecoration());
         case CSSPropertyWebkitTextDecorationsInEffect:
-            return renderTextDecorationFlagsToCSSValue(style->textDecorationsInEffect(), cssValuePool);
+            return renderTextDecorationFlagsToCSSValue(style->textDecorationsInEffect());
         case CSSPropertyWebkitTextFillColor:
             return currentColorOrValidColor(style.get(), style->textFillColor());
         case CSSPropertyWebkitTextEmphasisColor:
             return currentColorOrValidColor(style.get(), style->textEmphasisColor());
         case CSSPropertyWebkitTextEmphasisPosition:
-            return cssValuePool->createValue(style->textEmphasisPosition());
+            return cssValuePool().createValue(style->textEmphasisPosition());
         case CSSPropertyWebkitTextEmphasisStyle:
             switch (style->textEmphasisMark()) {
             case TextEmphasisMarkNone:
-                return cssValuePool->createIdentifierValue(CSSValueNone);
+                return cssValuePool().createIdentifierValue(CSSValueNone);
             case TextEmphasisMarkCustom:
-                return cssValuePool->createValue(style->textEmphasisCustomMark(), CSSPrimitiveValue::CSS_STRING);
+                return cssValuePool().createValue(style->textEmphasisCustomMark(), CSSPrimitiveValue::CSS_STRING);
             case TextEmphasisMarkAuto:
                 ASSERT_NOT_REACHED();
                 // Fall through
@@ -1928,129 +1919,129 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
             case TextEmphasisMarkTriangle:
             case TextEmphasisMarkSesame: {
                 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
-                list->append(cssValuePool->createValue(style->textEmphasisFill()));
-                list->append(cssValuePool->createValue(style->textEmphasisMark()));
+                list->append(cssValuePool().createValue(style->textEmphasisFill()));
+                list->append(cssValuePool().createValue(style->textEmphasisMark()));
                 return list.release();
             }
             }
         case CSSPropertyTextIndent:
-            return zoomAdjustedPixelValueForLength(style->textIndent(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValueForLength(style->textIndent(), style.get());
         case CSSPropertyTextShadow:
             return valueForShadow(style->textShadow(), propertyID, style.get());
         case CSSPropertyTextRendering:
-            return cssValuePool->createValue(style->fontDescription().textRenderingMode());
+            return cssValuePool().createValue(style->fontDescription().textRenderingMode());
         case CSSPropertyTextOverflow:
             if (style->textOverflow())
-                return cssValuePool->createIdentifierValue(CSSValueEllipsis);
-            return cssValuePool->createIdentifierValue(CSSValueClip);
+                return cssValuePool().createIdentifierValue(CSSValueEllipsis);
+            return cssValuePool().createIdentifierValue(CSSValueClip);
         case CSSPropertyWebkitTextSecurity:
-            return cssValuePool->createValue(style->textSecurity());
+            return cssValuePool().createValue(style->textSecurity());
         case CSSPropertyWebkitTextSizeAdjust:
             if (style->textSizeAdjust())
-                return cssValuePool->createIdentifierValue(CSSValueAuto);
-            return cssValuePool->createIdentifierValue(CSSValueNone);
+                return cssValuePool().createIdentifierValue(CSSValueAuto);
+            return cssValuePool().createIdentifierValue(CSSValueNone);
         case CSSPropertyWebkitTextStrokeColor:
             return currentColorOrValidColor(style.get(), style->textStrokeColor());
         case CSSPropertyWebkitTextStrokeWidth:
-            return zoomAdjustedPixelValue(style->textStrokeWidth(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValue(style->textStrokeWidth(), style.get());
         case CSSPropertyTextTransform:
-            return cssValuePool->createValue(style->textTransform());
+            return cssValuePool().createValue(style->textTransform());
         case CSSPropertyTop:
-            return getPositionOffsetValue(style.get(), CSSPropertyTop, cssValuePool, m_node->document()->renderView());
+            return getPositionOffsetValue(style.get(), CSSPropertyTop, m_node->document()->renderView());
         case CSSPropertyUnicodeBidi:
-            return renderUnicodeBidiFlagsToCSSValue(style->unicodeBidi(), cssValuePool);
+            return renderUnicodeBidiFlagsToCSSValue(style->unicodeBidi());
         case CSSPropertyVerticalAlign:
             switch (style->verticalAlign()) {
                 case BASELINE:
-                    return cssValuePool->createIdentifierValue(CSSValueBaseline);
+                    return cssValuePool().createIdentifierValue(CSSValueBaseline);
                 case MIDDLE:
-                    return cssValuePool->createIdentifierValue(CSSValueMiddle);
+                    return cssValuePool().createIdentifierValue(CSSValueMiddle);
                 case SUB:
-                    return cssValuePool->createIdentifierValue(CSSValueSub);
+                    return cssValuePool().createIdentifierValue(CSSValueSub);
                 case SUPER:
-                    return cssValuePool->createIdentifierValue(CSSValueSuper);
+                    return cssValuePool().createIdentifierValue(CSSValueSuper);
                 case TEXT_TOP:
-                    return cssValuePool->createIdentifierValue(CSSValueTextTop);
+                    return cssValuePool().createIdentifierValue(CSSValueTextTop);
                 case TEXT_BOTTOM:
-                    return cssValuePool->createIdentifierValue(CSSValueTextBottom);
+                    return cssValuePool().createIdentifierValue(CSSValueTextBottom);
                 case TOP:
-                    return cssValuePool->createIdentifierValue(CSSValueTop);
+                    return cssValuePool().createIdentifierValue(CSSValueTop);
                 case BOTTOM:
-                    return cssValuePool->createIdentifierValue(CSSValueBottom);
+                    return cssValuePool().createIdentifierValue(CSSValueBottom);
                 case BASELINE_MIDDLE:
-                    return cssValuePool->createIdentifierValue(CSSValueWebkitBaselineMiddle);
+                    return cssValuePool().createIdentifierValue(CSSValueWebkitBaselineMiddle);
                 case LENGTH:
-                    return cssValuePool->createValue(style->verticalAlignLength());
+                    return cssValuePool().createValue(style->verticalAlignLength());
             }
             ASSERT_NOT_REACHED();
             return 0;
         case CSSPropertyVisibility:
-            return cssValuePool->createValue(style->visibility());
+            return cssValuePool().createValue(style->visibility());
         case CSSPropertyWhiteSpace:
-            return cssValuePool->createValue(style->whiteSpace());
+            return cssValuePool().createValue(style->whiteSpace());
         case CSSPropertyWidows:
-            return cssValuePool->createValue(style->widows(), CSSPrimitiveValue::CSS_NUMBER);
+            return cssValuePool().createValue(style->widows(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyWidth:
             if (renderer) {
                 // According to http://www.w3.org/TR/CSS2/visudet.html#the-width-property,
                 // the "width" property does not apply for non-replaced inline elements.
                 if (!renderer->isReplaced() && renderer->isInline())
-                    return cssValuePool->createIdentifierValue(CSSValueAuto);
-                return zoomAdjustedPixelValue(sizingBox(renderer).width(), style.get(), cssValuePool);
+                    return cssValuePool().createIdentifierValue(CSSValueAuto);
+                return zoomAdjustedPixelValue(sizingBox(renderer).width(), style.get());
             }
-            return zoomAdjustedPixelValueForLength(style->width(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValueForLength(style->width(), style.get());
         case CSSPropertyWordBreak:
-            return cssValuePool->createValue(style->wordBreak());
+            return cssValuePool().createValue(style->wordBreak());
         case CSSPropertyWordSpacing:
-            return zoomAdjustedPixelValue(style->wordSpacing(), style.get(), cssValuePool);
+            return zoomAdjustedPixelValue(style->wordSpacing(), style.get());
         case CSSPropertyWordWrap:
-            return cssValuePool->createValue(style->wordWrap());
+            return cssValuePool().createValue(style->wordWrap());
         case CSSPropertyWebkitLineBreak:
-            return cssValuePool->createValue(style->khtmlLineBreak());
+            return cssValuePool().createValue(style->khtmlLineBreak());
         case CSSPropertyWebkitNbspMode:
-            return cssValuePool->createValue(style->nbspMode());
+            return cssValuePool().createValue(style->nbspMode());
         case CSSPropertyWebkitMatchNearestMailBlockquoteColor:
-            return cssValuePool->createValue(style->matchNearestMailBlockquoteColor());
+            return cssValuePool().createValue(style->matchNearestMailBlockquoteColor());
         case CSSPropertyResize:
-            return cssValuePool->createValue(style->resize());
+            return cssValuePool().createValue(style->resize());
         case CSSPropertyWebkitFontKerning:
-            return cssValuePool->createValue(style->fontDescription().kerning());
+            return cssValuePool().createValue(style->fontDescription().kerning());
         case CSSPropertyWebkitFontSmoothing:
-            return cssValuePool->createValue(style->fontDescription().fontSmoothing());
+            return cssValuePool().createValue(style->fontDescription().fontSmoothing());
         case CSSPropertyWebkitFontVariantLigatures: {
             FontDescription::LigaturesState commonLigaturesState = style->fontDescription().commonLigaturesState();
             FontDescription::LigaturesState discretionaryLigaturesState = style->fontDescription().discretionaryLigaturesState();
             FontDescription::LigaturesState historicalLigaturesState = style->fontDescription().historicalLigaturesState();
             if (commonLigaturesState == FontDescription::NormalLigaturesState && discretionaryLigaturesState == FontDescription::NormalLigaturesState
                 && historicalLigaturesState == FontDescription::NormalLigaturesState)
-                return cssValuePool->createIdentifierValue(CSSValueNormal);
+                return cssValuePool().createIdentifierValue(CSSValueNormal);
 
             RefPtr<CSSValueList> valueList = CSSValueList::createSpaceSeparated();
             if (commonLigaturesState != FontDescription::NormalLigaturesState)
-                valueList->append(cssValuePool->createIdentifierValue(commonLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoCommonLigatures : CSSValueCommonLigatures));
+                valueList->append(cssValuePool().createIdentifierValue(commonLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoCommonLigatures : CSSValueCommonLigatures));
             if (discretionaryLigaturesState != FontDescription::NormalLigaturesState)
-                valueList->append(cssValuePool->createIdentifierValue(discretionaryLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoDiscretionaryLigatures : CSSValueDiscretionaryLigatures));
+                valueList->append(cssValuePool().createIdentifierValue(discretionaryLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoDiscretionaryLigatures : CSSValueDiscretionaryLigatures));
             if (historicalLigaturesState != FontDescription::NormalLigaturesState)
-                valueList->append(cssValuePool->createIdentifierValue(historicalLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoHistoricalLigatures : CSSValueHistoricalLigatures));
+                valueList->append(cssValuePool().createIdentifierValue(historicalLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoHistoricalLigatures : CSSValueHistoricalLigatures));
             return valueList;
         }
         case CSSPropertyZIndex:
             if (style->hasAutoZIndex())
-                return cssValuePool->createIdentifierValue(CSSValueAuto);
-            return cssValuePool->createValue(style->zIndex(), CSSPrimitiveValue::CSS_NUMBER);
+                return cssValuePool().createIdentifierValue(CSSValueAuto);
+            return cssValuePool().createValue(style->zIndex(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyZoom:
-            return cssValuePool->createValue(style->zoom(), CSSPrimitiveValue::CSS_NUMBER);
+            return cssValuePool().createValue(style->zoom(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyBoxSizing:
             if (style->boxSizing() == CONTENT_BOX)
-                return cssValuePool->createIdentifierValue(CSSValueContentBox);
-            return cssValuePool->createIdentifierValue(CSSValueBorderBox);
+                return cssValuePool().createIdentifierValue(CSSValueContentBox);
+            return cssValuePool().createIdentifierValue(CSSValueBorderBox);
 #if ENABLE(DASHBOARD_SUPPORT)
         case CSSPropertyWebkitDashboardRegion:
         {
             const Vector<StyleDashboardRegion>& regions = style->dashboardRegions();
             unsigned count = regions.size();
             if (count == 1 && regions[0].type == StyleDashboardRegion::None)
-                return cssValuePool->createIdentifierValue(CSSValueNone);
+                return cssValuePool().createIdentifierValue(CSSValueNone);
 
             RefPtr<DashboardRegion> firstRegion;
             DashboardRegion* previousRegion = 0;
@@ -2060,10 +2051,10 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
 
                 region->m_label = styleRegion.label;
                 LengthBox offset = styleRegion.offset;
-                region->setTop(zoomAdjustedPixelValue(offset.top().value(), style.get(), cssValuePool));
-                region->setRight(zoomAdjustedPixelValue(offset.right().value(), style.get(), cssValuePool));
-                region->setBottom(zoomAdjustedPixelValue(offset.bottom().value(), style.get(), cssValuePool));
-                region->setLeft(zoomAdjustedPixelValue(offset.left().value(), style.get(), cssValuePool));
+                region->setTop(zoomAdjustedPixelValue(offset.top().value(), style.get()));
+                region->setRight(zoomAdjustedPixelValue(offset.right().value(), style.get()));
+                region->setBottom(zoomAdjustedPixelValue(offset.bottom().value(), style.get()));
+                region->setLeft(zoomAdjustedPixelValue(offset.left().value(), style.get()));
                 region->m_isRectangle = (styleRegion.type == StyleDashboardRegion::Rectangle);
                 region->m_isCircle = (styleRegion.type == StyleDashboardRegion::Circle);
 
@@ -2073,27 +2064,27 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
                     firstRegion = region;
                 previousRegion = region.get();
             }
-            return cssValuePool->createValue(firstRegion.release());
+            return cssValuePool().createValue(firstRegion.release());
         }
 #endif
         case CSSPropertyWebkitAnimationDelay:
-            return getDelayValue(style->animations(), cssValuePool);
+            return getDelayValue(style->animations());
         case CSSPropertyWebkitAnimationDirection: {
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             const AnimationList* t = style->animations();
             if (t) {
                 for (size_t i = 0; i < t->size(); ++i) {
                     if (t->animation(i)->direction())
-                        list->append(cssValuePool->createIdentifierValue(CSSValueAlternate));
+                        list->append(cssValuePool().createIdentifierValue(CSSValueAlternate));
                     else
-                        list->append(cssValuePool->createIdentifierValue(CSSValueNormal));
+                        list->append(cssValuePool().createIdentifierValue(CSSValueNormal));
                 }
             } else
-                list->append(cssValuePool->createIdentifierValue(CSSValueNormal));
+                list->append(cssValuePool().createIdentifierValue(CSSValueNormal));
             return list.release();
         }
         case CSSPropertyWebkitAnimationDuration:
-            return getDurationValue(style->animations(), cssValuePool);
+            return getDurationValue(style->animations());
         case CSSPropertyWebkitAnimationFillMode: {
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             const AnimationList* t = style->animations();
@@ -2101,21 +2092,21 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
                 for (size_t i = 0; i < t->size(); ++i) {
                     switch (t->animation(i)->fillMode()) {
                     case AnimationFillModeNone:
-                        list->append(cssValuePool->createIdentifierValue(CSSValueNone));
+                        list->append(cssValuePool().createIdentifierValue(CSSValueNone));
                         break;
                     case AnimationFillModeForwards:
-                        list->append(cssValuePool->createIdentifierValue(CSSValueForwards));
+                        list->append(cssValuePool().createIdentifierValue(CSSValueForwards));
                         break;
                     case AnimationFillModeBackwards:
-                        list->append(cssValuePool->createIdentifierValue(CSSValueBackwards));
+                        list->append(cssValuePool().createIdentifierValue(CSSValueBackwards));
                         break;
                     case AnimationFillModeBoth:
-                        list->append(cssValuePool->createIdentifierValue(CSSValueBoth));
+                        list->append(cssValuePool().createIdentifierValue(CSSValueBoth));
                         break;
                     }
                 }
             } else
-                list->append(cssValuePool->createIdentifierValue(CSSValueNone));
+                list->append(cssValuePool().createIdentifierValue(CSSValueNone));
             return list.release();
         }
         case CSSPropertyWebkitAnimationIterationCount: {
@@ -2125,12 +2116,12 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
                 for (size_t i = 0; i < t->size(); ++i) {
                     double iterationCount = t->animation(i)->iterationCount();
                     if (iterationCount == Animation::IterationCountInfinite)
-                        list->append(cssValuePool->createIdentifierValue(CSSValueInfinite));
+                        list->append(cssValuePool().createIdentifierValue(CSSValueInfinite));
                     else
-                        list->append(cssValuePool->createValue(iterationCount, CSSPrimitiveValue::CSS_NUMBER));
+                        list->append(cssValuePool().createValue(iterationCount, CSSPrimitiveValue::CSS_NUMBER));
                 }
             } else
-                list->append(cssValuePool->createValue(Animation::initialAnimationIterationCount(), CSSPrimitiveValue::CSS_NUMBER));
+                list->append(cssValuePool().createValue(Animation::initialAnimationIterationCount(), CSSPrimitiveValue::CSS_NUMBER));
             return list.release();
         }
         case CSSPropertyWebkitAnimationName: {
@@ -2138,9 +2129,9 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
             const AnimationList* t = style->animations();
             if (t) {
                 for (size_t i = 0; i < t->size(); ++i)
-                    list->append(cssValuePool->createValue(t->animation(i)->name(), CSSPrimitiveValue::CSS_STRING));
+                    list->append(cssValuePool().createValue(t->animation(i)->name(), CSSPrimitiveValue::CSS_STRING));
             } else
-                list->append(cssValuePool->createIdentifierValue(CSSValueNone));
+                list->append(cssValuePool().createIdentifierValue(CSSValueNone));
             return list.release();
         }
         case CSSPropertyWebkitAnimationPlayState: {
@@ -2150,137 +2141,137 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
                 for (size_t i = 0; i < t->size(); ++i) {
                     int prop = t->animation(i)->playState();
                     if (prop == AnimPlayStatePlaying)
-                        list->append(cssValuePool->createIdentifierValue(CSSValueRunning));
+                        list->append(cssValuePool().createIdentifierValue(CSSValueRunning));
                     else
-                        list->append(cssValuePool->createIdentifierValue(CSSValuePaused));
+                        list->append(cssValuePool().createIdentifierValue(CSSValuePaused));
                 }
             } else
-                list->append(cssValuePool->createIdentifierValue(CSSValueRunning));
+                list->append(cssValuePool().createIdentifierValue(CSSValueRunning));
             return list.release();
         }
         case CSSPropertyWebkitAnimationTimingFunction:
             return getTimingFunctionValue(style->animations());
         case CSSPropertyWebkitAppearance:
-            return cssValuePool->createValue(style->appearance());
+            return cssValuePool().createValue(style->appearance());
         case CSSPropertyWebkitAspectRatio:
             if (!style->hasAspectRatio())
-                return cssValuePool->createIdentifierValue(CSSValueNone);
+                return cssValuePool().createIdentifierValue(CSSValueNone);
             return CSSAspectRatioValue::create(style->aspectRatioNumerator(), style->aspectRatioDenominator());
         case CSSPropertyWebkitBackfaceVisibility:
-            return cssValuePool->createIdentifierValue((style->backfaceVisibility() == BackfaceVisibilityHidden) ? CSSValueHidden : CSSValueVisible);
+            return cssValuePool().createIdentifierValue((style->backfaceVisibility() == BackfaceVisibilityHidden) ? CSSValueHidden : CSSValueVisible);
         case CSSPropertyWebkitBorderImage:
-            return valueForNinePieceImage(style->borderImage(), cssValuePool);
+            return valueForNinePieceImage(style->borderImage());
         case CSSPropertyBorderImageOutset:
-            return valueForNinePieceImageQuad(style->borderImage().outset(), cssValuePool);
+            return valueForNinePieceImageQuad(style->borderImage().outset());
         case CSSPropertyBorderImageRepeat:
-            return valueForNinePieceImageRepeat(style->borderImage(), cssValuePool);
+            return valueForNinePieceImageRepeat(style->borderImage());
         case CSSPropertyBorderImageSlice:
-            return valueForNinePieceImageSlice(style->borderImage(), cssValuePool);
+            return valueForNinePieceImageSlice(style->borderImage());
         case CSSPropertyBorderImageWidth:
-            return valueForNinePieceImageQuad(style->borderImage().borderSlices(), cssValuePool);
+            return valueForNinePieceImageQuad(style->borderImage().borderSlices());
         case CSSPropertyWebkitMaskBoxImage:
-            return valueForNinePieceImage(style->maskBoxImage(), cssValuePool);
+            return valueForNinePieceImage(style->maskBoxImage());
         case CSSPropertyWebkitMaskBoxImageOutset:
-            return valueForNinePieceImageQuad(style->maskBoxImage().outset(), cssValuePool);
+            return valueForNinePieceImageQuad(style->maskBoxImage().outset());
         case CSSPropertyWebkitMaskBoxImageRepeat:
-            return valueForNinePieceImageRepeat(style->maskBoxImage(), cssValuePool);
+            return valueForNinePieceImageRepeat(style->maskBoxImage());
         case CSSPropertyWebkitMaskBoxImageSlice:
-            return valueForNinePieceImageSlice(style->maskBoxImage(), cssValuePool);
+            return valueForNinePieceImageSlice(style->maskBoxImage());
         case CSSPropertyWebkitMaskBoxImageWidth:
-            return valueForNinePieceImageQuad(style->maskBoxImage().borderSlices(), cssValuePool);
+            return valueForNinePieceImageQuad(style->maskBoxImage().borderSlices());
         case CSSPropertyWebkitMaskBoxImageSource:
             if (style->maskBoxImageSource())
                 return style->maskBoxImageSource()->cssValue();
-            return cssValuePool->createIdentifierValue(CSSValueNone);
+            return cssValuePool().createIdentifierValue(CSSValueNone);
         case CSSPropertyWebkitFontSizeDelta:
             // Not a real style property -- used by the editing engine -- so has no computed value.
             break;
         case CSSPropertyWebkitMarginBottomCollapse:
         case CSSPropertyWebkitMarginAfterCollapse:
-            return cssValuePool->createValue(style->marginAfterCollapse());
+            return cssValuePool().createValue(style->marginAfterCollapse());
         case CSSPropertyWebkitMarginTopCollapse:
         case CSSPropertyWebkitMarginBeforeCollapse:
-            return cssValuePool->createValue(style->marginBeforeCollapse());
+            return cssValuePool().createValue(style->marginBeforeCollapse());
 #if ENABLE(OVERFLOW_SCROLLING)
         case CSSPropertyWebkitOverflowScrolling:
             if (!style->useTouchOverflowScrolling())
-                return cssValuePool->createIdentifierValue(CSSValueAuto);
-            return cssValuePool->createIdentifierValue(CSSValueTouch);
+                return cssValuePool().createIdentifierValue(CSSValueAuto);
+            return cssValuePool().createIdentifierValue(CSSValueTouch);
 #endif
         case CSSPropertyWebkitPerspective:
             if (!style->hasPerspective())
-                return cssValuePool->createIdentifierValue(CSSValueNone);
-            return zoomAdjustedPixelValue(style->perspective(), style.get(), cssValuePool);
+                return cssValuePool().createIdentifierValue(CSSValueNone);
+            return zoomAdjustedPixelValue(style->perspective(), style.get());
         case CSSPropertyWebkitPerspectiveOrigin: {
             RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
             if (renderer) {
                 LayoutRect box = sizingBox(renderer);
                 RenderView* renderView = m_node->document()->renderView();
-                list->append(zoomAdjustedPixelValue(minimumValueForLength(style->perspectiveOriginX(), box.width(), renderView), style.get(), cssValuePool));
-                list->append(zoomAdjustedPixelValue(minimumValueForLength(style->perspectiveOriginY(), box.height(), renderView), style.get(), cssValuePool));
+                list->append(zoomAdjustedPixelValue(minimumValueForLength(style->perspectiveOriginX(), box.width(), renderView), style.get()));
+                list->append(zoomAdjustedPixelValue(minimumValueForLength(style->perspectiveOriginY(), box.height(), renderView), style.get()));
             }
             else {
-                list->append(zoomAdjustedPixelValueForLength(style->perspectiveOriginX(), style.get(), cssValuePool));
-                list->append(zoomAdjustedPixelValueForLength(style->perspectiveOriginY(), style.get(), cssValuePool));
+                list->append(zoomAdjustedPixelValueForLength(style->perspectiveOriginX(), style.get()));
+                list->append(zoomAdjustedPixelValueForLength(style->perspectiveOriginY(), style.get()));
 
             }
             return list.release();
         }
         case CSSPropertyWebkitRtlOrdering:
-            return cssValuePool->createIdentifierValue(style->rtlOrdering() ? CSSValueVisual : CSSValueLogical);
+            return cssValuePool().createIdentifierValue(style->rtlOrdering() ? CSSValueVisual : CSSValueLogical);
 #if ENABLE(TOUCH_EVENTS)
         case CSSPropertyWebkitTapHighlightColor:
             return currentColorOrValidColor(style.get(), style->tapHighlightColor());
 #endif
         case CSSPropertyWebkitUserDrag:
-            return cssValuePool->createValue(style->userDrag());
+            return cssValuePool().createValue(style->userDrag());
         case CSSPropertyWebkitUserSelect:
-            return cssValuePool->createValue(style->userSelect());
+            return cssValuePool().createValue(style->userSelect());
         case CSSPropertyBorderBottomLeftRadius:
-            return getBorderRadiusCornerValue(style->borderBottomLeftRadius(), style.get(), cssValuePool, m_node->document()->renderView());
+            return getBorderRadiusCornerValue(style->borderBottomLeftRadius(), style.get(), m_node->document()->renderView());
         case CSSPropertyBorderBottomRightRadius:
-            return getBorderRadiusCornerValue(style->borderBottomRightRadius(), style.get(), cssValuePool, m_node->document()->renderView());
+            return getBorderRadiusCornerValue(style->borderBottomRightRadius(), style.get(), m_node->document()->renderView());
         case CSSPropertyBorderTopLeftRadius:
-            return getBorderRadiusCornerValue(style->borderTopLeftRadius(), style.get(), cssValuePool, m_node->document()->renderView());
+            return getBorderRadiusCornerValue(style->borderTopLeftRadius(), style.get(), m_node->document()->renderView());
         case CSSPropertyBorderTopRightRadius:
-            return getBorderRadiusCornerValue(style->borderTopRightRadius(), style.get(), cssValuePool, m_node->document()->renderView());
+            return getBorderRadiusCornerValue(style->borderTopRightRadius(), style.get(), m_node->document()->renderView());
         case CSSPropertyClip: {
             if (!style->hasClip())
-                return cssValuePool->createIdentifierValue(CSSValueAuto);
+                return cssValuePool().createIdentifierValue(CSSValueAuto);
             RefPtr<Rect> rect = Rect::create();
-            rect->setTop(zoomAdjustedPixelValue(style->clip().top().value(), style.get(), cssValuePool));
-            rect->setRight(zoomAdjustedPixelValue(style->clip().right().value(), style.get(), cssValuePool));
-            rect->setBottom(zoomAdjustedPixelValue(style->clip().bottom().value(), style.get(), cssValuePool));
-            rect->setLeft(zoomAdjustedPixelValue(style->clip().left().value(), style.get(), cssValuePool));
-            return cssValuePool->createValue(rect.release());
+            rect->setTop(zoomAdjustedPixelValue(style->clip().top().value(), style.get()));
+            rect->setRight(zoomAdjustedPixelValue(style->clip().right().value(), style.get()));
+            rect->setBottom(zoomAdjustedPixelValue(style->clip().bottom().value(), style.get()));
+            rect->setLeft(zoomAdjustedPixelValue(style->clip().left().value(), style.get()));
+            return cssValuePool().createValue(rect.release());
         }
         case CSSPropertySpeak:
-            return cssValuePool->createValue(style->speak());
+            return cssValuePool().createValue(style->speak());
         case CSSPropertyWebkitTransform:
-            return computedTransform(renderer, style.get(), cssValuePool);
+            return computedTransform(renderer, style.get());
         case CSSPropertyWebkitTransformOrigin: {
             RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
             if (renderer) {
                 IntRect box = sizingBox(renderer);
                 RenderView* renderView = m_node->document()->renderView();
-                list->append(zoomAdjustedPixelValue(minimumValueForLength(style->transformOriginX(), box.width(), renderView), style.get(), cssValuePool));
-                list->append(zoomAdjustedPixelValue(minimumValueForLength(style->transformOriginY(), box.height(), renderView), style.get(), cssValuePool));
+                list->append(zoomAdjustedPixelValue(minimumValueForLength(style->transformOriginX(), box.width(), renderView), style.get()));
+                list->append(zoomAdjustedPixelValue(minimumValueForLength(style->transformOriginY(), box.height(), renderView), style.get()));
                 if (style->transformOriginZ() != 0)
-                    list->append(zoomAdjustedPixelValue(style->transformOriginZ(), style.get(), cssValuePool));
+                    list->append(zoomAdjustedPixelValue(style->transformOriginZ(), style.get()));
             } else {
-                list->append(zoomAdjustedPixelValueForLength(style->transformOriginX(), style.get(), cssValuePool));
-                list->append(zoomAdjustedPixelValueForLength(style->transformOriginY(), style.get(), cssValuePool));
+                list->append(zoomAdjustedPixelValueForLength(style->transformOriginX(), style.get()));
+                list->append(zoomAdjustedPixelValueForLength(style->transformOriginY(), style.get()));
                 if (style->transformOriginZ() != 0)
-                    list->append(zoomAdjustedPixelValue(style->transformOriginZ(), style.get(), cssValuePool));
+                    list->append(zoomAdjustedPixelValue(style->transformOriginZ(), style.get()));
             }
             return list.release();
         }
         case CSSPropertyWebkitTransformStyle:
-            return cssValuePool->createIdentifierValue((style->transformStyle3D() == TransformStyle3DPreserve3D) ? CSSValuePreserve3d : CSSValueFlat);
+            return cssValuePool().createIdentifierValue((style->transformStyle3D() == TransformStyle3DPreserve3D) ? CSSValuePreserve3d : CSSValueFlat);
         case CSSPropertyWebkitTransitionDelay:
-            return getDelayValue(style->transitions(), cssValuePool);
+            return getDelayValue(style->transitions());
         case CSSPropertyWebkitTransitionDuration:
-            return getDurationValue(style->transitions(), cssValuePool);
+            return getDurationValue(style->transitions());
         case CSSPropertyWebkitTransitionProperty: {
             RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
             const AnimationList* t = style->transitions();
@@ -2289,71 +2280,71 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
                     RefPtr<CSSValue> propertyValue;
                     const Animation* animation = t->animation(i);
                     if (animation->animationMode() == Animation::AnimateNone)
-                        propertyValue = cssValuePool->createIdentifierValue(CSSValueNone);
+                        propertyValue = cssValuePool().createIdentifierValue(CSSValueNone);
                     else if (animation->animationMode() == Animation::AnimateAll)
-                        propertyValue = cssValuePool->createIdentifierValue(CSSValueAll);
+                        propertyValue = cssValuePool().createIdentifierValue(CSSValueAll);
                     else
-                        propertyValue = cssValuePool->createValue(getPropertyName(animation->property()), CSSPrimitiveValue::CSS_STRING);
+                        propertyValue = cssValuePool().createValue(getPropertyName(animation->property()), CSSPrimitiveValue::CSS_STRING);
                     list->append(propertyValue);
                 }
             } else
-                list->append(cssValuePool->createIdentifierValue(CSSValueAll));
+                list->append(cssValuePool().createIdentifierValue(CSSValueAll));
             return list.release();
         }
         case CSSPropertyWebkitTransitionTimingFunction:
             return getTimingFunctionValue(style->transitions());
         case CSSPropertyPointerEvents:
-            return cssValuePool->createValue(style->pointerEvents());
+            return cssValuePool().createValue(style->pointerEvents());
         case CSSPropertyWebkitColorCorrection:
-            return cssValuePool->createValue(style->colorSpace());
+            return cssValuePool().createValue(style->colorSpace());
         case CSSPropertyWebkitLineGrid:
             if (style->lineGrid().isNull())
-                return cssValuePool->createIdentifierValue(CSSValueNone);
-            return cssValuePool->createValue(style->lineGrid(), CSSPrimitiveValue::CSS_STRING);
+                return cssValuePool().createIdentifierValue(CSSValueNone);
+            return cssValuePool().createValue(style->lineGrid(), CSSPrimitiveValue::CSS_STRING);
         case CSSPropertyWebkitLineSnap:
             return CSSPrimitiveValue::create(style->lineSnap());
         case CSSPropertyWebkitLineAlign:
             return CSSPrimitiveValue::create(style->lineAlign());
         case CSSPropertyWebkitWritingMode:
-            return cssValuePool->createValue(style->writingMode());
+            return cssValuePool().createValue(style->writingMode());
         case CSSPropertyWebkitTextCombine:
-            return cssValuePool->createValue(style->textCombine());
+            return cssValuePool().createValue(style->textCombine());
         case CSSPropertyWebkitTextOrientation:
             return CSSPrimitiveValue::create(style->fontDescription().textOrientation());
         case CSSPropertyWebkitLineBoxContain:
-            return createLineBoxContainValue(cssValuePool, style->lineBoxContain());
+            return createLineBoxContainValue(style->lineBoxContain());
         case CSSPropertyContent:
-            return contentToCSSValue(style.get(), cssValuePool);
+            return contentToCSSValue(style.get());
         case CSSPropertyCounterIncrement:
-            return counterToCSSValue(style.get(), propertyID, cssValuePool);
+            return counterToCSSValue(style.get(), propertyID);
         case CSSPropertyCounterReset:
-            return counterToCSSValue(style.get(), propertyID, cssValuePool);
+            return counterToCSSValue(style.get(), propertyID);
         case CSSPropertyWebkitFlowInto:
             if (style->flowThread().isNull())
-                return cssValuePool->createIdentifierValue(CSSValueNone);
-            return cssValuePool->createValue(style->flowThread(), CSSPrimitiveValue::CSS_STRING);
+                return cssValuePool().createIdentifierValue(CSSValueNone);
+            return cssValuePool().createValue(style->flowThread(), CSSPrimitiveValue::CSS_STRING);
         case CSSPropertyWebkitFlowFrom:
             if (style->regionThread().isNull())
-                return cssValuePool->createIdentifierValue(CSSValueNone);
-            return cssValuePool->createValue(style->regionThread(), CSSPrimitiveValue::CSS_STRING);
+                return cssValuePool().createIdentifierValue(CSSValueNone);
+            return cssValuePool().createValue(style->regionThread(), CSSPrimitiveValue::CSS_STRING);
         case CSSPropertyWebkitRegionOverflow:
-            return cssValuePool->createValue(style->regionOverflow());
+            return cssValuePool().createValue(style->regionOverflow());
         case CSSPropertyWebkitWrapFlow:
-            return cssValuePool->createValue(style->wrapFlow());
+            return cssValuePool().createValue(style->wrapFlow());
         case CSSPropertyWebkitWrapMargin:
-            return cssValuePool->createValue(style->wrapMargin());
+            return cssValuePool().createValue(style->wrapMargin());
         case CSSPropertyWebkitWrapPadding:
-            return cssValuePool->createValue(style->wrapPadding());
+            return cssValuePool().createValue(style->wrapPadding());
         case CSSPropertyWebkitShapeInside:
             if (!style->wrapShapeInside())
-                return cssValuePool->createIdentifierValue(CSSValueAuto);
-            return cssValuePool->createValue(style->wrapShapeInside());
+                return cssValuePool().createIdentifierValue(CSSValueAuto);
+            return cssValuePool().createValue(style->wrapShapeInside());
         case CSSPropertyWebkitShapeOutside:
             if (!style->wrapShapeOutside())
-                return cssValuePool->createIdentifierValue(CSSValueAuto);
-            return cssValuePool->createValue(style->wrapShapeOutside());
+                return cssValuePool().createIdentifierValue(CSSValueAuto);
+            return cssValuePool().createValue(style->wrapShapeOutside());
         case CSSPropertyWebkitWrapThrough:
-            return cssValuePool->createValue(style->wrapThrough());
+            return cssValuePool().createValue(style->wrapThrough());
 #if ENABLE(CSS_FILTERS)
         case CSSPropertyWebkitFilter:
             return valueForFilter(style.get());
@@ -2381,9 +2372,9 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
         case CSSPropertyBorderLeft:
             return getCSSPropertyValuesForShorthandProperties(borderLeftShorthand());
         case CSSPropertyBorderImage:
-            return valueForNinePieceImage(style->borderImage(), cssValuePool);
+            return valueForNinePieceImage(style->borderImage());
         case CSSPropertyBorderRadius:
-            return getBorderRadiusShorthandValue(style.get(), cssValuePool, m_node->document()->renderView());
+            return getBorderRadiusShorthandValue(style.get(), m_node->document()->renderView());
         case CSSPropertyBorderRight:
             return getCSSPropertyValuesForShorthandProperties(borderRightShorthand());
         case CSSPropertyBorderStyle:
index f64d23b..dcacca8 100644 (file)
@@ -30,7 +30,6 @@ namespace WebCore {
 
 class CSSPrimitiveValue;
 class CSSValueList;
-class CSSValuePool;
 class Color;
 class Node;
 class RenderStyle;
index 7ac39d6..125e44a 100644 (file)
@@ -173,12 +173,6 @@ static bool hasPrefix(const char* string, unsigned length, const char* prefix)
     return false;
 }
 
-inline void CSSParser::ensureCSSValuePool()
-{
-    if (!m_cssValuePool)
-        m_cssValuePool = CSSValuePool::create();
-}
-
 CSSParser::CSSParser(CSSParserMode cssParserMode)
     : m_cssParserMode(cssParserMode)
     , m_important(false)
@@ -320,7 +314,7 @@ static inline bool isColorPropertyID(CSSPropertyID propertyId)
     }
 }
 
-static bool parseColorValue(StylePropertySet* declaration, CSSPropertyID propertyId, const String& string, bool important, CSSParserMode cssParserMode, CSSStyleSheet* contextStyleSheet)
+static bool parseColorValue(StylePropertySet* declaration, CSSPropertyID propertyId, const String& string, bool important, CSSParserMode cssParserMode)
 {
     bool strict = isStrictParserMode(cssParserMode);
     if (!string.length())
@@ -341,24 +335,15 @@ static bool parseColorValue(StylePropertySet* declaration, CSSPropertyID propert
         validPrimitive = true;
     }
 
-    Document* document = contextStyleSheet->findDocument();
     if (validPrimitive) {
-        RefPtr<CSSValue> value;
-        if (document)
-            value = document->cssValuePool()->createIdentifierValue(valueID);
-        else
-            value = CSSPrimitiveValue::createIdentifier(valueID);
+        RefPtr<CSSValue> value = cssValuePool().createIdentifierValue(valueID);
         declaration->addParsedProperty(CSSProperty(propertyId, value.release(), important));
         return true;
     }
     RGBA32 color;
     if (!CSSParser::fastParseColor(color, string, strict && string[0] != '#'))
         return false;
-    RefPtr<CSSValue> value;
-    if (document)
-        value = document->cssValuePool()->createColorValue(color);
-    else
-        value = CSSPrimitiveValue::createColor(color);
+    RefPtr<CSSValue> value = cssValuePool().createColorValue(color);
     declaration->addParsedProperty(CSSProperty(propertyId, value.release(), important));
     return true;
 }
@@ -407,7 +392,7 @@ static inline bool isSimpleLengthPropertyID(CSSPropertyID propertyId, bool& acce
     }
 }
 
-static bool parseSimpleLengthValue(StylePropertySet* declaration, CSSPropertyID propertyId, const String& string, bool important, CSSParserMode cssParserMode, CSSStyleSheet* contextStyleSheet)
+static bool parseSimpleLengthValue(StylePropertySet* declaration, CSSPropertyID propertyId, const String& string, bool important, CSSParserMode cssParserMode)
 {
     bool acceptsNegativeNumbers;
     bool strict = isStrictParserMode(cssParserMode);
@@ -472,12 +457,7 @@ static bool parseSimpleLengthValue(StylePropertySet* declaration, CSSPropertyID
     if (number < 0 && !acceptsNegativeNumbers)
         return false;
 
-    Document* document = contextStyleSheet->findDocument();
-    RefPtr<CSSValue> value;
-    if (document)
-        value = document->cssValuePool()->createValue(number, unit);
-    else
-        value = CSSPrimitiveValue::create(number, unit);
+    RefPtr<CSSValue> value = cssValuePool().createValue(number, unit);
     declaration->addParsedProperty(CSSProperty(propertyId, value.release(), important));
     return true;
 }
@@ -899,7 +879,7 @@ static inline bool isKeywordPropertyID(CSSPropertyID propertyId)
     }
 }
 
-static bool parseKeywordValue(StylePropertySet* declaration, CSSPropertyID propertyId, const String& string, bool important, CSSStyleSheet* contextStyleSheet)
+static bool parseKeywordValue(StylePropertySet* declaration, CSSPropertyID propertyId, const String& string, bool important)
 {
     if (string.isEmpty())
         return false;
@@ -915,15 +895,13 @@ static bool parseKeywordValue(StylePropertySet* declaration, CSSPropertyID prope
     if (!valueID)
         return false;
 
-    Document* document = contextStyleSheet->findDocument();
     RefPtr<CSSValue> value;
-    CSSValuePool* cssValuePool = document ? document->cssValuePool().get() : 0;
     if (valueID == CSSValueInherit)
-        value = cssValuePool ? cssValuePool->createInheritedValue() : CSSInheritedValue::create();
+        value = cssValuePool().createInheritedValue();
     else if (valueID == CSSValueInitial)
-        value = cssValuePool ? cssValuePool->createExplicitInitialValue() : CSSInitialValue::createExplicit();
+        value = cssValuePool().createExplicitInitialValue();
     else if (isValidKeywordPropertyAndValue(propertyId, valueID))
-        value = cssValuePool ? cssValuePool->createIdentifierValue(valueID) : CSSPrimitiveValue::createIdentifier(valueID);
+        value = cssValuePool().createIdentifierValue(valueID);
     else
         return false;
 
@@ -941,11 +919,11 @@ PassRefPtr<CSSValueList> CSSParser::parseFontFaceValue(const AtomicString& strin
 
 bool CSSParser::parseValue(StylePropertySet* declaration, CSSPropertyID propertyID, const String& string, bool important, CSSParserMode cssParserMode, CSSStyleSheet* contextStyleSheet)
 {
-    if (parseSimpleLengthValue(declaration, propertyID, string, important, cssParserMode, contextStyleSheet))
+    if (parseSimpleLengthValue(declaration, propertyID, string, important, cssParserMode))
         return true;
-    if (parseColorValue(declaration, propertyID, string, important, cssParserMode, contextStyleSheet))
+    if (parseColorValue(declaration, propertyID, string, important, cssParserMode))
         return true;
-    if (parseKeywordValue(declaration, propertyID, string, important, contextStyleSheet))
+    if (parseKeywordValue(declaration, propertyID, string, important))
         return true;
     CSSParser parser(cssParserMode);
     return parser.parseValue(declaration, propertyID, string, important, contextStyleSheet);
@@ -1004,10 +982,6 @@ bool CSSParser::parseColor(RGBA32& color, const String& string, bool strict)
 
 bool CSSParser::parseColor(const String& string)
 {
-    // This function may be called without a stylesheet set on the parser, so we need to
-    // make sure that we have a CSSValuePool or we'll crash below cssyyparse().
-    ensureCSSValuePool();
-
     setupParser("@-webkit-decls{color:", string, "} ");
     cssyyparse(this);
     m_rule = 0;
@@ -1128,8 +1102,6 @@ void CSSParser::clearProperties()
 void CSSParser::setStyleSheet(CSSStyleSheet* styleSheet)
 {
     m_styleSheet = styleSheet;
-    Document* document = findDocument();
-    m_cssValuePool = document ? document->cssValuePool() : CSSValuePool::create();
 }
 
 Document* CSSParser::findDocument() const
@@ -1249,13 +1221,13 @@ inline PassRefPtr<CSSPrimitiveValue> CSSParser::createPrimitiveNumericValue(CSSP
     ASSERT((value->unit >= CSSPrimitiveValue::CSS_NUMBER && value->unit <= CSSPrimitiveValue::CSS_KHZ)
            || (value->unit >= CSSPrimitiveValue::CSS_TURN && value->unit <= CSSPrimitiveValue::CSS_REMS)
            || (value->unit >= CSSPrimitiveValue::CSS_VW && value->unit <= CSSPrimitiveValue::CSS_VMIN));
-    return cssValuePool()->createValue(value->fValue, static_cast<CSSPrimitiveValue::UnitTypes>(value->unit));
+    return cssValuePool().createValue(value->fValue, static_cast<CSSPrimitiveValue::UnitTypes>(value->unit));
 }
 
 inline PassRefPtr<CSSPrimitiveValue> CSSParser::createPrimitiveStringValue(CSSParserValue* value)
 {
     ASSERT(value->unit == CSSPrimitiveValue::CSS_STRING || value->unit == CSSPrimitiveValue::CSS_IDENT);
-    return cssValuePool()->createValue(value->string, CSSPrimitiveValue::CSS_STRING);
+    return cssValuePool().createValue(value->string, CSSPrimitiveValue::CSS_STRING);
 }
 
 static int unitFromString(CSSParserValue* value)
@@ -1347,7 +1319,7 @@ void CSSParser::checkForOrphanedUnits()
 inline PassRefPtr<CSSPrimitiveValue> CSSParser::parseValidPrimitive(int identifier, CSSParserValue* value)
 {
     if (identifier)
-        return cssValuePool()->createIdentifierValue(identifier);
+        return cssValuePool().createIdentifierValue(identifier);
     if (value->unit == CSSPrimitiveValue::CSS_STRING)
         return createPrimitiveStringValue(value);
     if (value->unit >= CSSPrimitiveValue::CSS_NUMBER && value->unit <= CSSPrimitiveValue::CSS_KHZ)
@@ -1389,13 +1361,13 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
     if (id == CSSValueInherit) {
         if (num != 1)
             return false;
-        addProperty(propId, cssValuePool()->createInheritedValue(), important);
+        addProperty(propId, cssValuePool().createInheritedValue(), important);
         return true;
     }
     else if (id == CSSValueInitial) {
         if (num != 1)
             return false;
-        addProperty(propId, cssValuePool()->createExplicitInitialValue(), important);
+        addProperty(propId, cssValuePool().createExplicitInitialValue(), important);
         return true;
     }
 
@@ -1404,7 +1376,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
             return false;
         if (m_valueList->next() && !inShorthand())
             return false;
-        addProperty(propId, cssValuePool()->createIdentifierValue(id), important);
+        addProperty(propId, cssValuePool().createIdentifierValue(id), important);
         return true;
     }
 
@@ -1442,7 +1414,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
                 switch (value->id) {
                 case CSSValueBidiOverride:
                 case CSSValueWebkitIsolate:
-                    list->append(cssValuePool()->createIdentifierValue(value->id));
+                    list->append(cssValuePool().createIdentifierValue(value->id));
                     break;
                 default:
                     isValid = false;
@@ -1611,9 +1583,9 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
                 if (list->length() != 1)
                     return false;
             } else if (inQuirksMode() && value->id == CSSValueHand) // MSIE 5 compatibility :/
-                list->append(cssValuePool()->createIdentifierValue(CSSValuePointer));
+                list->append(cssValuePool().createIdentifierValue(CSSValuePointer));
             else if (value && ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitGrabbing) || value->id == CSSValueCopy || value->id == CSSValueNone))
-                list->append(cssValuePool()->createIdentifierValue(value->id));
+                list->append(cssValuePool().createIdentifierValue(value->id));
             m_valueList->next();
             parsedValue = list.release();
             break;
@@ -1678,7 +1650,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
     case CSSPropertyBorderImageSource:
     case CSSPropertyWebkitMaskBoxImageSource:
         if (id == CSSValueNone) {
-            parsedValue = cssValuePool()->createIdentifierValue(CSSValueNone);
+            parsedValue = cssValuePool().createIdentifierValue(CSSValueNone);
             m_valueList->next();
         } else if (value->unit == CSSPrimitiveValue::CSS_URI) {
             if (m_styleSheet) {
@@ -1862,7 +1834,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
                 case CSSValueUnderline:
                 case CSSValueOverline:
                 case CSSValueLineThrough:
-                    list->append(cssValuePool()->createIdentifierValue(value->id));
+                    list->append(cssValuePool().createIdentifierValue(value->id));
                     break;
                 default:
                     isValid = false;
@@ -1961,7 +1933,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
             parsedValue2 = parsedValue1;
 
         RefPtr<Pair> pair = Pair::create(parsedValue1.release(), parsedValue2.release());
-        RefPtr<CSSPrimitiveValue> val = cssValuePool()->createValue(pair.release());
+        RefPtr<CSSPrimitiveValue> val = cssValuePool().createValue(pair.release());
         addProperty(propId, val.release(), important);
         return true;
     }
@@ -2027,7 +1999,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
     case CSSPropertyWebkitFlexOrder:
         if (validUnit(value, FInteger, CSSStrictMode)) {
             // We restrict the smallest value to int min + 2 because we use int min and int min + 1 as special values in a hash set.
-            parsedValue = cssValuePool()->createValue(max(static_cast<double>(std::numeric_limits<int>::min() + 2), value->fValue),
+            parsedValue = cssValuePool().createValue(max(static_cast<double>(std::numeric_limits<int>::min() + 2), value->fValue),
                                                              static_cast<CSSPrimitiveValue::UnitTypes>(value->unit));
             m_valueList->next();
         }
@@ -2247,7 +2219,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
         else if (value->unit == CSSPrimitiveValue::CSS_IDENT) {
             String lineGridValue = String(value->string);
             if (!lineGridValue.isEmpty()) {
-                addProperty(propId, cssValuePool()->createValue(lineGridValue, CSSPrimitiveValue::CSS_STRING), important);
+                addProperty(propId, cssValuePool().createValue(lineGridValue, CSSPrimitiveValue::CSS_STRING), important);
                 return true;
             }
         }
@@ -2300,7 +2272,7 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
         if (parseShorthand(propId, borderAbridgedShorthand(), important)) {
             // The CSS3 Borders and Backgrounds specification says that border also resets border-image. It's as
             // though a value of none was specified for the image.
-            addProperty(CSSPropertyBorderImage, cssValuePool()->createImplicitInitialValue(), important);
+            addProperty(CSSPropertyBorderImage, cssValuePool().createImplicitInitialValue(), important);
             return true;
         }
         return false;
@@ -2547,11 +2519,11 @@ void CSSParser::addFillValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> rval)
         lval = rval;
 }
 
-static bool parseBackgroundClip(CSSParserValue* parserValue, RefPtr<CSSValue>& cssValue, CSSValuePool* cssValuePool)
+static bool parseBackgroundClip(CSSParserValue* parserValue, RefPtr<CSSValue>& cssValue)
 {
     if (parserValue->id == CSSValueBorderBox || parserValue->id == CSSValuePaddingBox
         || parserValue->id == CSSValueContentBox || parserValue->id == CSSValueWebkitText) {
-        cssValue = cssValuePool->createIdentifierValue(parserValue->id);
+        cssValue = cssValuePool().createIdentifierValue(parserValue->id);
         return true;
     }
     return false;
@@ -2587,14 +2559,14 @@ bool CSSParser::parseFillShorthand(CSSPropertyID propId, const CSSPropertyID* pr
                     return false;
 
                 if (!parsedProperty[i] && properties[i] != CSSPropertyBackgroundColor) {
-                    addFillValue(values[i], cssValuePool()->createImplicitInitialValue());
+                    addFillValue(values[i], cssValuePool().createImplicitInitialValue());
                     if (properties[i] == CSSPropertyBackgroundPosition || properties[i] == CSSPropertyWebkitMaskPosition)
-                        addFillValue(positionYValue, cssValuePool()->createImplicitInitialValue());
+                        addFillValue(positionYValue, cssValuePool().createImplicitInitialValue());
                     if (properties[i] == CSSPropertyBackgroundRepeat || properties[i] == CSSPropertyWebkitMaskRepeat)
-                        addFillValue(repeatYValue, cssValuePool()->createImplicitInitialValue());
+                        addFillValue(repeatYValue, cssValuePool().createImplicitInitialValue());
                     if ((properties[i] == CSSPropertyBackgroundOrigin || properties[i] == CSSPropertyWebkitMaskOrigin) && !parsedProperty[i]) {
                         // If background-origin wasn't present, then reset background-clip also.
-                        addFillValue(clipValue, cssValuePool()->createImplicitInitialValue());
+                        addFillValue(clipValue, cssValuePool().createImplicitInitialValue());
                     }
                 }
                 parsedProperty[i] = false;
@@ -2619,10 +2591,10 @@ bool CSSParser::parseFillShorthand(CSSPropertyID propId, const CSSPropertyID* pr
                         addFillValue(repeatYValue, val2.release());
                     if (properties[i] == CSSPropertyBackgroundOrigin || properties[i] == CSSPropertyWebkitMaskOrigin) {
                         // Reparse the value as a clip, and see if we succeed.
-                        if (parseBackgroundClip(parserValue, val1, cssValuePool()))
+                        if (parseBackgroundClip(parserValue, val1))
                             addFillValue(clipValue, val1.release()); // The property parsed successfully.
                         else
-                            addFillValue(clipValue, cssValuePool()->createImplicitInitialValue()); // Some value was used for origin that is not supported by clip. Just reset clip instead.
+                            addFillValue(clipValue, cssValuePool().createImplicitInitialValue()); // Some value was used for origin that is not supported by clip. Just reset clip instead.
                     }
                     if (properties[i] == CSSPropertyBackgroundClip || properties[i] == CSSPropertyWebkitMaskClip) {
                         // Update clipValue
@@ -2643,14 +2615,14 @@ bool CSSParser::parseFillShorthand(CSSPropertyID propId, const CSSPropertyID* pr
     for (i = 0; i < numProperties; i++) {
         // Fill in any remaining properties with the initial value.
         if (!parsedProperty[i]) {
-            addFillValue(values[i], cssValuePool()->createImplicitInitialValue());
+            addFillValue(values[i], cssValuePool().createImplicitInitialValue());
             if (properties[i] == CSSPropertyBackgroundPosition || properties[i] == CSSPropertyWebkitMaskPosition)
-                addFillValue(positionYValue, cssValuePool()->createImplicitInitialValue());
+                addFillValue(positionYValue, cssValuePool().createImplicitInitialValue());
             if (properties[i] == CSSPropertyBackgroundRepeat || properties[i] == CSSPropertyWebkitMaskRepeat)
-                addFillValue(repeatYValue, cssValuePool()->createImplicitInitialValue());
+                addFillValue(repeatYValue, cssValuePool().createImplicitInitialValue());
             if ((properties[i] == CSSPropertyBackgroundOrigin || properties[i] == CSSPropertyWebkitMaskOrigin)) {
                 // If background-origin wasn't present, then reset background-clip also.
-                addFillValue(clipValue, cssValuePool()->createImplicitInitialValue());
+                addFillValue(clipValue, cssValuePool().createImplicitInitialValue());
             }
         }
         if (properties[i] == CSSPropertyBackgroundPosition) {
@@ -2720,7 +2692,7 @@ bool CSSParser::parseAnimationShorthand(bool important)
             m_valueList->next();
             for (i = 0; i < numProperties; ++i) {
                 if (!parsedProperty[i])
-                    addAnimationValue(values[i], cssValuePool()->createImplicitInitialValue());
+                    addAnimationValue(values[i], cssValuePool().createImplicitInitialValue());
                 parsedProperty[i] = false;
             }
             if (!m_valueList->current())
@@ -2748,7 +2720,7 @@ bool CSSParser::parseAnimationShorthand(bool important)
     // Fill in any remaining properties with the initial value.
     for (i = 0; i < numProperties; ++i) {
         if (!parsedProperty[i])
-            addAnimationValue(values[i], cssValuePool()->createImplicitInitialValue());
+            addAnimationValue(values[i], cssValuePool().createImplicitInitialValue());
     }
 
     // Now add all of the properties we found.
@@ -2775,7 +2747,7 @@ bool CSSParser::parseTransitionShorthand(bool important)
             m_valueList->next();
             for (i = 0; i < numProperties; ++i) {
                 if (!parsedProperty[i])
-                    addAnimationValue(values[i], cssValuePool()->createImplicitInitialValue());
+                    addAnimationValue(values[i], cssValuePool().createImplicitInitialValue());
                 parsedProperty[i] = false;
             }
             if (!m_valueList->current())
@@ -2802,7 +2774,7 @@ bool CSSParser::parseTransitionShorthand(bool important)
     // Fill in any remaining properties with the initial value.
     for (i = 0; i < numProperties; ++i) {
         if (!parsedProperty[i])
-            addAnimationValue(values[i], cssValuePool()->createImplicitInitialValue());
+            addAnimationValue(values[i], cssValuePool().createImplicitInitialValue());
     }
 
     // Now add all of the properties we found.
@@ -2851,9 +2823,9 @@ bool CSSParser::parseShorthand(CSSPropertyID propId, const StylePropertyShorthan
         if (propertiesForInitialization) {
             const StylePropertyShorthand& initProperties = *(propertiesForInitialization[i]);
             for (unsigned propIndex = 0; propIndex < initProperties.length(); ++propIndex)
-                addProperty(initProperties.properties()[propIndex], cssValuePool()->createImplicitInitialValue(), important);
+                addProperty(initProperties.properties()[propIndex], cssValuePool().createImplicitInitialValue(), important);
         } else
-            addProperty(shorthand.properties()[i], cssValuePool()->createImplicitInitialValue(), important);
+            addProperty(shorthand.properties()[i], cssValuePool().createImplicitInitialValue(), important);
     }
 
     return true;
@@ -2930,7 +2902,7 @@ bool CSSParser::parsePage(CSSPropertyID propId, bool important)
         return false;
 
     if (value->id == CSSValueAuto) {
-        addProperty(propId, cssValuePool()->createIdentifierValue(value->id), important);
+        addProperty(propId, cssValuePool().createIdentifierValue(value->id), important);
         return true;
     } else if (value->id == 0 && value->unit == CSSPrimitiveValue::CSS_IDENT) {
         addProperty(propId, createPrimitiveStringValue(value), important);
@@ -2975,14 +2947,14 @@ CSSParser::SizeParameterType CSSParser::parseSizeParameter(CSSValueList* parsedV
     switch (value->id) {
     case CSSValueAuto:
         if (prevParamType == None) {
-            parsedValues->append(cssValuePool()->createIdentifierValue(value->id));
+            parsedValues->append(cssValuePool().createIdentifierValue(value->id));
             return Auto;
         }
         return None;
     case CSSValueLandscape:
     case CSSValuePortrait:
         if (prevParamType == None || prevParamType == PageSize) {
-            parsedValues->append(cssValuePool()->createIdentifierValue(value->id));
+            parsedValues->append(cssValuePool().createIdentifierValue(value->id));
             return Orientation;
         }
         return None;
@@ -2997,7 +2969,7 @@ CSSParser::SizeParameterType CSSParser::parseSizeParameter(CSSValueList* parsedV
         if (prevParamType == None || prevParamType == Orientation) {
             // Normalize to Page Size then Orientation order by prepending.
             // This is not specified by the CSS3 Paged Media specification, but for simpler processing later (CSSStyleSelector::applyPageSizeProperty).
-            parsedValues->prepend(cssValuePool()->createIdentifierValue(value->id));
+            parsedValues->prepend(cssValuePool().createIdentifierValue(value->id));
             return PageSize;
         }
         return None;
@@ -3092,7 +3064,7 @@ bool CSSParser::parseContent(CSSPropertyID propId, bool important)
             case CSSValueNoCloseQuote:
             case CSSValueNone:
             case CSSValueNormal:
-                parsedValue = cssValuePool()->createIdentifierValue(val->id);
+                parsedValue = cssValuePool().createIdentifierValue(val->id);
             }
         } else if (val->unit == CSSPrimitiveValue::CSS_STRING) {
             parsedValue = createPrimitiveStringValue(val);
@@ -3133,7 +3105,7 @@ PassRefPtr<CSSValue> CSSParser::parseAttr(CSSParserValueList* args)
     if (document && document->isHTMLDocument())
         attrName = attrName.lower();
 
-    return cssValuePool()->createValue(attrName, CSSPrimitiveValue::CSS_ATTR);
+    return cssValuePool().createValue(attrName, CSSPrimitiveValue::CSS_ATTR);
 }
 
 PassRefPtr<CSSValue> CSSParser::parseBackgroundColor()
@@ -3141,14 +3113,14 @@ PassRefPtr<CSSValue> CSSParser::parseBackgroundColor()
     int id = m_valueList->current()->id;
     if (id == CSSValueWebkitText || (id >= CSSValueAqua && id <= CSSValueWindowtext) || id == CSSValueMenu || id == CSSValueCurrentcolor ||
         (id >= CSSValueGrey && id < CSSValueWebkitText && inQuirksMode()))
-        return cssValuePool()->createIdentifierValue(id);
+        return cssValuePool().createIdentifierValue(id);
     return parseColor();
 }
 
 bool CSSParser::parseFillImage(CSSParserValueList* valueList, RefPtr<CSSValue>& value)
 {
     if (valueList->current()->id == CSSValueNone) {
-        value = cssValuePool()->createIdentifierValue(CSSValueNone);
+        value = cssValuePool().createIdentifierValue(CSSValueNone);
         return true;
     }
     if (valueList->current()->unit == CSSPrimitiveValue::CSS_URI) {
@@ -3182,7 +3154,7 @@ PassRefPtr<CSSValue> CSSParser::parseFillPositionX(CSSParserValueList* valueList
             percent = 100;
         else if (id == CSSValueCenter)
             percent = 50;
-        return cssValuePool()->createValue(percent, CSSPrimitiveValue::CSS_PERCENTAGE);
+        return cssValuePool().createValue(percent, CSSPrimitiveValue::CSS_PERCENTAGE);
     }
     if (validUnit(valueList->current(), FPercent | FLength))
         return createPrimitiveNumericValue(valueList->current());
@@ -3198,7 +3170,7 @@ PassRefPtr<CSSValue> CSSParser::parseFillPositionY(CSSParserValueList* valueList
             percent = 100;
         else if (id == CSSValueCenter)
             percent = 50;
-        return cssValuePool()->createValue(percent, CSSPrimitiveValue::CSS_PERCENTAGE);
+        return cssValuePool().createValue(percent, CSSPrimitiveValue::CSS_PERCENTAGE);
     }
     if (validUnit(valueList->current(), FPercent | FLength))
         return createPrimitiveNumericValue(valueList->current());
@@ -3231,7 +3203,7 @@ PassRefPtr<CSSValue> CSSParser::parseFillPositionComponent(CSSParserValueList* v
             cumulativeFlags |= AmbiguousFillPosition;
             individualFlag = AmbiguousFillPosition;
         }
-        return cssValuePool()->createValue(percent, CSSPrimitiveValue::CSS_PERCENTAGE);
+        return cssValuePool().createValue(percent, CSSPrimitiveValue::CSS_PERCENTAGE);
     }
     if (validUnit(valueList->current(), FPercent | FLength)) {
         if (!cumulativeFlags) {
@@ -3288,7 +3260,7 @@ void CSSParser::parseFillPosition(CSSParserValueList* valueList, RefPtr<CSSValue
         // is simply 50%.  This is our default.
         // For keywords, the keyword was either an x-keyword (left/right), a y-keyword (top/bottom), or an ambiguous keyword (center).
         // For left/right/center, the default of 50% in the y is still correct.
-        value2 = cssValuePool()->createValue(50, CSSPrimitiveValue::CSS_PERCENTAGE);
+        value2 = cssValuePool().createValue(50, CSSPrimitiveValue::CSS_PERCENTAGE);
 
     if (value1Flag == YFillPosition || value2Flag == XFillPosition)
         value1.swap(value2);
@@ -3301,20 +3273,20 @@ void CSSParser::parseFillRepeat(RefPtr<CSSValue>& value1, RefPtr<CSSValue>& valu
     int id = m_valueList->current()->id;
     if (id == CSSValueRepeatX) {
         m_implicitShorthand = true;
-        value1 = cssValuePool()->createIdentifierValue(CSSValueRepeat);
-        value2 = cssValuePool()->createIdentifierValue(CSSValueNoRepeat);
+        value1 = cssValuePool().createIdentifierValue(CSSValueRepeat);
+        value2 = cssValuePool().createIdentifierValue(CSSValueNoRepeat);
         m_valueList->next();
         return;
     }
     if (id == CSSValueRepeatY) {
         m_implicitShorthand = true;
-        value1 = cssValuePool()->createIdentifierValue(CSSValueNoRepeat);
-        value2 = cssValuePool()->createIdentifierValue(CSSValueRepeat);
+        value1 = cssValuePool().createIdentifierValue(CSSValueNoRepeat);
+        value2 = cssValuePool().createIdentifierValue(CSSValueRepeat);
         m_valueList->next();
         return;
     }
     if (id == CSSValueRepeat || id == CSSValueNoRepeat || id == CSSValueRound || id == CSSValueSpace)
-        value1 = cssValuePool()->createIdentifierValue(id);
+        value1 = cssValuePool().createIdentifierValue(id);
     else {
         value1 = 0;
         return;
@@ -3330,12 +3302,12 @@ void CSSParser::parseFillRepeat(RefPtr<CSSValue>& value1, RefPtr<CSSValue>& valu
         id = m_valueList->current()->id;
 
     if (value && (id == CSSValueRepeat || id == CSSValueNoRepeat || id == CSSValueRound || id == CSSValueSpace)) {
-        value2 = cssValuePool()->createIdentifierValue(id);
+        value2 = cssValuePool().createIdentifierValue(id);
         m_valueList->next();
     } else {
         // If only one value was specified, value2 is the same as value1.
         m_implicitShorthand = true;
-        value2 = cssValuePool()->createIdentifierValue(static_cast<CSSPrimitiveValue*>(value1.get())->getIdent());
+        value2 = cssValuePool().createIdentifierValue(static_cast<CSSPrimitiveValue*>(value1.get())->getIdent());
     }
 }
 
@@ -3345,12 +3317,12 @@ PassRefPtr<CSSValue> CSSParser::parseFillSize(CSSPropertyID propId, bool& allowC
     CSSParserValue* value = m_valueList->current();
 
     if (value->id == CSSValueContain || value->id == CSSValueCover)
-        return cssValuePool()->createIdentifierValue(value->id);
+        return cssValuePool().createIdentifierValue(value->id);
 
     RefPtr<CSSPrimitiveValue> parsedValue1;
 
     if (value->id == CSSValueAuto)
-        parsedValue1 = cssValuePool()->createIdentifierValue(CSSValueAuto);
+        parsedValue1 = cssValuePool().createIdentifierValue(CSSValueAuto);
     else {
         if (!validUnit(value, FLength | FPercent))
             return 0;
@@ -3375,7 +3347,7 @@ PassRefPtr<CSSValue> CSSParser::parseFillSize(CSSPropertyID propId, bool& allowC
 
     if (!parsedValue2)
         return parsedValue1;
-    return cssValuePool()->createValue(Pair::create(parsedValue1.release(), parsedValue2.release()));
+    return cssValuePool().createValue(Pair::create(parsedValue1.release(), parsedValue2.release()));
 }
 
 bool CSSParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSPropertyID& propId2,
@@ -3426,7 +3398,7 @@ bool CSSParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1,
                 case CSSPropertyBackgroundAttachment:
                 case CSSPropertyWebkitMaskAttachment:
                     if (val->id == CSSValueScroll || val->id == CSSValueFixed || val->id == CSSValueLocal) {
-                        currValue = cssValuePool()->createIdentifierValue(val->id);
+                        currValue = cssValuePool().createIdentifierValue(val->id);
                         m_valueList->next();
                     }
                     break;
@@ -3445,17 +3417,17 @@ bool CSSParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1,
                         val->id == CSSValueBorderBox || val->id == CSSValuePaddingBox || val->id == CSSValueContentBox ||
                         ((propId == CSSPropertyWebkitBackgroundClip || propId == CSSPropertyWebkitMaskClip) &&
                          (val->id == CSSValueText || val->id == CSSValueWebkitText))) {
-                        currValue = cssValuePool()->createIdentifierValue(val->id);
+                        currValue = cssValuePool().createIdentifierValue(val->id);
                         m_valueList->next();
                     }
                     break;
                 case CSSPropertyBackgroundClip:
-                    if (parseBackgroundClip(val, currValue, cssValuePool()))
+                    if (parseBackgroundClip(val, currValue))
                         m_valueList->next();
                     break;
                 case CSSPropertyBackgroundOrigin:
                     if (val->id == CSSValueBorderBox || val->id == CSSValuePaddingBox || val->id == CSSValueContentBox) {
-                        currValue = cssValuePool()->createIdentifierValue(val->id);
+                        currValue = cssValuePool().createIdentifierValue(val->id);
                         m_valueList->next();
                     }
                     break;
@@ -3481,7 +3453,7 @@ bool CSSParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1,
                 case CSSPropertyWebkitBackgroundComposite:
                 case CSSPropertyWebkitMaskComposite:
                     if ((val->id >= CSSValueClear && val->id <= CSSValuePlusLighter) || val->id == CSSValueHighlight) {
-                        currValue = cssValuePool()->createIdentifierValue(val->id);
+                        currValue = cssValuePool().createIdentifierValue(val->id);
                         m_valueList->next();
                     }
                     break;
@@ -3558,7 +3530,7 @@ PassRefPtr<CSSValue> CSSParser::parseAnimationDirection()
 {
     CSSParserValue* value = m_valueList->current();
     if (value->id == CSSValueNormal || value->id == CSSValueAlternate || value->id == CSSValueReverse || value->id == CSSValueAlternateReverse)
-        return cssValuePool()->createIdentifierValue(value->id);
+        return cssValuePool().createIdentifierValue(value->id);
     return 0;
 }
 
@@ -3574,7 +3546,7 @@ PassRefPtr<CSSValue> CSSParser::parseAnimationFillMode()
 {
     CSSParserValue* value = m_valueList->current();
     if (value->id == CSSValueNone || value->id == CSSValueForwards || value->id == CSSValueBackwards || value->id == CSSValueBoth)
-        return cssValuePool()->createIdentifierValue(value->id);
+        return cssValuePool().createIdentifierValue(value->id);
     return 0;
 }
 
@@ -3582,7 +3554,7 @@ PassRefPtr<CSSValue> CSSParser::parseAnimationIterationCount()
 {
     CSSParserValue* value = m_valueList->current();
     if (value->id == CSSValueInfinite)
-        return cssValuePool()->createIdentifierValue(value->id);
+        return cssValuePool().createIdentifierValue(value->id);
     if (validUnit(value, FNumber | FNonNeg))
         return createPrimitiveNumericValue(value);
     return 0;
@@ -3593,7 +3565,7 @@ PassRefPtr<CSSValue> CSSParser::parseAnimationName()
     CSSParserValue* value = m_valueList->current();
     if (value->unit == CSSPrimitiveValue::CSS_STRING || value->unit == CSSPrimitiveValue::CSS_IDENT) {
         if (value->id == CSSValueNone || (value->unit == CSSPrimitiveValue::CSS_STRING && equalIgnoringCase(value->string, "none"))) {
-            return cssValuePool()->createIdentifierValue(CSSValueNone);
+            return cssValuePool().createIdentifierValue(CSSValueNone);
         } else {
             return createPrimitiveStringValue(value);
         }
@@ -3605,7 +3577,7 @@ PassRefPtr<CSSValue> CSSParser::parseAnimationPlayState()
 {
     CSSParserValue* value = m_valueList->current();
     if (value->id == CSSValueRunning || value->id == CSSValuePaused)
-        return cssValuePool()->createIdentifierValue(value->id);
+        return cssValuePool().createIdentifierValue(value->id);
     return 0;
 }
 
@@ -3616,11 +3588,11 @@ PassRefPtr<CSSValue> CSSParser::parseAnimationProperty()
         return 0;
     int result = cssPropertyID(value->string);
     if (result)
-        return cssValuePool()->createIdentifierValue(result);
+        return cssValuePool().createIdentifierValue(result);
     if (equalIgnoringCase(value->string, "all"))
-        return cssValuePool()->createIdentifierValue(CSSValueAll);
+        return cssValuePool().createIdentifierValue(CSSValueAll);
     if (equalIgnoringCase(value->string, "none"))
-        return cssValuePool()->createIdentifierValue(CSSValueNone);
+        return cssValuePool().createIdentifierValue(CSSValueNone);
     return 0;
 }
 
@@ -3661,7 +3633,7 @@ PassRefPtr<CSSValue> CSSParser::parseAnimationTimingFunction()
     CSSParserValue* value = m_valueList->current();
     if (value->id == CSSValueEase || value->id == CSSValueLinear || value->id == CSSValueEaseIn || value->id == CSSValueEaseOut
         || value->id == CSSValueEaseInOut || value->id == CSSValueStepStart || value->id == CSSValueStepEnd)
-        return cssValuePool()->createIdentifierValue(value->id);
+        return cssValuePool().createIdentifierValue(value->id);
 
     // We must be a function.
     if (value->unit != CSSParserValue::Function)
@@ -3835,7 +3807,7 @@ bool CSSParser::parseGridTrackList(CSSPropertyID propId, bool important)
         if (m_valueList->next())
             return false;
 
-        addProperty(propId, cssValuePool()->createIdentifierValue(value->id), important);
+        addProperty(propId, cssValuePool().createIdentifierValue(value->id), important);
         return true;
     }
 
@@ -3845,7 +3817,7 @@ bool CSSParser::parseGridTrackList(CSSPropertyID propId, bool important)
         if (!valid)
             return false;
 
-        RefPtr<CSSPrimitiveValue> primitiveValue = value->id == CSSValueAuto ? cssValuePool()->createIdentifierValue(CSSValueAuto) : createPrimitiveNumericValue(value);
+        RefPtr<CSSPrimitiveValue> primitiveValue = value->id == CSSValueAuto ? cssValuePool().createIdentifierValue(CSSValueAuto) : createPrimitiveNumericValue(value);
         values->append(primitiveValue.release());
         value = m_valueList->next();
     }
@@ -3881,7 +3853,7 @@ bool CSSParser::parseDashboardRegions(CSSPropertyID propId, bool important)
     if (value->id == CSSValueNone) {
         if (m_valueList->next())
             return false;
-        addProperty(propId, cssValuePool()->createIdentifierValue(value->id), important);
+        addProperty(propId, cssValuePool().createIdentifierValue(value->id), important);
         return valid;
     }
 
@@ -3951,7 +3923,7 @@ bool CSSParser::parseDashboardRegions(CSSPropertyID propId, bool important)
 
         if (numArgs == DASHBOARD_REGION_SHORT_NUM_PARAMETERS || numArgs == (DASHBOARD_REGION_SHORT_NUM_PARAMETERS*2-1)) {
             // This originally used CSSValueInvalid by accident. It might be more logical to use something else.
-            RefPtr<CSSPrimitiveValue> amount = cssValuePool()->createIdentifierValue(CSSValueInvalid);
+            RefPtr<CSSPrimitiveValue> amount = cssValuePool().createIdentifierValue(CSSValueInvalid);
 
             region->setTop(amount);
             region->setRight(amount);
@@ -3969,7 +3941,7 @@ bool CSSParser::parseDashboardRegions(CSSPropertyID propId, bool important)
                     break;
 
                 RefPtr<CSSPrimitiveValue> amount = arg->id == CSSValueAuto ?
-                    cssValuePool()->createIdentifierValue(CSSValueAuto) :
+                    cssValuePool().createIdentifierValue(CSSValueAuto) :
                     createPrimitiveNumericValue(arg);
 
                 if (i == 0)
@@ -3990,7 +3962,7 @@ bool CSSParser::parseDashboardRegions(CSSPropertyID propId, bool important)
     }
 
     if (valid)
-        addProperty(propId, cssValuePool()->createValue(firstRegion.release()), important);
+        addProperty(propId, cssValuePool().createValue(firstRegion.release()), important);
 
     return valid;
 }
@@ -4012,7 +3984,7 @@ PassRefPtr<CSSValue> CSSParser::parseCounterContent(CSSParserValueList* args, bo
 
     RefPtr<CSSPrimitiveValue> separator;
     if (!counters)
-        separator = cssValuePool()->createValue(String(), CSSPrimitiveValue::CSS_STRING);
+        separator = cssValuePool().createValue(String(), CSSPrimitiveValue::CSS_STRING);
     else {
         i = args->next();
         if (i->unit != CSSParserValue::Operator || i->iValue != ',')
@@ -4028,7 +4000,7 @@ PassRefPtr<CSSValue> CSSParser::parseCounterContent(CSSParserValueList* args, bo
     RefPtr<CSSPrimitiveValue> listStyle;
     i = args->next();
     if (!i) // Make the list style default decimal
-        listStyle = cssValuePool()->createIdentifierValue(CSSValueDecimal);
+        listStyle = cssValuePool().createIdentifierValue(CSSValueDecimal);
     else {
         if (i->unit != CSSParserValue::Operator || i->iValue != ',')
             return 0;
@@ -4043,10 +4015,10 @@ PassRefPtr<CSSValue> CSSParser::parseCounterContent(CSSParserValueList* args, bo
         else
             return 0;
 
-        listStyle = cssValuePool()->createIdentifierValue(listStyleID);
+        listStyle = cssValuePool().createIdentifierValue(listStyleID);
     }
 
-    return cssValuePool()->createValue(Counter::create(identifier.release(), listStyle.release(), separator.release()));
+    return cssValuePool().createValue(Counter::create(identifier.release(), listStyle.release(), separator.release()));
 }
 
 bool CSSParser::parseClipShape(CSSPropertyID propId, bool important)
@@ -4069,7 +4041,7 @@ bool CSSParser::parseClipShape(CSSPropertyID propId, bool important)
         if (!valid)
             break;
         RefPtr<CSSPrimitiveValue> length = a->id == CSSValueAuto ?
-            cssValuePool()->createIdentifierValue(CSSValueAuto) :
+            cssValuePool().createIdentifierValue(CSSValueAuto) :
             createPrimitiveNumericValue(a);
         if (i == 0)
             rect->setTop(length);
@@ -4091,7 +4063,7 @@ bool CSSParser::parseClipShape(CSSPropertyID propId, bool important)
         i++;
     }
     if (valid) {
-        addProperty(propId, cssValuePool()->createValue(rect.release()), important);
+        addProperty(propId, cssValuePool().createValue(rect.release()), important);
         m_valueList->next();
         return true;
     }
@@ -4312,7 +4284,7 @@ bool CSSParser::parseExclusionShape(bool shapeInside, bool important)
         shape = parseExclusionShapePolygon(args);
 
     if (shape) {
-        addProperty(shapeInside ? CSSPropertyWebkitShapeInside : CSSPropertyWebkitShapeOutside, cssValuePool()->createValue(shape.release()), important);
+        addProperty(shapeInside ? CSSPropertyWebkitShapeInside : CSSPropertyWebkitShapeOutside, cssValuePool().createValue(shape.release()), important);
         m_valueList->next();
         return true;
     }
@@ -4354,17 +4326,17 @@ bool CSSParser::parseFont(bool important)
             } else if (id == CSSValueItalic || id == CSSValueOblique) {
                 if (font->style)
                     return false;
-                font->style = cssValuePool()->createIdentifierValue(id);
+                font->style = cssValuePool().createIdentifierValue(id);
                 styleImplicit = false;
             } else if (id == CSSValueSmallCaps) {
                 if (font->variant)
                     return false;
-                font->variant = cssValuePool()->createIdentifierValue(id);
+                font->variant = cssValuePool().createIdentifierValue(id);
                 variantImplicit = false;
             } else if (id >= CSSValueBold && id <= CSSValueLighter) {
                 if (font->weight)
                     return false;
-                font->weight = cssValuePool()->createIdentifierValue(id);
+                font->weight = cssValuePool().createIdentifierValue(id);
                 weightImplicit = false;
             } else
                 valid = false;
@@ -4391,7 +4363,7 @@ bool CSSParser::parseFont(bool important)
                 val = CSSValue900;
 
             if (val) {
-                font->weight = cssValuePool()->createIdentifierValue(val);
+                font->weight = cssValuePool().createIdentifierValue(val);
                 weightImplicit = false;
             } else
                 valid = false;
@@ -4411,16 +4383,16 @@ bool CSSParser::parseFont(bool important)
 
     // Set undefined values to default.
     if (!font->style)
-        font->style = cssValuePool()->createIdentifierValue(CSSValueNormal);
+        font->style = cssValuePool().createIdentifierValue(CSSValueNormal);
     if (!font->variant)
-        font->variant = cssValuePool()->createIdentifierValue(CSSValueNormal);
+        font->variant = cssValuePool().createIdentifierValue(CSSValueNormal);
     if (!font->weight)
-        font->weight = cssValuePool()->createIdentifierValue(CSSValueNormal);
+        font->weight = cssValuePool().createIdentifierValue(CSSValueNormal);
 
     // Now a font size _must_ come.
     // <absolute-size> | <relative-size> | <length> | <percentage> | inherit
     if (value->id >= CSSValueXxSmall && value->id <= CSSValueLarger)
-        font->size = cssValuePool()->createIdentifierValue(value->id);
+        font->size = cssValuePool().createIdentifierValue(value->id);
     else if (validUnit(value, FLength | FPercent | FNonNeg))
         font->size = createPrimitiveNumericValue(value);
     value = m_valueList->next();
@@ -4452,7 +4424,7 @@ bool CSSParser::parseFont(bool important)
         return false;
 
     if (!font->lineHeight)
-        font->lineHeight = cssValuePool()->createIdentifierValue(CSSValueNormal);
+        font->lineHeight = cssValuePool().createIdentifierValue(CSSValueNormal);
 
     // Font family must come now.
     font->family = parseFontFamily();
@@ -4477,9 +4449,8 @@ bool CSSParser::parseFont(bool important)
 
 class FontFamilyValueBuilder {
 public:
-    FontFamilyValueBuilder(CSSValueList* list, CSSValuePool* pool)
+    FontFamilyValueBuilder(CSSValueList* list)
         : m_list(list)
-        , m_cssValuePool(pool)
     {
     }
 
@@ -4494,14 +4465,13 @@ public:
     {
         if (m_builder.isEmpty())
             return;
-        m_list->append(m_cssValuePool->createFontFamilyValue(m_builder.toString()));
+        m_list->append(cssValuePool().createFontFamilyValue(m_builder.toString()));
         m_builder.clear();
     }
 
 private:
     StringBuilder m_builder;
     CSSValueList* m_list;
-    CSSValuePool* m_cssValuePool;
 };
 
 PassRefPtr<CSSValueList> CSSParser::parseFontFamily()
@@ -4509,7 +4479,7 @@ PassRefPtr<CSSValueList> CSSParser::parseFontFamily()
     RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
     CSSParserValue* value = m_valueList->current();
 
-    FontFamilyValueBuilder familyBuilder(list.get(), cssValuePool());
+    FontFamilyValueBuilder familyBuilder(list.get());
     bool inFamily = false;
 
     while (value) {
@@ -4526,7 +4496,7 @@ PassRefPtr<CSSValueList> CSSParser::parseFontFamily()
             if (inFamily)
                 familyBuilder.add(value->string);
             else if (nextValBreaksFont || !nextValIsFontName)
-                list->append(cssValuePool()->createIdentifierValue(value->id));
+                list->append(cssValuePool().createIdentifierValue(value->id));
             else {
                 familyBuilder.commit();
                 familyBuilder.add(value->string);
@@ -4536,12 +4506,12 @@ PassRefPtr<CSSValueList> CSSParser::parseFontFamily()
             // Strings never share in a family name.
             inFamily = false;
             familyBuilder.commit();
-            list->append(cssValuePool()->createFontFamilyValue(value->string));
+            list->append(cssValuePool().createFontFamilyValue(value->string));
         } else if (value->unit == CSSPrimitiveValue::CSS_IDENT) {
             if (inFamily)
                 familyBuilder.add(value->string);
             else if (nextValBreaksFont || !nextValIsFontName)
-                list->append(cssValuePool()->createFontFamilyValue(value->string));
+                list->append(cssValuePool().createFontFamilyValue(value->string));
             else {
                 familyBuilder.commit();
                 familyBuilder.add(value->string);
@@ -4583,12 +4553,12 @@ bool CSSParser::parseFontVariant(bool important)
         if (!expectComma) {
             expectComma = true;
             if (val->id == CSSValueNormal || val->id == CSSValueSmallCaps)
-                parsedValue = cssValuePool()->createIdentifierValue(val->id);
+                parsedValue = cssValuePool().createIdentifierValue(val->id);
             else if (val->id == CSSValueAll && !values) {
                 // 'all' is only allowed in @font-face and with no other values. Make a value list to
                 // indicate that we are in the @font-face case.
                 values = CSSValueList::createCommaSeparated();
-                parsedValue = cssValuePool()->createIdentifierValue(val->id);
+                parsedValue = cssValuePool().createIdentifierValue(val->id);
             }
         } else if (val->unit == CSSParserValue::Operator && val->iValue == ',') {
             expectComma = false;
@@ -4625,13 +4595,13 @@ bool CSSParser::parseFontWeight(bool important)
 
     CSSParserValue* value = m_valueList->current();
     if ((value->id >= CSSValueNormal) && (value->id <= CSSValue900)) {
-        addProperty(CSSPropertyFontWeight, cssValuePool()->createIdentifierValue(value->id), important);
+        addProperty(CSSPropertyFontWeight, cssValuePool().createIdentifierValue(value->id), important);
         return true;
     }
     if (validUnit(value, FInteger | FNonNeg, CSSQuirksMode)) {
         int weight = static_cast<int>(value->fValue);
         if (!(weight % 100) && weight >= 100 && weight <= 900)
-            addProperty(CSSPropertyFontWeight, cssValuePool()->createIdentifierValue(CSSValue100 + weight / 100 - 1), important);
+            addProperty(CSSPropertyFontWeight, cssValuePool().createIdentifierValue(CSSValue100 + weight / 100 - 1), important);
         return true;
     }
     return false;
@@ -5219,7 +5189,7 @@ PassRefPtr<CSSPrimitiveValue> CSSParser::parseColor(CSSParserValue* value)
     RGBA32 c = Color::transparent;
     if (!parseColorFromValue(value ? value : m_valueList->current(), c))
         return 0;
-    return cssValuePool()->createColorValue(c);
+    return cssValuePool().createColorValue(c);
 }
 
 bool CSSParser::parseColorFromValue(CSSParserValue* value, RGBA32& c)
@@ -5365,7 +5335,7 @@ struct ShadowParseContext {
 
     void commitStyle(CSSParserValue* v)
     {
-        style = m_parser->cssValuePool()->createIdentifierValue(v->id);
+        style = cssValuePool().createIdentifierValue(v->id);
         allowStyle = false;
         if (allowX)
             allowBreak = false;
@@ -5435,7 +5405,7 @@ PassRefPtr<CSSValueList> CSSParser::parseShadow(CSSParserValueList* valueList, C
             if (isColor) {
                 if (!context.allowColor)
                     return 0;
-                parsedColor = cssValuePool()->createIdentifierValue(val->id);
+                parsedColor = cssValuePool().createIdentifierValue(val->id);
             }
 
             if (!parsedColor)
@@ -5489,7 +5459,7 @@ bool CSSParser::parseReflect(CSSPropertyID propId, bool important)
     val = m_valueList->next();
     RefPtr<CSSPrimitiveValue> offset;
     if (!val)
-        offset = cssValuePool()->createValue(0, CSSPrimitiveValue::CSS_PX);
+        offset = cssValuePool().createValue(0, CSSPrimitiveValue::CSS_PX);
     else {
         if (!validUnit(val, FLength | FPercent))
             return false;
@@ -5527,7 +5497,7 @@ PassRefPtr<CSSValue> CSSParser::parseFlex(CSSParserValueList* args)
                 negativeFlex = arg->fValue;
             else if (!arg->fValue) {
                 // flex() only allows a preferred size of 0 (sans units) if the positive and negative flex values have already been set.
-                preferredSize = cssValuePool()->createValue(0, CSSPrimitiveValue::CSS_PX);
+                preferredSize = cssValuePool().createValue(0, CSSPrimitiveValue::CSS_PX);
             } else {
                 // We only allow 3 numbers without units if the last value is 0. E.g., flex(1 1 1) is invalid.
                 return 0;
@@ -5546,11 +5516,11 @@ PassRefPtr<CSSValue> CSSParser::parseFlex(CSSParserValueList* args)
     if (negativeFlex == unsetValue)
         negativeFlex = 0;
     if (!preferredSize)
-        preferredSize = cssValuePool()->createValue(0, CSSPrimitiveValue::CSS_PX);
+        preferredSize = cssValuePool().createValue(0, CSSPrimitiveValue::CSS_PX);
 
     RefPtr<CSSValueList> flex = CSSValueList::createSpaceSeparated();
-    flex->append(cssValuePool()->createValue(clampToFloat(positiveFlex), CSSPrimitiveValue::CSS_NUMBER));
-    flex->append(cssValuePool()->createValue(clampToFloat(negativeFlex), CSSPrimitiveValue::CSS_NUMBER));
+    flex->append(cssValuePool().createValue(clampToFloat(positiveFlex), CSSPrimitiveValue::CSS_NUMBER));
+    flex->append(cssValuePool().createValue(clampToFloat(negativeFlex), CSSPrimitiveValue::CSS_NUMBER));
     flex->append(preferredSize);
     return flex;
 }
@@ -5656,7 +5626,7 @@ struct BorderImageParseContext {
         if (value)
             parser->addProperty(propId, value, important);
         else
-            parser->addProperty(propId, parser->cssValuePool()->createImplicitInitialValue(), important, true);
+            parser->addProperty(propId, cssValuePool().createImplicitInitialValue(), important, true);
     }
 
     bool m_canAdvance;
@@ -5708,7 +5678,7 @@ bool CSSParser::parseBorderImage(CSSPropertyID propId, RefPtr<CSSValue>& result,
                     return false;
 #endif
             } else if (val->id == CSSValueNone)
-                context.commitImage(cssValuePool()->createIdentifierValue(CSSValueNone));
+                context.commitImage(cssValuePool().createIdentifierValue(CSSValueNone));
         }
 
         if (!context.canAdvance() && context.allowImageSlice()) {
@@ -5764,14 +5734,14 @@ bool CSSParser::parseBorderImageRepeat(RefPtr<CSSValue>& result)
     RefPtr<CSSPrimitiveValue> secondValue;
     CSSParserValue* val = m_valueList->current();
     if (isBorderImageRepeatKeyword(val->id))
-        firstValue = cssValuePool()->createIdentifierValue(val->id);
+        firstValue = cssValuePool().createIdentifierValue(val->id);
     else
         return false;
 
     val = m_valueList->next();
     if (val) {
         if (isBorderImageRepeatKeyword(val->id))
-            secondValue = cssValuePool()->createIdentifierValue(val->id);
+            secondValue = cssValuePool().createIdentifierValue(val->id);
         else if (!inShorthand()) {
             // If we're not parsing a shorthand then we are invalid.
             return false;
@@ -5783,7 +5753,7 @@ bool CSSParser::parseBorderImageRepeat(RefPtr<CSSValue>& result)
     } else
         secondValue = firstValue;
 
-    result = cssValuePool()->createValue(Pair::create(firstValue, secondValue));
+    result = cssValuePool().createValue(Pair::create(firstValue, secondValue));
     return true;
 }
 
@@ -5850,7 +5820,7 @@ public:
         quad->setLeft(m_left);
 
         // Make our new border image value now.
-        return CSSBorderImageSliceValue::create(m_parser->cssValuePool()->createValue(quad.release()), m_fill);
+        return CSSBorderImageSliceValue::create(cssValuePool().createValue(quad.release()), m_fill);
     }
 
 private:
@@ -5921,7 +5891,7 @@ public:
     {
         RefPtr<CSSPrimitiveValue> val;
         if (v->id == CSSValueAuto)
-            val = m_parser->cssValuePool()->createIdentifierValue(v->id);
+            val = cssValuePool().createIdentifierValue(v->id);
         else
             val = m_parser->createPrimitiveNumericValue(v);
 
@@ -5967,7 +5937,7 @@ public:
         quad->setLeft(m_left);
 
         // Make our new value now.
-        return m_parser->cssValuePool()->createValue(quad.release());
+        return cssValuePool().createValue(quad.release());
     }
 
 private:
@@ -6082,10 +6052,10 @@ bool CSSParser::parseBorderRadius(CSSPropertyID propId, bool important)
         completeBorderRadii(radii[1]);
 
     ImplicitScope implicitScope(this, PropertyImplicit);
-    addProperty(CSSPropertyBorderTopLeftRadius, cssValuePool()->createValue(Pair::create(radii[0][0].release(), radii[1][0].release())), important);
-    addProperty(CSSPropertyBorderTopRightRadius, cssValuePool()->createValue(Pair::create(radii[0][1].release(), radii[1][1].release())), important);
-    addProperty(CSSPropertyBorderBottomRightRadius, cssValuePool()->createValue(Pair::create(radii[0][2].release(), radii[1][2].release())), important);
-    addProperty(CSSPropertyBorderBottomLeftRadius, cssValuePool()->createValue(Pair::create(radii[0][3].release(), radii[1][3].release())), important);
+    addProperty(CSSPropertyBorderTopLeftRadius, cssValuePool().createValue(Pair::create(radii[0][0].release(), radii[1][0].release())), important);
+    addProperty(CSSPropertyBorderTopRightRadius, cssValuePool().createValue(Pair::create(radii[0][1].release(), radii[1][1].release())), important);
+    addProperty(CSSPropertyBorderBottomRightRadius, cssValuePool().createValue(Pair::create(radii[0][2].release(), radii[1][2].release())), important);
+    addProperty(CSSPropertyBorderBottomLeftRadius, cssValuePool().createValue(Pair::create(radii[0][3].release(), radii[1][3].release())), important);
     return true;
 }
 
@@ -6093,7 +6063,7 @@ bool CSSParser::parseAspectRatio(bool important)
 {
     unsigned num = m_valueList->size();
     if (num == 1 && m_valueList->valueAt(0)->id == CSSValueNone) {
-        addProperty(CSSPropertyWebkitAspectRatio, cssValuePool()->createIdentifierValue(CSSValueNone), important);
+        addProperty(CSSPropertyWebkitAspectRatio, cssValuePool().createIdentifierValue(CSSValueNone), important);
         return true;
     }
 
@@ -6143,8 +6113,8 @@ bool CSSParser::parseCounter(CSSPropertyID propId, int defaultValue, bool import
                     m_valueList->next();
                 }
 
-                list->append(cssValuePool()->createValue(Pair::create(counterName.release(),
-                    cssValuePool()->createValue(i, CSSPrimitiveValue::CSS_NUMBER))));
+                list->append(cssValuePool().createValue(Pair::create(counterName.release(),
+                    cssValuePool().createValue(i, CSSPrimitiveValue::CSS_NUMBER))));
                 state = ID;
                 continue;
             }
@@ -6161,20 +6131,20 @@ bool CSSParser::parseCounter(CSSPropertyID propId, int defaultValue, bool import
 }
 
 // This should go away once we drop support for -webkit-gradient
-static PassRefPtr<CSSPrimitiveValue> parseDeprecatedGradientPoint(CSSParserValue* a, bool horizontal, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSPrimitiveValue> parseDeprecatedGradientPoint(CSSParserValue* a, bool horizontal)
 {
     RefPtr<CSSPrimitiveValue> result;
     if (a->unit == CSSPrimitiveValue::CSS_IDENT) {
         if ((equalIgnoringCase(a->string, "left") && horizontal)
             || (equalIgnoringCase(a->string, "top") && !horizontal))
-            result = cssValuePool->createValue(0., CSSPrimitiveValue::CSS_PERCENTAGE);
+            result = cssValuePool().createValue(0., CSSPrimitiveValue::CSS_PERCENTAGE);
         else if ((equalIgnoringCase(a->string, "right") && horizontal)
                  || (equalIgnoringCase(a->string, "bottom") && !horizontal))
-            result = cssValuePool->createValue(100., CSSPrimitiveValue::CSS_PERCENTAGE);
+            result = cssValuePool().createValue(100., CSSPrimitiveValue::CSS_PERCENTAGE);
         else if (equalIgnoringCase(a->string, "center"))
-            result = cssValuePool->createValue(50., CSSPrimitiveValue::CSS_PERCENTAGE);
+            result = cssValuePool().createValue(50., CSSPrimitiveValue::CSS_PERCENTAGE);
     } else if (a->unit == CSSPrimitiveValue::CSS_NUMBER || a->unit == CSSPrimitiveValue::CSS_PERCENTAGE)
-        result = cssValuePool->createValue(a->fValue, static_cast<CSSPrimitiveValue::UnitTypes>(a->unit));
+        result = cssValuePool().createValue(a->fValue, static_cast<CSSPrimitiveValue::UnitTypes>(a->unit));
     return result;
 }
 
@@ -6199,13 +6169,13 @@ static bool parseDeprecatedGradientColorStop(CSSParser* p, CSSParserValue* a, CS
             return false;
 
         if (equalIgnoringCase(a->function->name, "from("))
-            stop.m_position = p->cssValuePool()->createValue(0, CSSPrimitiveValue::CSS_NUMBER);
+            stop.m_position = cssValuePool().createValue(0, CSSPrimitiveValue::CSS_NUMBER);
         else
-            stop.m_position = p->cssValuePool()->createValue(1, CSSPrimitiveValue::CSS_NUMBER);
+            stop.m_position = cssValuePool().createValue(1, CSSPrimitiveValue::CSS_NUMBER);
 
         int id = args->current()->id;
         if (id == CSSValueWebkitText || (id >= CSSValueAqua && id <= CSSValueWindowtext) || id == CSSValueMenu)
-            stop.m_color = p->cssValuePool()->createIdentifierValue(id);
+            stop.m_color = cssValuePool().createIdentifierValue(id);
         else
             stop.m_color = p->parseColor(args->current());
         if (!stop.m_color)
@@ -6219,9 +6189,9 @@ static bool parseDeprecatedGradientColorStop(CSSParser* p, CSSParserValue* a, CS
 
         CSSParserValue* stopArg = args->current();
         if (stopArg->unit == CSSPrimitiveValue::CSS_PERCENTAGE)
-            stop.m_position = p->cssValuePool()->createValue(stopArg->fValue / 100, CSSPrimitiveValue::CSS_NUMBER);
+            stop.m_position = cssValuePool().createValue(stopArg->fValue / 100, CSSPrimitiveValue::CSS_NUMBER);
         else if (stopArg->unit == CSSPrimitiveValue::CSS_NUMBER)
-            stop.m_position = p->cssValuePool()->createValue(stopArg->fValue, CSSPrimitiveValue::CSS_NUMBER);
+            stop.m_position = cssValuePool().createValue(stopArg->fValue, CSSPrimitiveValue::CSS_NUMBER);
         else
             return false;
 
@@ -6232,7 +6202,7 @@ static bool parseDeprecatedGradientColorStop(CSSParser* p, CSSParserValue* a, CS
         stopArg = args->next();
         int id = stopArg->id;
         if (id == CSSValueWebkitText || (id >= CSSValueAqua && id <= CSSValueWindowtext) || id == CSSValueMenu)
-            stop.m_color = p->cssValuePool()->createIdentifierValue(id);
+            stop.m_color = cssValuePool().createIdentifierValue(id);
         else
             stop.m_color = p->parseColor(stopArg);
         if (!stop.m_color)
@@ -6282,7 +6252,7 @@ bool CSSParser::parseDeprecatedGradient(CSSParserValueList* valueList, RefPtr<CS
     a = args->next();
     if (!a)
         return false;
-    RefPtr<CSSPrimitiveValue> point = parseDeprecatedGradientPoint(a, true, cssValuePool());
+    RefPtr<CSSPrimitiveValue> point = parseDeprecatedGradientPoint(a, true);
     if (!point)
         return false;
     result->setFirstX(point.release());
@@ -6291,7 +6261,7 @@ bool CSSParser::parseDeprecatedGradient(CSSParserValueList* valueList, RefPtr<CS
     a = args->next();
     if (!a)
         return false;
-    point = parseDeprecatedGradientPoint(a, false, cssValuePool());
+    point = parseDeprecatedGradientPoint(a, false);
     if (!point)
         return false;
     result->setFirstY(point.release());
@@ -6319,7 +6289,7 @@ bool CSSParser::parseDeprecatedGradient(CSSParserValueList* valueList, RefPtr<CS
     a = args->next();
     if (!a)
         return false;
-    point = parseDeprecatedGradientPoint(a, true, cssValuePool());
+    point = parseDeprecatedGradientPoint(a, true);
     if (!point)
         return false;
     result->setSecondX(point.release());
@@ -6328,7 +6298,7 @@ bool CSSParser::parseDeprecatedGradient(CSSParserValueList* valueList, RefPtr<CS
     a = args->next();
     if (!a)
         return false;
-    point = parseDeprecatedGradientPoint(a, false, cssValuePool());
+    point = parseDeprecatedGradientPoint(a, false);
     if (!point)
         return false;
     result->setSecondY(point.release());
@@ -6372,7 +6342,7 @@ bool CSSParser::parseDeprecatedGradient(CSSParserValueList* valueList, RefPtr<CS
     return true;
 }
 
-static PassRefPtr<CSSPrimitiveValue> valueFromSideKeyword(CSSParserValue* a, bool& isHorizontal, CSSValuePool* cssValuePool)
+static PassRefPtr<CSSPrimitiveValue> valueFromSideKeyword(CSSParserValue* a, bool& isHorizontal)
 {
     if (a->unit != CSSPrimitiveValue::CSS_IDENT)
         return 0;
@@ -6389,14 +6359,14 @@ static PassRefPtr<CSSPrimitiveValue> valueFromSideKeyword(CSSParserValue* a, boo
         default:
             return 0;
     }
-    return cssValuePool->createIdentifierValue(a->id);
+    return cssValuePool().createIdentifierValue(a->id);
 }
 
 static PassRefPtr<CSSPrimitiveValue> parseGradientColorOrKeyword(CSSParser* p, CSSParserValue* value)
 {
     int id = value->id;
     if (id == CSSValueWebkitText || (id >= CSSValueAqua && id <= CSSValueWindowtext) || id == CSSValueMenu || id == CSSValueCurrentcolor)
-        return p->cssValuePool()->createIdentifierValue(id);
+        return cssValuePool().createIdentifierValue(id);
 
     return p->parseColor(value);
 }
@@ -6427,7 +6397,7 @@ bool CSSParser::parseLinearGradient(CSSParserValueList* valueList, RefPtr<CSSVal
 
         RefPtr<CSSPrimitiveValue> location;
         bool isHorizontal = false;
-        if ((location = valueFromSideKeyword(a, isHorizontal, cssValuePool()))) {
+        if ((location = valueFromSideKeyword(a, isHorizontal))) {
             if (isHorizontal)
                 startX = location;
             else
@@ -6435,7 +6405,7 @@ bool CSSParser::parseLinearGradient(CSSParserValueList* valueList, RefPtr<CSSVal
 
             a = args->next();
             if (a) {
-                if ((location = valueFromSideKeyword(a, isHorizontal, cssValuePool()))) {
+                if ((location = valueFromSideKeyword(a, isHorizontal))) {
                     if (isHorizontal) {
                         if (startX)
                             return false;
@@ -6454,7 +6424,7 @@ bool CSSParser::parseLinearGradient(CSSParserValueList* valueList, RefPtr<CSSVal
         }
 
         if (!startX && !startY)
-            startY = cssValuePool()->createIdentifierValue(CSSValueTop);
+            startY = cssValuePool().createIdentifierValue(CSSValueTop);
 
         result->setFirstX(startX.release());
         result->setFirstY(startY.release());
@@ -6526,7 +6496,7 @@ bool CSSParser::parseRadialGradient(CSSParserValueList* valueList, RefPtr<CSSVal
         switch (a->id) {
         case CSSValueCircle:
         case CSSValueEllipse:
-            shapeValue = cssValuePool()->createIdentifierValue(a->id);
+            shapeValue = cssValuePool().createIdentifierValue(a->id);
             foundValue = true;
             break;
         case CSSValueClosestSide:
@@ -6535,7 +6505,7 @@ bool CSSParser::parseRadialGradient(CSSParserValueList* valueList, RefPtr<CSSVal
         case CSSValueFarthestCorner:
         case CSSValueContain:
         case CSSValueCover:
-            sizeValue = cssValuePool()->createIdentifierValue(a->id);
+            sizeValue = cssValuePool().createIdentifierValue(a->id);
             foundValue = true;
             break;
         }
@@ -6711,9 +6681,9 @@ bool CSSParser::parseCrossfade(CSSParserValueList* valueList, RefPtr<CSSValue>&
         return false;
     
     if (a->unit == CSSPrimitiveValue::CSS_PERCENTAGE)
-        percentage = cssValuePool()->createValue(clampTo<double>(a->fValue / 100, 0, 1), CSSPrimitiveValue::CSS_NUMBER);
+        percentage = cssValuePool().createValue(clampTo<double>(a->fValue / 100, 0, 1), CSSPrimitiveValue::CSS_NUMBER);
     else if (a->unit == CSSPrimitiveValue::CSS_NUMBER)
-        percentage = cssValuePool()->createValue(clampTo<double>(a->fValue, 0, 1), CSSPrimitiveValue::CSS_NUMBER);
+        percentage = cssValuePool().createValue(clampTo<double>(a->fValue, 0, 1), CSSPrimitiveValue::CSS_NUMBER);
     else
         return false;
 
@@ -6773,7 +6743,7 @@ PassRefPtr<CSSValue> CSSParser::parseImageSet(CSSParserValueList* valueList)
         parseDouble(current, end, 'x', imageScaleFactor);
         if (imageScaleFactor <= 0)
             return 0;
-        imageSet->append(cssValuePool()->createValue(imageScaleFactor, CSSPrimitiveValue::CSS_NUMBER));
+        imageSet->append(cssValuePool().createValue(imageScaleFactor, CSSPrimitiveValue::CSS_NUMBER));
 
         // If there are no more arguments, we're done.
         arg = functionArgs->next();
@@ -7040,7 +7010,7 @@ PassRefPtr<WebKitCSSFilterValue> CSSParser::parseCustomFilter(CSSParserValue* va
     while ((arg = argsList->current())) {
         RefPtr<CSSValue> value;
         if (arg->id == CSSValueNone)
-            value = cssValuePool()->createIdentifierValue(CSSValueNone);
+            value = cssValuePool().createIdentifierValue(CSSValueNone);
         else if (arg->unit == CSSPrimitiveValue::CSS_URI) {
             KURL shaderURL = m_styleSheet ? m_styleSheet->completeURL(arg->string) : KURL();
             value = WebKitCSSShaderValue::create(shaderURL.string());
@@ -7067,7 +7037,7 @@ PassRefPtr<WebKitCSSFilterValue> CSSParser::parseCustomFilter(CSSParserValue* va
         // According to the specification we can only accept positive non-zero values.
         if (integerValue < 1)
             return 0;
-        meshSizeList->append(cssValuePool()->createValue(integerValue, CSSPrimitiveValue::CSS_NUMBER));
+        meshSizeList->append(cssValuePool().createValue(integerValue, CSSPrimitiveValue::CSS_NUMBER));
         argsList->next();
     }
     
@@ -7076,12 +7046,12 @@ PassRefPtr<WebKitCSSFilterValue> CSSParser::parseCustomFilter(CSSParserValue* va
     
     if ((arg = argsList->current()) && (arg->id == CSSValueBorderBox || arg->id == CSSValuePaddingBox
         || arg->id == CSSValueContentBox || arg->id == CSSValueFilterBox)) {
-        meshSizeList->append(cssValuePool()->createIdentifierValue(arg->id));
+        meshSizeList->append(cssValuePool().createIdentifierValue(arg->id));
         argsList->next();
     }
     
     if ((arg = argsList->current()) && arg->id == CSSValueDetached) {
-        meshSizeList->append(cssValuePool()->createIdentifierValue(arg->id));
+        meshSizeList->append(cssValuePool().createIdentifierValue(arg->id));
         argsList->next();
     }
     
@@ -7116,7 +7086,7 @@ PassRefPtr<WebKitCSSFilterValue> CSSParser::parseCustomFilter(CSSParserValue* va
                 break;
             if (!validUnit(arg, FNumber, CSSStrictMode))
                 return 0;
-            paramValueList->append(cssValuePool()->createValue(arg->fValue, CSSPrimitiveValue::CSS_NUMBER));
+            paramValueList->append(cssValuePool().createValue(arg->fValue, CSSPrimitiveValue::CSS_NUMBER));
             argsList->next();
         }
         if (!paramValueList->length() || paramValueList->length() > 4)
@@ -7165,7 +7135,7 @@ PassRefPtr<WebKitCSSFilterValue> CSSParser::parseBuiltinFilterArguments(CSSParse
                     return 0;
             }
 
-            filterValue->append(cssValuePool()->createValue(amount, static_cast<CSSPrimitiveValue::UnitTypes>(value->unit)));
+            filterValue->append(cssValuePool().createValue(amount, static_cast<CSSPrimitiveValue::UnitTypes>(value->unit)));
         }
         break;
     }
@@ -7185,7 +7155,7 @@ PassRefPtr<WebKitCSSFilterValue> CSSParser::parseBuiltinFilterArguments(CSSParse
             if (amount < minAllowed || amount > maxAllowed)
                 return 0;
 
-            filterValue->append(cssValuePool()->createValue(amount, static_cast<CSSPrimitiveValue::UnitTypes>(value->unit)));
+            filterValue->append(cssValuePool().createValue(amount, static_cast<CSSPrimitiveValue::UnitTypes>(value->unit)));
         }
         break;
     }
@@ -7249,7 +7219,7 @@ PassRefPtr<CSSValueList> CSSParser::parseFilter()
         if (value->unit == CSSPrimitiveValue::CSS_URI) {
             RefPtr<WebKitCSSFilterValue> referenceFilterValue = WebKitCSSFilterValue::create(WebKitCSSFilterValue::ReferenceFilterOperation);
             list->append(referenceFilterValue);
-            referenceFilterValue->append(cssValuePool()->createValue(value->string, CSSPrimitiveValue::CSS_STRING));
+            referenceFilterValue->append(cssValuePool().createValue(value->string, CSSPrimitiveValue::CSS_STRING));
         } else {
             const CSSParserString name = value->function->name;
             unsigned maximumArgumentCount = 1;
@@ -7341,7 +7311,7 @@ bool CSSParser::parseFlowThread(CSSPropertyID propId, bool important)
         return false;
 
     if (value->id == CSSValueNone) {
-        addProperty(propId, cssValuePool()->createIdentifierValue(value->id), important);
+        addProperty(propId, cssValuePool().createIdentifierValue(value->id), important);
         return true;
     }
 
@@ -7349,9 +7319,9 @@ bool CSSParser::parseFlowThread(CSSPropertyID propId, bool important)
     if (!inputProperty.isEmpty()) {
         if (!validFlowName(inputProperty))
             return false;
-        addProperty(propId, cssValuePool()->createValue(inputProperty, CSSPrimitiveValue::CSS_STRING), important);
+        addProperty(propId, cssValuePool().createValue(inputProperty, CSSPrimitiveValue::CSS_STRING), important);
     } else
-        addProperty(propId, cssValuePool()->createIdentifierValue(CSSValueNone), important);
+        addProperty(propId, cssValuePool().createIdentifierValue(CSSValueNone), important);
 
     return true;
 }
@@ -7373,15 +7343,15 @@ bool CSSParser::parseRegionThread(CSSPropertyID propId, bool important)
         return false;
 
     if (value->id == CSSValueNone)
-        addProperty(propId, cssValuePool()->createIdentifierValue(value->id), important);
+        addProperty(propId, cssValuePool().createIdentifierValue(value->id), important);
     else {
         String inputProperty = String(value->string);
         if (!inputProperty.isEmpty()) {
             if (!validFlowName(inputProperty))
                 return false;
-            addProperty(propId, cssValuePool()->createValue(inputProperty, CSSPrimitiveValue::CSS_STRING), important);
+            addProperty(propId, cssValuePool().createValue(inputProperty, CSSPrimitiveValue::CSS_STRING), important);
         } else
-            addProperty(propId, cssValuePool()->createIdentifierValue(CSSValueNone), important);
+            addProperty(propId, cssValuePool().createIdentifierValue(CSSValueNone), important);
     }
 
     return true;
@@ -7483,7 +7453,7 @@ bool CSSParser::parseTextEmphasisStyle(bool important)
         if (value->id == CSSValueNone) {
             if (fill || shape || (valueListSize != 1 && !inShorthand()))
                 return false;
-            addProperty(CSSPropertyWebkitTextEmphasisStyle, cssValuePool()->createIdentifierValue(CSSValueNone), important);
+            addProperty(CSSPropertyWebkitTextEmphasisStyle, cssValuePool().createIdentifierValue(CSSValueNone), important);
             m_valueList->next();
             return true;
         }
@@ -7491,11 +7461,11 @@ bool CSSParser::parseTextEmphasisStyle(bool important)
         if (value->id == CSSValueOpen || value->id == CSSValueFilled) {
             if (fill)
                 return false;
-            fill = cssValuePool()->createIdentifierValue(value->id);
+            fill = cssValuePool().createIdentifierValue(value->id);
         } else if (value->id == CSSValueDot || value->id == CSSValueCircle || value->id == CSSValueDoubleCircle || value->id == CSSValueTriangle || value->id == CSSValueSesame) {
             if (shape)
                 return false;
-            shape = cssValuePool()->createIdentifierValue(value->id);
+            shape = cssValuePool().createIdentifierValue(value->id);
         } else if (!inShorthand())
             return false;
         else
@@ -7601,7 +7571,7 @@ bool CSSParser::parseFontFeatureTag(CSSValueList* settings)
 bool CSSParser::parseFontFeatureSettings(bool important)
 {
     if (m_valueList->size() == 1 && m_valueList->current()->id == CSSValueNormal) {
-        RefPtr<CSSPrimitiveValue> normalValue = cssValuePool()->createIdentifierValue(CSSValueNormal);
+        RefPtr<CSSPrimitiveValue> normalValue = cssValuePool().createIdentifierValue(CSSValueNormal);
         m_valueList->next();
         addProperty(CSSPropertyWebkitFontFeatureSettings, normalValue.release(), important);
         return true;
@@ -7641,21 +7611,21 @@ bool CSSParser::parseFontVariantLigatures(bool important)
             if (sawCommonLigaturesValue)
                 return false;
             sawCommonLigaturesValue = true;
-            ligatureValues->append(cssValuePool()->createIdentifierValue(value->id));
+            ligatureValues->append(cssValuePool().createIdentifierValue(value->id));
             break;
         case CSSValueNoDiscretionaryLigatures:
         case CSSValueDiscretionaryLigatures:
             if (sawDiscretionaryLigaturesValue)
                 return false;
             sawDiscretionaryLigaturesValue = true;
-            ligatureValues->append(cssValuePool()->createIdentifierValue(value->id));
+            ligatureValues->append(cssValuePool().createIdentifierValue(value->id));
             break;
         case CSSValueNoHistoricalLigatures:
         case CSSValueHistoricalLigatures:
             if (sawHistoricalLigaturesValue)
                 return false;
             sawHistoricalLigaturesValue = true;
-            ligatureValues->append(cssValuePool()->createIdentifierValue(value->id));
+            ligatureValues->append(cssValuePool().createIdentifierValue(value->id));
             break;
         default:
             return false;
index 867e2c7..9052670 100644 (file)
@@ -47,7 +47,6 @@ namespace WebCore {
 
 class CSSBorderImageSliceValue;
 class CSSPrimitiveValue;
-class CSSValuePool;
 class CSSProperty;
 class CSSSelectorList;
 class CSSStyleSheet;
@@ -84,8 +83,6 @@ public:
 
     Document* findDocument() const;
 
-    CSSValuePool* cssValuePool() const { return m_cssValuePool.get(); }
-
     void addProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important, bool implicit = false);
     void rollbackLastProperties(int num);
     bool hasProperties() const { return !m_parsedProperties.isEmpty(); }
@@ -297,7 +294,6 @@ public:
     Vector<CSSProperty, 256> m_parsedProperties;
     CSSSelectorList* m_selectorListForParseSelector;
 
-    RefPtr<CSSValuePool> m_cssValuePool;
     unsigned m_numParsedPropertiesBeforeMarginBox;
 
     int m_inParseShorthand;
@@ -350,7 +346,6 @@ private:
     inline void detectAtToken(int, bool);
 
     void setStyleSheet(CSSStyleSheet*);
-    void ensureCSSValuePool();
 
     inline bool inStrictMode() const { return m_cssParserMode == CSSStrictMode || m_cssParserMode == SVGAttributeMode; }
     inline bool inQuirksMode() const { return m_cssParserMode == CSSQuirksMode; }
index 05ba549..6b4e92d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 namespace WebCore {
 
+CSSValuePool& cssValuePool()
+{
+    DEFINE_STATIC_LOCAL(CSSValuePool, pool, ());
+    return pool;
+}
+
 CSSValuePool::CSSValuePool()
     : m_inheritedValue(CSSInheritedValue::create())
     , m_implicitInitialValue(CSSInitialValue::createImplicit())
@@ -45,10 +51,6 @@ CSSValuePool::CSSValuePool()
 {
 }
 
-CSSValuePool::~CSSValuePool()
-{
-}
-
 PassRefPtr<CSSPrimitiveValue> CSSValuePool::createIdentifierValue(int ident)
 {
     if (ident <= 0 || ident >= numCSSValueKeywords)
index ade9fe0..577009d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -37,11 +37,8 @@ namespace WebCore {
 
 class CSSValueList;
 
-class CSSValuePool : public RefCounted<CSSValuePool> {
+class CSSValuePool {
 public:
-    static PassRefPtr<CSSValuePool> create() { return adoptRef(new CSSValuePool); }
-    ~CSSValuePool();
-
     PassRefPtr<CSSValueList> createFontFaceValue(const AtomicString&, CSSStyleSheet* contextStyleSheet);
     PassRefPtr<CSSPrimitiveValue> createFontFamilyValue(const String&);
     PassRefPtr<CSSInheritedValue> createInheritedValue() { return m_inheritedValue; }
@@ -82,8 +79,12 @@ private:
 
     typedef HashMap<String, RefPtr<CSSPrimitiveValue> > FontFamilyValueCache;
     FontFamilyValueCache m_fontFamilyValueCache;
+
+    friend CSSValuePool& cssValuePool();
 };
 
+CSSValuePool& cssValuePool();
+
 }
 
 #endif
index 9dcc712..58e4aec 100644 (file)
@@ -525,15 +525,9 @@ void StylePropertySet::setProperty(const CSSProperty& property, CSSProperty* slo
     m_properties.append(property);
 }
 
-bool StylePropertySet::setProperty(CSSPropertyID propertyID, int identifier, bool important, CSSStyleSheet* contextStyleSheet)
+bool StylePropertySet::setProperty(CSSPropertyID propertyID, int identifier, bool important)
 {
-    RefPtr<CSSPrimitiveValue> value;    
-    if (Document* document = contextStyleSheet ? contextStyleSheet->findDocument() : 0)
-        value = document->cssValuePool()->createIdentifierValue(identifier);
-    else
-        value = CSSPrimitiveValue::createIdentifier(identifier);
-
-    setProperty(CSSProperty(propertyID, value.release(), important));
+    setProperty(CSSProperty(propertyID, cssValuePool().createIdentifierValue(identifier), important));
     return true;
 }
 
index 58879a8..7e46ced 100644 (file)
@@ -72,7 +72,7 @@ public:
     void setProperty(CSSPropertyID, PassRefPtr<CSSValue>, bool important = false);
 
     // These do not. FIXME: This is too messy, we can do better.
-    bool setProperty(CSSPropertyID, int value, bool important = false, CSSStyleSheet* contextStyleSheet = 0);
+    bool setProperty(CSSPropertyID, int identifier, bool important = false);
     void setProperty(const CSSProperty&, CSSProperty* slot = 0);
     
     bool removeProperty(CSSPropertyID, String* returnText = 0);
index ec5effc..98c573d 100644 (file)
@@ -38,7 +38,6 @@
 #include "CSSStyleSelector.h"
 #include "CSSStyleSheet.h"
 #include "CSSValueKeywords.h"
-#include "CSSValuePool.h"
 #include "CachedCSSStyleSheet.h"
 #include "CachedResourceLoader.h"
 #include "Chrome.h"
@@ -1857,13 +1856,6 @@ void Document::pageSizeAndMarginsInPixels(int pageIndex, IntSize& pageSize, int&
     marginLeft = style->marginLeft().isAuto() ? marginLeft : valueForLength(style->marginLeft(), width, view);
 }
 
-PassRefPtr<CSSValuePool> Document::cssValuePool() const
-{
-    if (!m_cssValuePool)
-        m_cssValuePool = CSSValuePool::create();
-    return m_cssValuePool;
-}
-
 void Document::setIsViewSource(bool isViewSource)
 {
     m_isViewSource = isViewSource;
index 4e76478..d66241b 100644 (file)
@@ -63,7 +63,6 @@ class CDATASection;
 class CSSStyleDeclaration;
 class CSSStyleSelector;
 class CSSStyleSheet;
-class CSSValuePool;
 class CachedCSSStyleSheet;
 class CachedResourceLoader;
 class CachedScript;
@@ -445,8 +444,6 @@ public:
 
     bool isSrcdocDocument() const { return m_isSrcdocDocument; }
 
-    PassRefPtr<CSSValuePool> cssValuePool() const;
-    
     CSSStyleSelector* styleSelectorIfExists() const { return m_styleSelector.get(); }
 
     bool isViewSource() const { return m_isViewSource; }
@@ -1217,8 +1214,6 @@ private:
     bool m_hasDirtyStyleSelector;
     Vector<OwnPtr<FontData> > m_customFonts;
 
-    mutable RefPtr<CSSValuePool> m_cssValuePool;
-
     Frame* m_frame;
     OwnPtr<CachedResourceLoader> m_cachedResourceLoader;
     RefPtr<DocumentParser> m_parser;
index 1948872..8de69f4 100644 (file)
@@ -192,14 +192,14 @@ void StyledElement::inlineStyleChanged()
     
 bool StyledElement::setInlineStyleProperty(CSSPropertyID propertyID, int identifier, bool important)
 {
-    ensureAttributeData()->ensureMutableInlineStyle(this)->setProperty(propertyID, document()->cssValuePool()->createIdentifierValue(identifier), important);
+    ensureAttributeData()->ensureMutableInlineStyle(this)->setProperty(propertyID, cssValuePool().createIdentifierValue(identifier), important);
     inlineStyleChanged();
     return true;
 }
 
 bool StyledElement::setInlineStyleProperty(CSSPropertyID propertyID, double value, CSSPrimitiveValue::UnitTypes unit, bool important)
 {
-    ensureAttributeData()->ensureMutableInlineStyle(this)->setProperty(propertyID, document()->cssValuePool()->createValue(value, unit), important);
+    ensureAttributeData()->ensureMutableInlineStyle(this)->setProperty(propertyID, cssValuePool().createValue(value, unit), important);
     inlineStyleChanged();
     return true;
 }
@@ -326,12 +326,12 @@ void StyledElement::updateAttributeStyle()
 
 void StyledElement::addPropertyToAttributeStyle(StylePropertySet* style, CSSPropertyID propertyID, int identifier)
 {
-    style->setProperty(propertyID, document()->cssValuePool()->createIdentifierValue(identifier));
+    style->setProperty(propertyID, cssValuePool().createIdentifierValue(identifier));
 }
 
 void StyledElement::addPropertyToAttributeStyle(StylePropertySet* style, CSSPropertyID propertyID, double value, CSSPrimitiveValue::UnitTypes unit)
 {
-    style->setProperty(propertyID, document()->cssValuePool()->createValue(value, unit));
+    style->setProperty(propertyID, cssValuePool().createValue(value, unit));
 }
 
 }
index 39897d0..5f8b223 100644 (file)
@@ -1107,7 +1107,7 @@ void HTMLElement::addHTMLColorToStyle(StylePropertySet* style, CSSPropertyID pro
     if (!parsedColor.isValid())
         parsedColor.setRGB(parseColorStringWithCrazyLegacyRules(colorString));
 
-    style->setProperty(propertyID, document()->cssValuePool()->createColorValue(parsedColor.rgb()));
+    style->setProperty(propertyID, cssValuePool().createColorValue(parsedColor.rgb()));
 }
 
 void StyledElement::copyNonAttributeProperties(const Element* sourceElement)
index 9c12741..38a591f 100644 (file)
@@ -176,7 +176,7 @@ void HTMLFontElement::collectStyleForAttribute(Attribute* attr, StylePropertySet
     } else if (attr->name() == colorAttr)
         addHTMLColorToStyle(style, CSSPropertyColor, attr->value());
     else if (attr->name() == faceAttr) {
-        if (RefPtr<CSSValueList> fontFaceValue = document()->cssValuePool()->createFontFaceValue(attr->value(), document()->elementSheet()))
+        if (RefPtr<CSSValueList> fontFaceValue = cssValuePool().createFontFaceValue(attr->value(), document()->elementSheet()))
             style->setProperty(CSSProperty(CSSPropertyFontFamily, fontFaceValue.release()));
     } else
         HTMLElement::collectStyleForAttribute(attr, style);
index aaaa56e..d417f84 100644 (file)
@@ -83,7 +83,7 @@ void HTMLHRElement::collectStyleForAttribute(Attribute* attr, StylePropertySet*
     } else if (attr->name() == noshadeAttr) {
         addPropertyToAttributeStyle(style, CSSPropertyBorderStyle, CSSValueSolid);
 
-        RefPtr<CSSPrimitiveValue> darkGrayValue = document()->cssValuePool()->createColorValue(Color::darkGray);
+        RefPtr<CSSPrimitiveValue> darkGrayValue = cssValuePool().createColorValue(Color::darkGray);
         style->setProperty(CSSPropertyBorderColor, darkGrayValue);
         style->setProperty(CSSPropertyBackgroundColor, darkGrayValue);
     } else if (attr->name() == sizeAttr) {
index cf64b37..fb4377f 100644 (file)
@@ -464,40 +464,38 @@ PassRefPtr<StylePropertySet> HTMLTableElement::createSharedCellStyle()
 {
     RefPtr<StylePropertySet> style = StylePropertySet::create();
 
-    CSSValuePool* cssValuePool = document()->cssValuePool().get();
-
     switch (cellBorders()) {
     case SolidBordersColsOnly:
         style->setProperty(CSSPropertyBorderLeftWidth, CSSValueThin);
         style->setProperty(CSSPropertyBorderRightWidth, CSSValueThin);
         style->setProperty(CSSPropertyBorderLeftStyle, CSSValueSolid);
         style->setProperty(CSSPropertyBorderRightStyle, CSSValueSolid);
-        style->setProperty(CSSPropertyBorderColor, cssValuePool->createInheritedValue());
+        style->setProperty(CSSPropertyBorderColor, cssValuePool().createInheritedValue());
         break;
     case SolidBordersRowsOnly:
         style->setProperty(CSSPropertyBorderTopWidth, CSSValueThin);
         style->setProperty(CSSPropertyBorderBottomWidth, CSSValueThin);
         style->setProperty(CSSPropertyBorderTopStyle, CSSValueSolid);
         style->setProperty(CSSPropertyBorderBottomStyle, CSSValueSolid);
-        style->setProperty(CSSPropertyBorderColor, cssValuePool->createInheritedValue());
+        style->setProperty(CSSPropertyBorderColor, cssValuePool().createInheritedValue());
         break;
     case SolidBorders:
-        style->setProperty(CSSPropertyBorderWidth, cssValuePool->createValue(1, CSSPrimitiveValue::CSS_PX));
-        style->setProperty(CSSPropertyBorderStyle, cssValuePool->createIdentifierValue(CSSValueSolid));
-        style->setProperty(CSSPropertyBorderColor, cssValuePool->createInheritedValue());
+        style->setProperty(CSSPropertyBorderWidth, cssValuePool().createValue(1, CSSPrimitiveValue::CSS_PX));
+        style->setProperty(CSSPropertyBorderStyle, cssValuePool().createIdentifierValue(CSSValueSolid));
+        style->setProperty(CSSPropertyBorderColor, cssValuePool().createInheritedValue());
         break;
     case InsetBorders:
-        style->setProperty(CSSPropertyBorderWidth, cssValuePool->createValue(1, CSSPrimitiveValue::CSS_PX));
-        style->setProperty(CSSPropertyBorderStyle, cssValuePool->createIdentifierValue(CSSValueInset));
-        style->setProperty(CSSPropertyBorderColor, cssValuePool->createInheritedValue());
+        style->setProperty(CSSPropertyBorderWidth, cssValuePool().createValue(1, CSSPrimitiveValue::CSS_PX));
+        style->setProperty(CSSPropertyBorderStyle, cssValuePool().createIdentifierValue(CSSValueInset));
+        style->setProperty(CSSPropertyBorderColor, cssValuePool().createInheritedValue());
         break;
     case NoBorders:
-        style->setProperty(CSSPropertyBorderWidth, cssValuePool->createValue(0, CSSPrimitiveValue::CSS_PX));
+        style->setProperty(CSSPropertyBorderWidth, cssValuePool().createValue(0, CSSPrimitiveValue::CSS_PX));
         break;
     }
 
     if (m_padding)
-        style->setProperty(CSSPropertyPadding, cssValuePool->createValue(m_padding, CSSPrimitiveValue::CSS_PX));
+        style->setProperty(CSSPropertyPadding, cssValuePool().createValue(m_padding, CSSPrimitiveValue::CSS_PX));
 
     return style.release();
 }