зеркало из https://github.com/mozilla/gecko-dev.git
Bug 861938. Make the CanvasWindingRule arguments be treated as missing if undefined is passed in. r=smaug
This commit is contained in:
Родитель
c9eca87821
Коммит
0c908271f1
|
@ -111,6 +111,7 @@ MOCHITEST_FILES = \
|
||||||
test_drawImage_document_domain.html \
|
test_drawImage_document_domain.html \
|
||||||
test_mozDashOffset.html \
|
test_mozDashOffset.html \
|
||||||
file_drawImage_document_domain.html \
|
file_drawImage_document_domain.html \
|
||||||
|
test_windingRuleUndefined.html \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ifneq (1_Linux,$(MOZ_SUITE)_$(OS_ARCH))
|
ifneq (1_Linux,$(MOZ_SUITE)_$(OS_ARCH))
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<!--
|
||||||
|
https://bugzilla.mozilla.org/show_bug.cgi?id=861938
|
||||||
|
-->
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Test for Bug 861938</title>
|
||||||
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=861938">Mozilla Bug 861938</a>
|
||||||
|
<p id="display"></p>
|
||||||
|
<div id="content" style="display: none">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<pre id="test">
|
||||||
|
</pre>
|
||||||
|
<script type="application/javascript">
|
||||||
|
|
||||||
|
/** Test for Bug 861938 **/
|
||||||
|
|
||||||
|
try {
|
||||||
|
var canvas = document.createElement("canvas");
|
||||||
|
canvas.getContext('2d').fill(undefined);
|
||||||
|
|
||||||
|
ok(true, "Should be able to pass undefined to fill()");
|
||||||
|
} catch(e) {
|
||||||
|
ok(false, "Should be able to pass undefined to fill()");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -76,7 +76,7 @@ interface CanvasRenderingContext2D {
|
||||||
|
|
||||||
// path API (see also CanvasPathMethods)
|
// path API (see also CanvasPathMethods)
|
||||||
void beginPath();
|
void beginPath();
|
||||||
void fill(optional CanvasWindingRule winding = "nonzero");
|
void fill([TreatUndefinedAs=Missing] optional CanvasWindingRule winding = "nonzero");
|
||||||
// NOT IMPLEMENTED void fill(Path path);
|
// NOT IMPLEMENTED void fill(Path path);
|
||||||
void stroke();
|
void stroke();
|
||||||
// NOT IMPLEMENTED void stroke(Path path);
|
// NOT IMPLEMENTED void stroke(Path path);
|
||||||
|
@ -86,10 +86,10 @@ interface CanvasRenderingContext2D {
|
||||||
// NOT IMPLEMENTED boolean drawCustomFocusRing(Path path, Element element);
|
// NOT IMPLEMENTED boolean drawCustomFocusRing(Path path, Element element);
|
||||||
// NOT IMPLEMENTED void scrollPathIntoView();
|
// NOT IMPLEMENTED void scrollPathIntoView();
|
||||||
// NOT IMPLEMENTED void scrollPathIntoView(Path path);
|
// NOT IMPLEMENTED void scrollPathIntoView(Path path);
|
||||||
void clip(optional CanvasWindingRule winding = "nonzero");
|
void clip([TreatUndefinedAs=Missing] optional CanvasWindingRule winding = "nonzero");
|
||||||
// NOT IMPLEMENTED void clip(Path path);
|
// NOT IMPLEMENTED void clip(Path path);
|
||||||
// NOT IMPLEMENTED void resetClip();
|
// NOT IMPLEMENTED void resetClip();
|
||||||
boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasWindingRule winding = "nonzero");
|
boolean isPointInPath(unrestricted double x, unrestricted double y, [TreatUndefinedAs=Missing] optional CanvasWindingRule winding = "nonzero");
|
||||||
// NOT IMPLEMENTED boolean isPointInPath(Path path, unrestricted double x, unrestricted double y);
|
// NOT IMPLEMENTED boolean isPointInPath(Path path, unrestricted double x, unrestricted double y);
|
||||||
boolean isPointInStroke(double x, double y);
|
boolean isPointInStroke(double x, double y);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче