Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(965)

Unified Diff: Source/core/html/HTMLInputElement.cpp

Issue 141703028: Remove input.type = ""; quirk. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move tests to fast/dom/input-type-change3 Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/forms/input-type-change3-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index ff56d520c00cb7d6095a2a82f1bea9a63858cba1..5c403268faaa8c7aa3a625d431a155a3f6b5978d 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -395,14 +395,7 @@ void HTMLInputElement::handleBlurEvent()
void HTMLInputElement::setType(const AtomicString& type)
{
- // FIXME: This should just call setAttribute. No reason to handle the empty string specially.
- // We should write a test case to show that setting to the empty string does not remove the
- // attribute in other browsers and then fix this. Note that setting to null *does* remove
- // the attribute and setAttribute implements that.
- if (type.isEmpty())
- removeAttribute(typeAttr);
- else
- setAttribute(typeAttr, type);
+ setAttribute(typeAttr, type);
}
void HTMLInputElement::updateType()
« no previous file with comments | « LayoutTests/fast/forms/input-type-change3-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698