зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
23e99e3703
Коммит
a90c678c68
|
@ -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<f32>, color: String) {
|
||||
fn AddColorStop(self, offset: Finite<f64>, color: String) {
|
||||
let default_black = RGBA {
|
||||
red: 0.0,
|
||||
green: 0.0,
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче