summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSPrimitiveValue.cpp
diff options
context:
space:
mode:
authorGurpreet Kaur <k.gurpreet@samsung.com>2013-09-19 11:03:32 +0000
committerKonstantin Tokarev <annulen@yandex.ru>2016-09-27 07:16:39 +0000
commit3bb3f4e49fec10dfe1bd58e3466384317d71ffbe (patch)
tree9c7e5057ea36aa86c3ed91cea12db98fc78a7f2d /Source/WebCore/css/CSSPrimitiveValue.cpp
parenta7a5227e2ca154172d19cdde023ca6ea76070369 (diff)
downloadqtwebkit-3bb3f4e49fec10dfe1bd58e3466384317d71ffbe.tar.gz
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: http://svn.webkit.org/repository/webkit/trunk@156091 268f45cc-cd09-0410-ab3c-d52691b4dbfc Change-Id: I90501069a30cc57be3483c6048aa88568c6570f1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'Source/WebCore/css/CSSPrimitiveValue.cpp')
-rw-r--r--Source/WebCore/css/CSSPrimitiveValue.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/WebCore/css/CSSPrimitiveValue.cpp b/Source/WebCore/css/CSSPrimitiveValue.cpp
index 3ee8cdf53..d0c852465 100644
--- a/Source/WebCore/css/CSSPrimitiveValue.cpp
+++ b/Source/WebCore/css/CSSPrimitiveValue.cpp
@@ -602,6 +602,8 @@ double CSSPrimitiveValue::computeLengthDouble(const RenderStyle* style, const Re
return -1.0;
case CSS_VH:
case CSS_VW:
+ case CSS_VMAX:
+ case CSS_VMIN:
factor = 1.0;
break;
default: