Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[SVG] Default for x1, y1 and y2 is 0% for LinearGradient
[SVG] Default for x1, y1 and y2 is 0% for LinearGradient https://bugs.webkit.org/show_bug.cgi?id=248212 Reviewed by Nikolas Zimmermann. This patch is to align Webkit with Blink / Chrome and Gecko / Firefox. Merge - https://chromium.googlesource.com/chromium/blink/+/219dff463987f53c22f5f96f35a794246a13538d As per the spec, if the x1|y1|y2 attribute is not specified, the effect is as if a value of "0%" were specified. * Source/WebCore/svg/SVGLinearGradientElement.h: Update default values for x1, y1 and y2 * LayoutTests/svg/gradient/linear-gradient-default-length.html: Add Test Case * LayoutTests/svg/gradient/linear-gradient-default-length-expected.txt: Add Test Case Expectations * LayoutTests/svg/gradient/linear-gradient-y2-default-length.svg: Added Test Case * LayoutTests/svg/gradient/linear-gradient-y2-default-length-expected.svg: Added Test Case Expectations * LayoutTests/svg/gradient/linear-gradient-y1-default-length.svg: Added Test Case * LayoutTests/svg/gradient/linear-gradient-y1-default-length-expected.svg: Added Test Case Expectations * LayoutTests/svg/gradient/linear-gradient-x1-default-length.svg: Added Test Case * LayoutTests/svg/gradient/linear-gradient-x1-default-length-expected.svg: Added Test Case Expectations Canonical link: https://commits.webkit.org/257032@main
- Loading branch information
1 parent
24d58cd
commit 7a2abd482abc992a55a58f3a3b7957229775ac2c
Showing
9 changed files
with
82 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
PASS Testing SVGLinearGradientElement coordinate defaults x1 | ||
PASS Testing SVGLinearGradientElement coordinate defaults x2 | ||
PASS Testing SVGLinearGradientElement coordinate defaults y1 | ||
PASS Testing SVGLinearGradientElement coordinate defaults y2 | ||
|
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,19 @@ | ||
<!DOCTYPE html> | ||
<title>SVGLinearGradientElement coordinate defaults</title> | ||
<script src=../../resources/testharness.js></script> | ||
<script src=../../resources/testharnessreport.js></script> | ||
<svg> | ||
<linearGradient id="lg"/> | ||
</svg> | ||
<script> | ||
function testLengthValue(result, expected, testcase) { | ||
test(function() { | ||
assert_equals(result, expected); | ||
}, "Testing " + document.title + " " + testcase); | ||
} | ||
var linearGradient = document.querySelector("#lg"); | ||
testLengthValue(linearGradient.x1.baseVal.valueAsString, "0%", "x1"); | ||
testLengthValue(linearGradient.x2.baseVal.valueAsString, "100%", "x2"); | ||
testLengthValue(linearGradient.y1.baseVal.valueAsString, "0%", "y1"); | ||
testLengthValue(linearGradient.y2.baseVal.valueAsString, "0%", "y2"); | ||
</script> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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