Validate CSS Device Adaptation properties and resolve shorthands
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2012 12:47:46 +0000 (12:47 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2012 12:47:46 +0000 (12:47 +0000)
commit01445289e0510ee201e3efae3f950ed3c5df93d9
tree564d6139fbe1d9208bfbb187603e36f763e965a9
parent028fde210864607313b212610b5b628024177f91
Validate CSS Device Adaptation properties and resolve shorthands
https://bugs.webkit.org/show_bug.cgi?id=95962

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-11-05
Reviewed by Alexis Menard.

Source/WebCore:

Add the missing keywords and properties for the viewport at-rule.
Note that we have to mark that we are inside a viewport scope because
some properties are not validated as they would be inside a style
rule. As an example, the semantics of CSSPropertyWidth are completely
different: on a viewport rule, it stands for a shorthand for the
minimum and maximum width.

Test: css3/device-adapt/viewport-properties-validation.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore):
(WebCore::CSSParser::parseViewportProperty):
(WebCore::CSSParser::parseViewportShorthand):
* css/CSSParser.h:
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:

LayoutTests:

Added a test for CSS Device Adaptation property parsing validation.

* css3/device-adapt/viewport-properties-validation-expected.txt: Added.
* css3/device-adapt/viewport-properties-validation.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/device-adapt/viewport-properties-validation-expected.txt [new file with mode: 0644]
LayoutTests/css3/device-adapt/viewport-properties-validation.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/CSSValueKeywords.in