Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Shadows don't support viewport units
https://bugs.webkit.org/show_bug.cgi?id=119649 Reviewed by Darin Adler. Source/WebCore: We don't yet support viewport units in shadows, so fail parsing if we see one. The bug to fix this completely is: https://webkit.org/b/119650 Test: fast/css/shadow-viewport-units.html * css/CSSParser.cpp: (WebCore::CSSParser::parseShadow): Fail if we get one of vh, vw, vmin, vmax. LayoutTests: Test that exercises a viewport unit in text-shadow to make sure we don't parse it. * fast/css/shadow-viewport-units-expected.txt: Added. * fast/css/shadow-viewport-units.html: Added. Canonical link: https://commits.webkit.org/137638@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
5 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PASS: No shadow style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<style> | ||
#a { text-shadow: 0px 0px 0vh black; } /* Should be invalid - we don't yet support viewport units in shadow */ | ||
</style> | ||
<div id="a"></div> | ||
<script> | ||
window.addEventListener("load", function () { | ||
if (window.testRunner) | ||
testRunner.dumpAsText(); | ||
|
||
var a = document.getElementById("a"); | ||
var output = document.createElement("p"); | ||
document.body.appendChild(output); | ||
if (window.getComputedStyle(a).textShadow == "none") | ||
output.innerText = "PASS: No shadow style"; | ||
else | ||
output.innerText = "FAIL: Shadow style: " + window.getComputedStyle(a).textShadow; | ||
}, false); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters