diff options
Diffstat (limited to 'components/script/dom/htmltextareaelement.rs')
-rwxr-xr-x | components/script/dom/htmltextareaelement.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs index 9fd316e3a18..0cc174cc3c1 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,14 @@ impl HTMLTextAreaElement { ) } + pub fn directionality(&self, element_direction: &str) -> String { + if element_direction == "auto" { + let value: String = self.Value().to_string(); + return HTMLInputElement::auto_directionality(&value); + } + return "ltr".to_owned(); + } + fn update_placeholder_shown_state(&self) { let has_placeholder = !self.placeholder.borrow().is_empty(); let has_value = !self.textinput.borrow().is_empty(); |