diff options
author | Dmitry Kolupaev <dmitry.klpv@gmail.com> | 2020-01-30 23:06:22 +0300 |
---|---|---|
committer | Dmitry Kolupaev <dmitry.klpv@gmail.com> | 2020-02-25 01:18:20 +0300 |
commit | cb34e5c887965de1e85d14d09bc14183c1724aed (patch) | |
tree | d20e0f875be15860d0dee9ed8aa7d3d4608405c9 /components/script/dom/htmlinputelement.rs | |
parent | ef49f2e0eb28f3eb6445eff3aa095edc4b8a64d8 (diff) | |
download | servo-cb34e5c887965de1e85d14d09bc14183c1724aed.tar.gz servo-cb34e5c887965de1e85d14d09bc14183c1724aed.zip |
Move dirname collection to input
Diffstat (limited to 'components/script/dom/htmlinputelement.rs')
-rwxr-xr-x | components/script/dom/htmlinputelement.rs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index 298af937a32..7141f9a4537 100755 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -1473,11 +1473,25 @@ impl HTMLInputElement { } // Step 5.12 - vec![FormDatum { + let mut result = vec![FormDatum { ty: ty.clone(), name: name, value: FormDatumValue::String(self.Value()), - }] + }]; + + // 4.10.18.2 + // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#submitting-element-directionality:-the-dirname-attribute + let dirname: DOMString = self.DirName(); + let directionality = DOMString::from(self.directionality("auto")); + if !dirname.is_empty() { + result.push(FormDatum { + ty: ty.clone(), + name: dirname.clone(), + value: FormDatumValue::String(directionality), + }); + } + + result } // https://html.spec.whatwg.org/multipage/#radio-button-group |