Skip to content

Commit

Permalink
Remove support for <input type=datetime>
Browse files Browse the repository at this point in the history
It has been removed from the spec: whatwg/html#336

See also #19471 (review)
  • Loading branch information
jonleighton committed Dec 7, 2017
1 parent e646471 commit 5ff4dc0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
1 change: 0 additions & 1 deletion components/atoms/static_atoms.txt
Expand Up @@ -15,7 +15,6 @@ color
controllerchange
cursive
date
datetime
datetime-local
dir
email
Expand Down
27 changes: 12 additions & 15 deletions components/script/dom/htmlinputelement.rs
Expand Up @@ -68,7 +68,6 @@ pub enum InputType {
Checkbox,
Color,
Date,
Datetime,
DatetimeLocal,
Email,
File,
Expand All @@ -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
}

Expand All @@ -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",
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions tests/wpt/metadata/html/semantics/forms/historical.html.ini
@@ -1,8 +1,5 @@
[historical.html]
type: testharness
[<input type=datetime> should not be supported]
expected: FAIL

[<input name=isindex> should not be supported]
expected: FAIL

0 comments on commit 5ff4dc0

Please sign in to comment.