Bug 1294784: remove special case for 'number' type from HTMLInputElement::SetType; r?smaug
MozReview-Commit-ID: DHW9RfOoHhC
--- a/dom/html/HTMLInputElement.h
+++ b/dom/html/HTMLInputElement.h
@@ -622,23 +622,16 @@ public:
{
SetHTMLAttr(nsGkAtoms::step, aValue, aRv);
}
// XPCOM GetType() is OK
void SetType(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::type, aValue, aRv);
- if (aValue.EqualsLiteral("number")) {
- // For NS_FORM_INPUT_NUMBER we rely on having frames to process key
- // events. Make sure we have them in case someone changes the type of
- // this element to "number" and then expects to be able to send key
- // events to it (type changes are rare, so not a big perf issue):
- FlushFrames();
- }
}
// XPCOM GetDefaultValue() is OK
void SetDefaultValue(const nsAString& aValue, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::value, aValue, aRv);
}