mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Clean up the cast calls
This commit is contained in:
parent
13ea3ac413
commit
68014af78e
66 changed files with 412 additions and 718 deletions
|
@ -56,10 +56,9 @@ impl HTMLFieldSetElementMethods for HTMLFieldSetElement {
|
|||
TAG_NAMES.iter().any(|&tag_name| tag_name == &**elem.local_name())
|
||||
}
|
||||
}
|
||||
let node = self.upcast::<Node>();
|
||||
let filter = box ElementsFilter;
|
||||
let window = window_from_node(node);
|
||||
HTMLCollection::create(window.r(), node, filter)
|
||||
let window = window_from_node(self);
|
||||
HTMLCollection::create(window.r(), self.upcast(), filter)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-cva-validity
|
||||
|
@ -82,8 +81,7 @@ impl HTMLFieldSetElementMethods for HTMLFieldSetElement {
|
|||
|
||||
impl VirtualMethods for HTMLFieldSetElement {
|
||||
fn super_type(&self) -> Option<&VirtualMethods> {
|
||||
let htmlelement: &HTMLElement = self.upcast::<HTMLElement>();
|
||||
Some(htmlelement as &VirtualMethods)
|
||||
Some(self.upcast::<HTMLElement>() as &VirtualMethods)
|
||||
}
|
||||
|
||||
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue