CSS Unit vh, vw, vmin and vmax in box-shadow are not applied.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Sep 2013 04:00:29 +0000 (04:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Sep 2013 04:00:29 +0000 (04:00 +0000)
commit271cbaa69ffa1738593cd183fa079ddc0303afad
treefc7028ba4e79b22c850c3cd95e3daff55a90fbbd
parent9dcf46f62d237490833f9791d9488b76c8c1de85
CSS Unit vh, vw, vmin and vmax in box-shadow are not applied.
https://bugs.webkit.org/show_bug.cgi?id=121422

Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2013-09-23
Reviewed by Darin Adler.

Source/WebCore:

Box-shadow properties were not applied incase its values
were given in vh, vw, vmax, vmin unit.

Tests: fast/css/box-shadow-negative-viewportlength.html
       fast/css/box-shadow-viewport-height.html
       fast/css/box-shadow-viewport-vmax.html
       fast/css/box-shadow-viewport-vmin.html
       fast/css/box-shadow-viewport-width.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseShadow):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::MatchedProperties::~MatchedProperties):
(WebCore::StyleResolver::viewportPercentageHeight):
(WebCore::StyleResolver::viewportPercentageWidth):
(WebCore::StyleResolver::viewportPercentageMax):
(WebCore::StyleResolver::viewportPercentageMin):
* css/StyleResolver.h:
Parsing and calculating the shadow values which has been specified
in viewport units.The vh/vw units are calcultated as percent of
viewport height and viewport width respectively. 1vmax: 1vw or 1vh,
whatever is largest.1vmin: 1vw or 1vh, whatever is smallest.

LayoutTests:

* fast/css/box-shadow-negative-viewportlength-expected-mismatch.html: Added.
* fast/css/box-shadow-negative-viewportlength.html: Added.
* fast/css/box-shadow-viewport-height-expected-mismatch.html: Added.
* fast/css/box-shadow-viewport-height.html: Added.
* fast/css/box-shadow-viewport-vmax-expected-mismatch.html: Added.
* fast/css/box-shadow-viewport-vmax.html: Added.
* fast/css/box-shadow-viewport-vmin-expected-mismatch.html: Added.
* fast/css/box-shadow-viewport-vmin.html: Added.
* fast/css/box-shadow-viewport-width-expected-mismatch.html: Added.
* fast/css/box-shadow-viewport-width.html: Added.
Added new tests for verifying that box-shadow properties are
applied when its values are viewport units.
* fast/css/shadow-viewport-units-expected.txt:
* fast/css/shadow-viewport-units.html:
Rebaselining existing tests as per the new behavior. Support for shadow
properties with viewport units is added so modified the test case.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/box-shadow-negative-viewportlength-expected-mismatch.html [new file with mode: 0755]
LayoutTests/fast/css/box-shadow-negative-viewportlength.html [new file with mode: 0755]
LayoutTests/fast/css/box-shadow-viewport-height-expected-mismatch.html [new file with mode: 0755]
LayoutTests/fast/css/box-shadow-viewport-height.html [new file with mode: 0755]
LayoutTests/fast/css/box-shadow-viewport-vmax-expected-mismatch.html [new file with mode: 0755]
LayoutTests/fast/css/box-shadow-viewport-vmax.html [new file with mode: 0755]
LayoutTests/fast/css/box-shadow-viewport-vmin-expected-mismatch.html [new file with mode: 0755]
LayoutTests/fast/css/box-shadow-viewport-vmin.html [new file with mode: 0755]
LayoutTests/fast/css/box-shadow-viewport-width-expected-mismatch.html [new file with mode: 0755]
LayoutTests/fast/css/box-shadow-viewport-width.html [new file with mode: 0755]
LayoutTests/fast/css/shadow-viewport-units-expected.txt
LayoutTests/fast/css/shadow-viewport-units.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleResolver.h