mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
script: Use ? on option more often.
This commit is contained in:
parent
dbf0183b0f
commit
339d633906
1 changed files with 1 additions and 4 deletions
|
@ -75,10 +75,7 @@ impl VirtualMethods for HTMLLegendElement {
|
|||
impl HTMLLegendElementMethods for HTMLLegendElement {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-legend-form
|
||||
fn GetForm(&self) -> Option<DomRoot<HTMLFormElement>> {
|
||||
let parent = match self.upcast::<Node>().GetParentElement() {
|
||||
Some(parent) => parent,
|
||||
None => return None,
|
||||
};
|
||||
let parent = self.upcast::<Node>().GetParentElement()?;
|
||||
if parent.is::<HTMLFieldSetElement>() {
|
||||
return self.form_owner();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue