mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
Use upcast() in XMLDocument methods.
This commit is contained in:
@@ -76,16 +76,16 @@ impl XMLDocument {
|
||||
impl XMLDocumentMethods for XMLDocument {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-document-location
|
||||
fn GetLocation(&self) -> Option<Root<Location>> {
|
||||
self.document.GetLocation()
|
||||
self.upcast::<Document>().GetLocation()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-tree-accessors:supported-property-names
|
||||
fn SupportedPropertyNames(&self) -> Vec<DOMString> {
|
||||
self.document.SupportedPropertyNames()
|
||||
self.upcast::<Document>().SupportedPropertyNames()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-tree-accessors:dom-document-nameditem-filter
|
||||
fn NamedGetter(&self, _cx: *mut JSContext, name: DOMString, found: &mut bool) -> *mut JSObject {
|
||||
self.document.NamedGetter(_cx, name, found)
|
||||
self.upcast::<Document>().NamedGetter(_cx, name, found)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user