mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #5872 - nox:canvasgradient, r=saneyuki
The argument should be a double. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5872) <!-- Reviewable:end -->
This commit is contained in:
commit
eefa3eba25
2 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue