mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Allow currentColor in canvas context's shadowColor (#30754)
This allows unifying the parse_color function and method, aligns Servo with other browsers, and obeys the HTML spec: - https://html.spec.whatwg.org/multipage/canvas.html#shadows - https://html.spec.whatwg.org/multipage/infrastructure.html#parsed-as-a-css-color-value
This commit is contained in:
parent
334c67a3cc
commit
3543a87592
8 changed files with 186 additions and 56 deletions
|
@ -647,7 +647,8 @@ impl CanvasRenderingContext2DMethods for CanvasRenderingContext2D {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-shadowcolor
|
||||
fn SetShadowColor(&self, value: DOMString) {
|
||||
self.canvas_state.set_shadow_color(value)
|
||||
self.canvas_state
|
||||
.set_shadow_color(self.canvas.as_ref().map(|c| &**c), value)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue