Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parse currentColor as Canvas2D color
- Loading branch information
Showing
7 changed files
with
73 additions
and
21 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
5 changes: 0 additions & 5 deletions
5
...s/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.fillStyle.parse.current.basic.html.ini
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
...wpt/metadata/2dcontext/fill-and-stroke-styles/2d.fillStyle.parse.current.changed.html.ini
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
tests/wpt/metadata/2dcontext/fill-and-stroke-styles/2d.gradient.object.current.html.ini
This file was deleted.
Oops, something went wrong.
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
33 changes: 33 additions & 0 deletions
33
...atform-tests/2dcontext/fill-and-stroke-styles/2d.fillStyle.parse.current.notrendered.html
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,33 @@ | ||
<!DOCTYPE html> | ||
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --> | ||
<title>Canvas test: 2d.fillStyle.parse.current.notrendered</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/common/canvas-tests.js"></script> | ||
<link rel="stylesheet" href="/common/canvas-tests.css"> | ||
<body class="show_output"> | ||
|
||
<h1>2d.fillStyle.parse.current.basic</h1> | ||
<p class="desc">currentColor is computed from the canvas element</p> | ||
|
||
|
||
<p class="output">Actual output:</p> | ||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas> | ||
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt=""> | ||
<ul id="d"></ul> | ||
<script> | ||
var t = async_test("currentColor is computed from the canvas element even when element is not rendered"); | ||
_addTest(function(canvas, ctx) { | ||
|
||
canvas.setAttribute('style', 'color: #0f0;'); | ||
canvas.style.display = 'none'; | ||
canvas.offsetTop; | ||
ctx.fillStyle = 'currentColor'; | ||
canvas.style.display = 'inline'; | ||
ctx.fillRect(0, 0, 100, 50); | ||
_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255"); | ||
|
||
|
||
}); | ||
</script> | ||
|