CSS Unit vmax and vmin in border-width not handled.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Sep 2013 11:03:32 +0000 (11:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Sep 2013 11:03:32 +0000 (11:03 +0000)
commit9f0064a0d72e3f04e19446da766e743b292eed66
tree7f3471ef7459ce22b032a525f7879acbd2d4c3f3
parent2f0e69eea7b71afe14a20b6b17a808c4e03c4799
CSS Unit vmax and vmin in border-width not handled.
https://bugs.webkit.org/show_bug.cgi?id=121421

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

Source/WebCore:

Border properties were not applied incase its values
were given in vmax/vmin units.

Tests: fast/css/viewport-vmax-border.html
       fast/css/viewport-vmin-border.html

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLengthDouble):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isViewportPercentageMax):
(WebCore::CSSPrimitiveValue::isViewportPercentageMin):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyComputeLength::applyValue):
Calculating the border values which has been specified in
vmax/vmin units. 1vmax: 1vw or 1vh, whatever is largest.
1vmin: 1vw or 1vh, whatever is smallest. The vh/vw units are
calcultated as percent of viewport height and viewport width respectively.

LayoutTests:

* fast/css/viewport-vmax-border-expected.txt: Added.
* fast/css/viewport-vmax-border.html: Added.
* fast/css/viewport-vmin-border-expected.txt: Added.
* fast/css/viewport-vmin-border.html: Added.
Added new tests for verifying that border properties are
applied when its values are given in vmax/vmin units.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/viewport-vmax-border-expected.txt [new file with mode: 0755]
LayoutTests/fast/css/viewport-vmax-border.html [new file with mode: 0755]
LayoutTests/fast/css/viewport-vmin-border-expected.txt [new file with mode: 0755]
LayoutTests/fast/css/viewport-vmin-border.html [new file with mode: 0755]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSPrimitiveValue.h
Source/WebCore/css/DeprecatedStyleBuilder.cpp