mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +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 {
|
impl HTMLLegendElementMethods for HTMLLegendElement {
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-legend-form
|
// https://html.spec.whatwg.org/multipage/#dom-legend-form
|
||||||
fn GetForm(&self) -> Option<DomRoot<HTMLFormElement>> {
|
fn GetForm(&self) -> Option<DomRoot<HTMLFormElement>> {
|
||||||
let parent = match self.upcast::<Node>().GetParentElement() {
|
let parent = self.upcast::<Node>().GetParentElement()?;
|
||||||
Some(parent) => parent,
|
|
||||||
None => return None,
|
|
||||||
};
|
|
||||||
if parent.is::<HTMLFieldSetElement>() {
|
if parent.is::<HTMLFieldSetElement>() {
|
||||||
return self.form_owner();
|
return self.form_owner();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue