mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make reflect_dom_object take a &GlobalScope
This commit is contained in:
parent
093b189b48
commit
fcb59d3057
132 changed files with 488 additions and 407 deletions
|
@ -9,11 +9,11 @@ use dom::bindings::cell::DOMRefCell;
|
|||
use dom::bindings::codegen::Bindings::CanvasGradientBinding;
|
||||
use dom::bindings::codegen::Bindings::CanvasGradientBinding::CanvasGradientMethods;
|
||||
use dom::bindings::error::{Error, ErrorResult};
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::num::Finite;
|
||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::globalscope::GlobalScope;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#canvasgradient
|
||||
#[dom_struct]
|
||||
|
@ -38,7 +38,7 @@ impl CanvasGradient {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(global: GlobalRef, style: CanvasGradientStyle) -> Root<CanvasGradient> {
|
||||
pub fn new(global: &GlobalScope, style: CanvasGradientStyle) -> Root<CanvasGradient> {
|
||||
reflect_dom_object(box CanvasGradient::new_inherited(style),
|
||||
global,
|
||||
CanvasGradientBinding::Wrap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue