Add css3-images image-resolution (dppx only)
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jun 2012 17:19:26 +0000 (17:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jun 2012 17:19:26 +0000 (17:19 +0000)
commit3f138bb1e11c71ec804eb2a86b89afe9fd539153
treeddf2bb432fe886d17b465a8c817191852110f619
parent79e31f45e9358728b9e458ea11e83c31371f19a9
Add css3-images image-resolution (dppx only)
https://bugs.webkit.org/show_bug.cgi?id=85332

Patch by David Barr <davidbarr@chromium.org> on 2012-06-11
Reviewed by Tony Chang.

The css3-images module is at candidate recommendation.
http://www.w3.org/TR/2012/CR-css3-images-20120417/#image-resolution

Source/WebCore:

Test: fast/css/image-resolution.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSGrammar.y:
* css/CSSParser.cpp:
(WebCore::CSSParser::validUnit):
(WebCore::CSSParser::createPrimitiveNumericValue):
(WebCore::unitFromString):
(WebCore::CSSParser::parseValidPrimitive):
(WebCore::CSSParser::parseValue):
(WebCore):
(WebCore::CSSParser::parseImageResolution):
(WebCore::CSSParser::detectNumberToken):
* css/CSSParser.h:
* css/CSSPrimitiveValue.cpp:
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::unitCategory):
(WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory):
(WebCore::CSSPrimitiveValue::customCssText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
* css/CSSPrimitiveValue.h:
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/StyleBuilder.cpp:
(WebCore):
(ApplyPropertyImageResolution):
(WebCore::ApplyPropertyImageResolution::applyInheritValue):
(WebCore::ApplyPropertyImageResolution::applyInitialValue):
(WebCore::ApplyPropertyImageResolution::applyValue):
(WebCore::ApplyPropertyImageResolution::createHandler):
(WebCore::StyleBuilder::StyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::styleDidChange):
(WebCore::RenderImage::imageDimensionsChanged):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData):

LayoutTests:

* fast/css/image-resolution/image-resolution-expected.txt: Added.
* fast/css/image-resolution/image-resolution.html: Added.
* platform/chromium/TestExpectations: Skip tests until image-resolution implementation lands.
* platform/efl/TestExpectations: Skip tests until image-resolution implementation lands.
* platform/gtk/TestExpectations: Skip tests until image-resolution implementation lands.
* platform/mac/TestExpectations: Skip tests until image-resolution implementation lands.
* platform/qt/TestExpectations: Skip tests until image-resolution implementation lands.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@119984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/image-resolution/image-resolution-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/image-resolution/image-resolution.html [new file with mode: 0644]
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/qt/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSGrammar.y
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSPrimitiveValue.h
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/StyleBuilder.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.h