mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add/update comments with links to spec
Extracted out of #5649 * add more hyperlinks to associated specification for structs/methods * follow redirects and update links * replace broken links * removal of WHATWG multipage page name since the page name is not guaranteed to be stable
This commit is contained in:
parent
7f422e2076
commit
cc4a64e1fe
19 changed files with 112 additions and 35 deletions
|
@ -13,6 +13,7 @@ use dom::bindings::num::Finite;
|
|||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::canvasrenderingcontext2d::parse_color;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#canvasgradient
|
||||
#[dom_struct]
|
||||
pub struct CanvasGradient {
|
||||
reflector_: Reflector,
|
||||
|
@ -42,6 +43,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) {
|
||||
let default_black = RGBA {
|
||||
red: 0.0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue