Commit a5756c09 authored by Amos Lim's avatar Amos Lim Committed by Commit Bot

Remove [TreatNullAs=NullString] from CanvasFillStrokeStyles

Replace NullString with EmptyString of interfaces includes CanvasFillStrokeStyles
as per the spec of CanvasRenderingContext2D[1], OffscreenCanvasRenderingContext2D[2],
and PaintRenderingContext2D[3].

[1] https://html.spec.whatwg.org/multipage/canvas.html#canvasrenderingcontext2d
[2] https://html.spec.whatwg.org/multipage/canvas.html#the-offscreen-2d-rendering-context
[3] https://drafts.css-houdini.org/css-paint-api/#paintrenderingcontext2d

Bug: 497307
Change-Id: Iacfa82976b9c32266f427f4b8d0aa2408473aaf2
Reviewed-on: https://chromium-review.googlesource.com/c/1255083Reviewed-by: default avatarFernando Serboncini <fserb@chromium.org>
Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: default avatarRobert Flack <flackr@chromium.org>
Commit-Queue: Amos Lim <eui-sang.lim@samsung.com>
Cr-Commit-Position: refs/heads/master@{#596458}
parent 0c594289
......@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
// https://html.spec.whatwg.org/multipage/canvas.html#canvasrenderingcontext2d
// The spec specifies:
// typedef (HTMLImageElement or
......@@ -77,7 +77,7 @@ interface CanvasRenderingContext2D {
attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
[RaisesException] CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
[CallWith=ScriptState, RaisesException] CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=NullString] DOMString repetitionType);
[CallWith=ScriptState, RaisesException] CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetitionType);
// shadows
attribute unrestricted double shadowOffsetX;
......
......@@ -39,7 +39,7 @@
attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
[RaisesException] CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
[CallWith=ScriptState, RaisesException] CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=NullString] DOMString repetitionType);
[CallWith=ScriptState, RaisesException] CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetitionType);
// shadows
attribute unrestricted double shadowOffsetX;
......
......@@ -36,7 +36,7 @@
attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
CanvasGradient createLinearGradient(double x0, double y0, double x1, double y1);
[RaisesException] CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
[CallWith=ScriptState, RaisesException] CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=NullString] DOMString repetitionType);
[CallWith=ScriptState, RaisesException] CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetitionType);
// shadows
attribute unrestricted double shadowOffsetX;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment