aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlelement.rs
diff options
context:
space:
mode:
authorDmitry Kolupaev <dmitry.klpv@gmail.com>2020-02-18 18:23:40 +0300
committerDmitry Kolupaev <dmitry.klpv@gmail.com>2020-02-25 01:18:21 +0300
commit61881160907bbca4c23ffa24b2e3872d53ccb382 (patch)
treed88693063c7ad75d4fdd5c03d7e127654eae5ef0 /components/script/dom/htmlelement.rs
parent35d340daba8e8d695f081d98d2126e7d66800c0d (diff)
downloadservo-61881160907bbca4c23ffa24b2e3872d53ccb382.tar.gz
servo-61881160907bbca4c23ffa24b2e3872d53ccb382.zip
Add special case directionality of phone input
Diffstat (limited to 'components/script/dom/htmlelement.rs')
-rw-r--r--components/script/dom/htmlelement.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs
index 9384fba1472..3bf4307b826 100644
--- a/components/script/dom/htmlelement.rs
+++ b/components/script/dom/htmlelement.rs
@@ -787,6 +787,12 @@ impl HTMLElement {
return Some("rtl".to_owned());
}
+ if let Some(input) = self.downcast::<HTMLInputElement>() {
+ if input.input_type() == InputType::Tel {
+ return Some("ltr".to_owned());
+ }
+ }
+
if element_direction == "auto" {
if let Some(directionality) = self
.downcast::<HTMLInputElement>()