From a90c678c682de31ece3a47f547a1474cc7804fdf Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Mon, 27 Apr 2015 13:45:17 -0500 Subject: [PATCH] servo: Merge #5872 - Fix CanvasGradient.addColorStop() (from nox:canvasgradient); r=saneyuki The argument should be a double. Source-Repo: https://github.com/servo/servo Source-Revision: eefa3eba256d48bc24189417c3bb8d3a9a77d979 --- servo/components/script/dom/canvasgradient.rs | 2 +- servo/components/script/dom/webidls/CanvasGradient.webidl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/servo/components/script/dom/canvasgradient.rs b/servo/components/script/dom/canvasgradient.rs index e25dc88ef725..eec31c3fc79a 100644 --- a/servo/components/script/dom/canvasgradient.rs +++ b/servo/components/script/dom/canvasgradient.rs @@ -44,7 +44,7 @@ impl CanvasGradient { impl<'a> CanvasGradientMethods for JSRef<'a, CanvasGradient> { // https://html.spec.whatwg.org/multipage/#dom-canvasgradient-addcolorstop - fn AddColorStop(self, offset: Finite, color: String) { + fn AddColorStop(self, offset: Finite, color: String) { let default_black = RGBA { red: 0.0, green: 0.0, diff --git a/servo/components/script/dom/webidls/CanvasGradient.webidl b/servo/components/script/dom/webidls/CanvasGradient.webidl index fbeab8439871..abe41d853dcb 100644 --- a/servo/components/script/dom/webidls/CanvasGradient.webidl +++ b/servo/components/script/dom/webidls/CanvasGradient.webidl @@ -3,10 +3,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +// https://html.spec.whatwg.org/#canvasgradient +// [Exposed=(Window,Worker)] interface CanvasGradient { // opaque object - // addColorStop should take a double - void addColorStop(float offset, DOMString color); + void addColorStop(double offset, DOMString color); };