diff options
author | Patrick Shaughnessy <pshaughn@comcast.net> | 2020-01-02 15:44:29 -0500 |
---|---|---|
committer | Patrick Shaughnessy <pshaughn@comcast.net> | 2020-01-06 10:39:36 -0500 |
commit | 036e8dabe2d38e21348766d1a5cda99381b015f8 (patch) | |
tree | 004e033196a208628e84767bd86b5e5c83425932 /components/script/dom/htmloutputelement.rs | |
parent | 0d142bea9ae9b822c0d03d23b00dae23126a92c8 (diff) | |
download | servo-036e8dabe2d38e21348766d1a5cda99381b015f8.tar.gz servo-036e8dabe2d38e21348766d1a5cda99381b015f8.zip |
Labels are a live list in tree order
Diffstat (limited to 'components/script/dom/htmloutputelement.rs')
-rw-r--r-- | components/script/dom/htmloutputelement.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/htmloutputelement.rs b/components/script/dom/htmloutputelement.rs index 65b9ae554c8..9314672d3d0 100644 --- a/components/script/dom/htmloutputelement.rs +++ b/components/script/dom/htmloutputelement.rs @@ -22,6 +22,7 @@ use html5ever::{LocalName, Prefix}; pub struct HTMLOutputElement { htmlelement: HTMLElement, form_owner: MutNullableDom<HTMLFormElement>, + labels_node_list: MutNullableDom<NodeList>, } impl HTMLOutputElement { @@ -33,6 +34,7 @@ impl HTMLOutputElement { HTMLOutputElement { htmlelement: HTMLElement::new_inherited(local_name, prefix, document), form_owner: Default::default(), + labels_node_list: Default::default(), } } @@ -65,9 +67,7 @@ impl HTMLOutputElementMethods for HTMLOutputElement { } // https://html.spec.whatwg.org/multipage/#dom-lfe-labels - fn Labels(&self) -> DomRoot<NodeList> { - self.upcast::<HTMLElement>().labels() - } + make_labels_getter!(Labels, labels_node_list); } impl VirtualMethods for HTMLOutputElement { |