Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for <input type=datetime> #19509

Merged
merged 1 commit into from Dec 7, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -15,7 +15,6 @@ color
controllerchange
cursive
date
datetime
datetime-local
dir
email
@@ -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
@@ -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

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.