mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Pass a &GlobalScope to WebIDL static methods and constructors
This commit is contained in:
parent
1fd470889d
commit
19108aa330
56 changed files with 198 additions and 245 deletions
|
@ -4,9 +4,9 @@
|
|||
|
||||
use cssparser::serialize_identifier;
|
||||
use dom::bindings::error::Fallible;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::reflector::Reflector;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::globalscope::GlobalScope;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct CSS {
|
||||
|
@ -15,7 +15,7 @@ pub struct CSS {
|
|||
|
||||
impl CSS {
|
||||
// http://dev.w3.org/csswg/cssom/#serialize-an-identifier
|
||||
pub fn Escape(_: GlobalRef, ident: DOMString) -> Fallible<DOMString> {
|
||||
pub fn Escape(_: &GlobalScope, ident: DOMString) -> Fallible<DOMString> {
|
||||
let mut escaped = String::new();
|
||||
serialize_identifier(&ident, &mut escaped).unwrap();
|
||||
Ok(DOMString::from(escaped))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue