[SVG2] Add support for the buffered-rendering hint
https://bugs.webkit.org/show_bug.cgi?id=104207
Reviewed by Stephen Chenney.
Source/WebCore:
This patch adds the SVG2 buffered-rendering property and implements it for the image
element. For reference, the spec can be found at:
https://svgwg.org/svg2-draft/single-page.html#painting-BufferedRendering
The buffered-rendering hint causes our implementation to create a temporary image buffer
for caching an element's foreground rendering. This behavior has been designed to support
other graphical and container elements in followup patches (such as the use and g elements).
This patch should not affect rendering, and a test has been added showing the image
results are unchanged.
The performance aspects of this patch can be tested using the following test:
http://philbit.com/bouncingTigers.html
Without the patch, rendering is below 1fps. With the patch, rendering is fluid.
Tests: svg/css/buffered-rendering.html
svg/repaint/buffered-rendering-dynamic-image.html
svg/repaint/buffered-rendering-static-image.html
Other than the changes to RenderSVGImage and SVGRenderingContext, the changes below are to
support the new buffered-rendering property:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore):
(WebCore::CSSPrimitiveValue::operator EBufferedRendering):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
* css/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
* css/SVGCSSPropertyNames.in:
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/SVGCSSValueKeywords.in:
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::diff):
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::initialBuff