Use CSS4 image-rendering to determing image scaling quality
authorallan.jensen@digia.com <allan.jensen@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2013 16:19:39 +0000 (16:19 +0000)
committerallan.jensen@digia.com <allan.jensen@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2013 16:19:39 +0000 (16:19 +0000)
commit51289312c2a5d38951f2ec9ac11a6fe107bff056
tree9c05a1206cbb7b73925f87eb3e7f6d6daeaf80bc
parent7329dd237e7c5c05a4b45117ca1bb34b0102c09a
Use CSS4 image-rendering to determing image scaling quality
https://bugs.webkit.org/show_bug.cgi?id=113405

Reviewed by Simon Fraser.

Source/WebCore:

Implement the new CSS4 image-rendering property values.

Image scaling now uses low-quality (pixelated) scaling for
crisp-edges, pixelated and optimizeSpeed values, and always
use high quality (smooth) scaling for -webkit-smooth and
optimizeQuality. The latter can be used to disable low quality
scaling during CSS animations or live resizing.

The new values are protected with a new CSS4_IMAGES feature, but
the crisp-edge value has been introduced before to displace the
deprecated -webkit-optimize-contrast value, and optimizeSpeed
and optimizeQuality values are supported for SVG compatibility.

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
* css/CSSValueKeywords.in:
* rendering/RenderBoxModelObject.cpp:
(WebCore::ImageQualityController::shouldPaintAtLowQuality):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced):
* rendering/style/RenderStyleConstants.h:

Tools:

Introduce new flag to enable experimental support for CSS4 Images.

* Scripts/webkitperl/FeatureList.pm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@148208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderHTMLCanvas.cpp
Source/WebCore/rendering/style/RenderStyleConstants.h
Tools/ChangeLog
Tools/Scripts/webkitperl/FeatureList.pm