aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltextareaelement.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2020-02-24 21:18:10 -0500
committerGitHub <noreply@github.com>2020-02-24 21:18:10 -0500
commit145c89a2d49b7a0c2842e99dff65da4d8164bf7d (patch)
tree77953fcbca71db4cec36c60594796df871d93239 /components/script/dom/htmltextareaelement.rs
parente3a5f36fb21d8a93c248016bdd59b8878713a8a3 (diff)
parent50b495684ed37042fbc0b895f1e6d0a732b9d378 (diff)
downloadservo-145c89a2d49b7a0c2842e99dff65da4d8164bf7d.tar.gz
servo-145c89a2d49b7a0c2842e99dff65da4d8164bf7d.zip
Auto merge of #25499 - NeverHappened:implement-form-dirname, r=jdm
Implement dirname support for form element Added support for dirname in input on form submit Added Dir getter / setter for HTMLElement NOT YET Added get directionality according to https://html.spec.whatwg.org/multipage/dom.html#the-directionality - [X] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25379 (GitHub issue number if applicable)
Diffstat (limited to 'components/script/dom/htmltextareaelement.rs')
-rwxr-xr-xcomponents/script/dom/htmltextareaelement.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs
index 9fd316e3a18..d077d9eec8f 100755
--- a/components/script/dom/htmltextareaelement.rs
+++ b/components/script/dom/htmltextareaelement.rs
@@ -22,6 +22,7 @@ use crate::dom::globalscope::GlobalScope;
use crate::dom::htmlelement::HTMLElement;
use crate::dom::htmlfieldsetelement::HTMLFieldSetElement;
use crate::dom::htmlformelement::{FormControl, HTMLFormElement};
+use crate::dom::htmlinputelement::HTMLInputElement;
use crate::dom::keyboardevent::KeyboardEvent;
use crate::dom::node::{document_from_node, window_from_node};
use crate::dom::node::{
@@ -173,6 +174,11 @@ impl HTMLTextAreaElement {
)
}
+ pub fn auto_directionality(&self) -> String {
+ let value: String = self.Value().to_string();
+ return HTMLInputElement::directionality_from_value(&value);
+ }
+
fn update_placeholder_shown_state(&self) {
let has_placeholder = !self.placeholder.borrow().is_empty();
let has_value = !self.textinput.borrow().is_empty();
@@ -205,6 +211,12 @@ impl HTMLTextAreaElementMethods for HTMLTextAreaElement {
// https://html.spec.whatwg.org/multipage/#dom-textarea-cols
make_limited_uint_setter!(SetCols, "cols", DEFAULT_COLS);
+ // https://html.spec.whatwg.org/multipage/#dom-input-dirName
+ make_getter!(DirName, "dirname");
+
+ // https://html.spec.whatwg.org/multipage/#dom-input-dirName
+ make_setter!(SetDirName, "dirname");
+
// https://html.spec.whatwg.org/multipage/#dom-fe-disabled
make_bool_getter!(Disabled, "disabled");