CSS Unit vw in border-width maps to 0px.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2013 16:44:22 +0000 (16:44 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2013 16:44:22 +0000 (16:44 +0000)
commit07b3ea0c5cfcf2c157e66b65cc701a49187864ec
tree073a5e3e40bb4a26a9cc76fb2e309e094f163734
parentf6b9cc9340f889861d2a210949ff6e5c7e86f041
CSS Unit vw in border-width maps to 0px.
https://bugs.webkit.org/show_bug.cgi?id=109229

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

Source/WebCore:

Border and outline properties were not applied incase
its values were given in vh/vw units.

Tests: fast/css/viewport-height-border.html
       fast/css/viewport-height-outline.html
       fast/css/viewport-width-border.html
       fast/css/viewport-width-outline.html

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLengthDouble):
Added case CSS_VH and CSS_VW.
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isViewportPercentageWidth):
(WebCore::CSSPrimitiveValue::isViewportPercentageHeight):
Added APIs to check the unit type(CSS_VW and CSS_VH).
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyComputeLength::applyValue):
Calculating the border values which has been specified
in vh/vw units.The vh/vw units are calcultated as percent
of viewport height and viewport width respectively.

LayoutTests:

* fast/css/viewport-height-border-expected.txt: Added.
* fast/css/viewport-height-border.html: Added.
* fast/css/viewport-height-outline-expected.txt: Added.
* fast/css/viewport-height-outline.html: Added.
* fast/css/viewport-width-border-expected.txt: Added.
* fast/css/viewport-width-border.html: Added.
* fast/css/viewport-width-outline-expected.txt: Added.
* fast/css/viewport-width-outline.html: Added.
Added new tests for verifying that border and outline properties are
applied when its values are given in vh/vw units.
* resources/js-test-pre.js:
(shouldNotBeEqualToString):
Added this API so that can compare two strings.Similiar to
shouldBeEqualToString.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/viewport-height-border-expected.txt [new file with mode: 0755]
LayoutTests/fast/css/viewport-height-border.html [new file with mode: 0755]
LayoutTests/fast/css/viewport-height-outline-expected.txt [new file with mode: 0755]
LayoutTests/fast/css/viewport-height-outline.html [new file with mode: 0755]
LayoutTests/fast/css/viewport-width-border-expected.txt [new file with mode: 0755]
LayoutTests/fast/css/viewport-width-border.html [new file with mode: 0755]
LayoutTests/fast/css/viewport-width-outline-expected.txt [new file with mode: 0755]
LayoutTests/fast/css/viewport-width-outline.html [new file with mode: 0755]
LayoutTests/resources/js-test-pre.js
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSPrimitiveValue.h
Source/WebCore/css/DeprecatedStyleBuilder.cpp