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 <[email protected]> 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
(WebCore::CSSParser::parseShadow):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::MatchedProperties::~MatchedProperties):
(WebCore::StyleResolver::viewportPercentageHeight):
(WebCore::StyleResolver::viewportPercentageWidth):
(WebCore::StyleResolver::viewportPercentageMax):
(WebCore::StyleResolver::viewportPercentageMin):
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.