diff options
author | Dongie Agnir <dongie.agnir@gmail.com> | 2015-10-27 11:52:55 -1000 |
---|---|---|
committer | Dongie Agnir <dongie.agnir@gmail.com> | 2015-10-27 11:52:55 -1000 |
commit | 92e008307fe810ff9762d98b261e88f2040d1d5c (patch) | |
tree | 6635ea6f4a00dfd33e98767663102af2f708abb5 /components/script/dom/htmloptionelement.rs | |
parent | 15a8b6b62c6129711d37f02c4577f7448f679998 (diff) | |
download | servo-92e008307fe810ff9762d98b261e88f2040d1d5c.tar.gz servo-92e008307fe810ff9762d98b261e88f2040d1d5c.zip |
Add fixes based on review.
- Whitespace and indentation issues
- call as_for_reset on option insert
- add link to 'pick' in standard
Diffstat (limited to 'components/script/dom/htmloptionelement.rs')
-rw-r--r-- | components/script/dom/htmloptionelement.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/components/script/dom/htmloptionelement.rs b/components/script/dom/htmloptionelement.rs index 066a264b653..64defdd9235 100644 --- a/components/script/dom/htmloptionelement.rs +++ b/components/script/dom/htmloptionelement.rs @@ -140,11 +140,11 @@ impl HTMLOptionElementMethods for HTMLOptionElement { self.dirtiness.set(true); self.selectedness.set(selected); if let Some(select) = self.upcast::<Node>().ancestors() - .filter_map(Root::downcast::<HTMLSelectElement>).next() { - if selected { - select.pick_option(self); - } - select.ask_for_reset(); + .filter_map(Root::downcast::<HTMLSelectElement>).next() { + if selected { + select.pick_option(self); + } + select.ask_for_reset(); } } } @@ -198,13 +198,13 @@ impl VirtualMethods for HTMLOptionElement { self.upcast::<Element>().check_parent_disabled_state_for_option(); - if self.Selected() { - let node = self.upcast::<Node>(); - if let Some(select) = node.ancestors() - .filter_map(Root::downcast::<HTMLSelectElement>) - .next() { + if let Some(select) = self.upcast::<Node>().ancestors() + .filter_map(Root::downcast::<HTMLSelectElement>) + .next() { + if self.Selected() { select.pick_option(self); } + select.ask_for_reset(); } } |