From 5ff4dc078a5ef19be5fee328caee8d943757d282 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Thu, 7 Dec 2017 12:56:23 +0100 Subject: [PATCH] Remove support for It has been removed from the spec: https://github.com/whatwg/html/issues/336 See also https://github.com/servo/servo/pull/19471#pullrequestreview-80711878 --- components/atoms/static_atoms.txt | 1 - components/script/dom/htmlinputelement.rs | 27 +++++++++---------- .../html/semantics/forms/historical.html.ini | 3 --- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/components/atoms/static_atoms.txt b/components/atoms/static_atoms.txt index db8f234faabb..2c27a091c88c 100644 --- a/components/atoms/static_atoms.txt +++ b/components/atoms/static_atoms.txt @@ -15,7 +15,6 @@ color controllerchange cursive date -datetime datetime-local dir email diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index d748919914e8..047e1b6d40f0 100755 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -68,7 +68,6 @@ pub enum InputType { Checkbox, Color, Date, - Datetime, DatetimeLocal, Email, File, @@ -95,11 +94,11 @@ impl InputType { // than the underlying value. fn is_textual(&self) -> bool { match *self { - InputType::Color | InputType::Date | InputType::Datetime - | InputType::DatetimeLocal | InputType::Email | InputType::Hidden - | InputType::Month | InputType::Number | InputType::Range - | InputType::Search | InputType::Tel | InputType::Text - | InputType::Time | InputType::Url | InputType::Week => { + InputType::Color | InputType::Date | InputType::DatetimeLocal + | InputType::Email | InputType::Hidden | InputType::Month + | InputType::Number | InputType::Range | InputType::Search + | InputType::Tel | InputType::Text | InputType::Time + | InputType::Url | InputType::Week => { true } @@ -117,7 +116,6 @@ impl InputType { InputType::Checkbox => "checkbox", InputType::Color => "color", InputType::Date => "date", - InputType::Datetime => "datetime", InputType::DatetimeLocal => "datetime-local", InputType::Email => "email", InputType::File => "file", @@ -147,7 +145,6 @@ impl<'a> From<&'a Atom> for InputType { atom!("checkbox") => InputType::Checkbox, atom!("color") => InputType::Color, atom!("date") => InputType::Date, - atom!("datetime") => InputType::Datetime, atom!("datetime-local") => InputType::DatetimeLocal, atom!("email") => InputType::Email, atom!("file") => InputType::File, @@ -286,11 +283,11 @@ impl HTMLInputElement { ValueMode::DefaultOn }, - InputType::Color | InputType::Date | InputType::Datetime - | InputType::DatetimeLocal | InputType::Email | InputType::Month - | InputType::Number | InputType::Password | InputType::Range - | InputType::Search | InputType::Tel | InputType::Text - | InputType::Time | InputType::Url | InputType::Week => { + InputType::Color | InputType::Date | InputType::DatetimeLocal + | InputType::Email | InputType::Month | InputType::Number + | InputType::Password | InputType::Range | InputType::Search + | InputType::Tel | InputType::Text | InputType::Time + | InputType::Url | InputType::Week => { ValueMode::Value } @@ -1532,8 +1529,8 @@ impl Activatable for HTMLInputElement { .filter(|input| { input.form_owner() == owner && match input.input_type() { InputType::Text | InputType::Search | InputType::Url | InputType::Tel - | InputType::Email | InputType::Password | InputType::Datetime - | InputType::Date | InputType::Month | InputType::Week | InputType::Time + | InputType::Email | InputType::Password | InputType::Date + | InputType::Month | InputType::Week | InputType::Time | InputType::DatetimeLocal | InputType::Number => true, _ => false diff --git a/tests/wpt/metadata/html/semantics/forms/historical.html.ini b/tests/wpt/metadata/html/semantics/forms/historical.html.ini index 935a07dde62e..b955d90e0f66 100644 --- a/tests/wpt/metadata/html/semantics/forms/historical.html.ini +++ b/tests/wpt/metadata/html/semantics/forms/historical.html.ini @@ -1,8 +1,5 @@ [historical.html] type: testharness - [ should not be supported] - expected: FAIL - [ should not be supported] expected: FAIL