mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Fix #9508: Beautify our union enums constructors
This commit is contained in:
parent
7c249b1d53
commit
2be49404be
13 changed files with 69 additions and 71 deletions
|
@ -236,11 +236,11 @@ impl HTMLCanvasElementMethods for HTMLCanvasElement {
|
|||
match &*id {
|
||||
"2d" => {
|
||||
self.get_or_init_2d_context()
|
||||
.map(CanvasRenderingContext2DOrWebGLRenderingContext::eCanvasRenderingContext2D)
|
||||
.map(CanvasRenderingContext2DOrWebGLRenderingContext::CanvasRenderingContext2D)
|
||||
}
|
||||
"webgl" | "experimental-webgl" => {
|
||||
self.get_or_init_webgl_context(cx, attributes.get(0).cloned())
|
||||
.map(CanvasRenderingContext2DOrWebGLRenderingContext::eWebGLRenderingContext)
|
||||
.map(CanvasRenderingContext2DOrWebGLRenderingContext::WebGLRenderingContext)
|
||||
}
|
||||
_ => None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue