| Index: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl
|
| diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl
|
| index 2a53fa865f2573d33efd34eb77456d5bce3b7ba3..d81da970bdbb9a8d32381cd30d2ea5c959ccaec5 100644
|
| --- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl
|
| +++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.idl
|
| @@ -25,7 +25,6 @@
|
|
|
| // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d
|
|
|
| -// FIXME: float => double throughout
|
| typedef (HTMLImageElement or
|
| HTMLVideoElement or
|
| HTMLCanvasElement or
|
| @@ -49,17 +48,17 @@ enum ImageSmoothingQuality {"low", "medium", "high"};
|
|
|
| // transformations (default transform is the identity matrix)
|
| [RuntimeEnabled=ExperimentalCanvasFeatures] attribute SVGMatrix currentTransform;
|
| - void scale(unrestricted float x, unrestricted float y);
|
| - void rotate(unrestricted float angle);
|
| - void translate(unrestricted float x, unrestricted float y);
|
| - void transform(unrestricted float a, unrestricted float b, unrestricted float c, unrestricted float d, unrestricted float e, unrestricted float f);
|
| - void setTransform(unrestricted float a, unrestricted float b, unrestricted float c, unrestricted float d, unrestricted float e, unrestricted float f);
|
| + void scale(unrestricted double x, unrestricted double y);
|
| + void rotate(unrestricted double angle);
|
| + void translate(unrestricted double x, unrestricted double y);
|
| + void transform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
|
| + void setTransform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f);
|
| void resetTransform();
|
|
|
| // compositing
|
| - attribute unrestricted float globalAlpha; // (default 1.0)
|
| + attribute unrestricted double globalAlpha; // (default 1.0)
|
| attribute DOMString globalCompositeOperation; // (default source-over)
|
| - [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString filter; // (default 'none')
|
| + [RuntimeEnabled=ExperimentalCanvasFeatures] attribute DOMString filter; // (default 'none')
|
|
|
| // image smoothing
|
| [ImplementedAs=imageSmoothingEnabled, DeprecateAs=PrefixedImageSmoothingEnabled] attribute boolean webkitImageSmoothingEnabled;
|
| @@ -69,20 +68,20 @@ enum ImageSmoothingQuality {"low", "medium", "high"};
|
| // colors and styles (see also the CanvasDrawingStyles interface)
|
| attribute (DOMString or CanvasGradient or CanvasPattern) strokeStyle; // (default black)
|
| attribute (DOMString or CanvasGradient or CanvasPattern) fillStyle; // (default black)
|
| - CanvasGradient createLinearGradient(float x0, float y0, float x1, float y1);
|
| - [RaisesException] CanvasGradient createRadialGradient(float x0, float y0, float r0, float x1, float y1, float r1);
|
| + 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);
|
| [RaisesException] CanvasPattern createPattern(CanvasImageSource image, DOMString? repetitionType);
|
|
|
| // shadows
|
| - attribute unrestricted float shadowOffsetX;
|
| - attribute unrestricted float shadowOffsetY;
|
| - attribute unrestricted float shadowBlur;
|
| + attribute unrestricted double shadowOffsetX;
|
| + attribute unrestricted double shadowOffsetY;
|
| + attribute unrestricted double shadowBlur;
|
| attribute DOMString shadowColor;
|
|
|
| // rects
|
| - void clearRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
|
| - void fillRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
|
| - void strokeRect(unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
|
| + void clearRect(unrestricted double x, unrestricted double y, unrestricted double width, unrestricted double height);
|
| + void fillRect(unrestricted double x, unrestricted double y, unrestricted double width, unrestricted double height);
|
| + void strokeRect(unrestricted double x, unrestricted double y, unrestricted double width, unrestricted double height);
|
|
|
| // path API (see also CanvasPathMethods)
|
| void beginPath();
|
| @@ -97,20 +96,20 @@ enum ImageSmoothingQuality {"low", "medium", "high"};
|
| [RuntimeEnabled=ExperimentalCanvasFeatures] void scrollPathIntoView(optional Path2D path);
|
| void clip(optional CanvasFillRule winding);
|
| void clip(Path2D path, optional CanvasFillRule winding);
|
| - boolean isPointInPath(unrestricted float x, unrestricted float y, optional CanvasFillRule winding);
|
| - boolean isPointInPath(Path2D path, unrestricted float x, unrestricted float y, optional CanvasFillRule winding);
|
| - boolean isPointInStroke(unrestricted float x, unrestricted float y);
|
| - boolean isPointInStroke(Path2D path, unrestricted float x, unrestricted float y);
|
| + boolean isPointInPath(unrestricted double x, unrestricted double y, optional CanvasFillRule winding);
|
| + boolean isPointInPath(Path2D path, unrestricted double x, unrestricted double y, optional CanvasFillRule winding);
|
| + boolean isPointInStroke(unrestricted double x, unrestricted double y);
|
| + boolean isPointInStroke(Path2D path, unrestricted double x, unrestricted double y);
|
|
|
| // text (see also the CanvasDrawingStyles interface)
|
| - void fillText(DOMString text, unrestricted float x, unrestricted float y, optional unrestricted float maxWidth);
|
| - void strokeText(DOMString text, unrestricted float x, unrestricted float y, optional unrestricted float maxWidth);
|
| + void fillText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
|
| + void strokeText(DOMString text, unrestricted double x, unrestricted double y, optional unrestricted double maxWidth);
|
| TextMetrics measureText(DOMString text);
|
|
|
| // drawing images
|
| - [RaisesException] void drawImage(CanvasImageSource image, unrestricted float x, unrestricted float y);
|
| - [RaisesException] void drawImage(CanvasImageSource image, unrestricted float x, unrestricted float y, unrestricted float width, unrestricted float height);
|
| - [RaisesException] void drawImage(CanvasImageSource image, unrestricted float sx, unrestricted float sy, unrestricted float sw, unrestricted float sh, unrestricted float dx, unrestricted float dy, unrestricted float dw, unrestricted float dh);
|
| + [RaisesException] void drawImage(CanvasImageSource image, unrestricted double x, unrestricted double y);
|
| + [RaisesException] void drawImage(CanvasImageSource image, unrestricted double x, unrestricted double y, unrestricted double width, unrestricted double height);
|
| + [RaisesException] void drawImage(CanvasImageSource image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
|
|
|
| // hit regions
|
| [RuntimeEnabled=ExperimentalCanvasFeatures, RaisesException] void addHitRegion(optional HitRegionOptions options);
|
| @@ -119,10 +118,10 @@ enum ImageSmoothingQuality {"low", "medium", "high"};
|
|
|
| // pixel manipulation
|
| ImageData createImageData(ImageData imagedata);
|
| - [RaisesException] ImageData createImageData(float sw, float sh);
|
| - [RaisesException] ImageData getImageData(float sx, float sy, float sw, float sh);
|
| - [RaisesException] void putImageData(ImageData imagedata, float dx, float dy);
|
| - [RaisesException] void putImageData(ImageData imagedata, float dx, float dy, float dirtyX, float dirtyY, float dirtyWidth, float dirtyHeight);
|
| + [RaisesException] ImageData createImageData(double sw, double sh);
|
| + [RaisesException] ImageData getImageData(double sx, double sy, double sw, double sh);
|
| + [RaisesException] void putImageData(ImageData imagedata, double dx, double dy);
|
| + [RaisesException] void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
|
|
|
| // Context state
|
| // Should be merged with WebGL counterpart in CanvasRenderingContext, once no-longer experimental
|
| @@ -132,15 +131,15 @@ enum ImageSmoothingQuality {"low", "medium", "high"};
|
|
|
| // FIXME: factor out to CanvasDrawingStyles
|
| // line caps/joins
|
| - attribute unrestricted float lineWidth; // (default 1)
|
| + attribute unrestricted double lineWidth; // (default 1)
|
| attribute DOMString lineCap; // "butt", "round", "square" (default "butt")
|
| attribute DOMString lineJoin; // "round", "bevel", "miter" (default "miter")
|
| - attribute unrestricted float miterLimit; // (default 10)
|
| + attribute unrestricted double miterLimit; // (default 10)
|
|
|
| // dashed lines
|
| - void setLineDash(sequence<unrestricted float> dash);
|
| - sequence<unrestricted float> getLineDash();
|
| - attribute unrestricted float lineDashOffset;
|
| + void setLineDash(sequence<unrestricted double> dash);
|
| + sequence<unrestricted double> getLineDash();
|
| + attribute unrestricted double lineDashOffset;
|
|
|
| // text
|
| attribute DOMString font; // (default 10px sans-serif)
|
|
|