Bug 1253534 - Suspicious code with probably reversed parms in call to IsSingleLineTextControl, r=mounir
authorMark Capella <markcapella@twcny.rr.com>
Sat, 05 Mar 2016 22:04:41 -0500
changeset 323310 54abddb1c44c6224ba7e6810b9b11b5d24d9bffc
parent 323278 46210f3ae07855edfe1383210d78433e38a6b564
child 323317 b6acf4d4fc20431a8ae14bf32cdc6e43a9c0f9ad
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmounir
bugs1253534
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1253534 - Suspicious code with probably reversed parms in call to IsSingleLineTextControl, r=mounir
dom/html/HTMLInputElement.cpp
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -4352,18 +4352,18 @@ HTMLInputElement::HandleTypeChange(uint8
 
   // Updating mFocusedValue in consequence:
   // If the new type fires a change event on blur, but the previous type
   // doesn't, we should set mFocusedValue to the current value.
   // Otherwise, if the new type doesn't fire a change event on blur, but the
   // previous type does, we should clear out mFocusedValue.
   if (MayFireChangeOnBlur(mType) && !MayFireChangeOnBlur(oldType)) {
     GetValue(mFocusedValue);
-  } else if (!IsSingleLineTextControl(mType, false) &&
-             IsSingleLineTextControl(oldType, false)) {
+  } else if (!IsSingleLineTextControl(false, mType) &&
+             IsSingleLineTextControl(false, oldType)) {
     mFocusedValue.Truncate();
   }
 
   UpdateHasRange();
 
   // Do not notify, it will be done after if needed.
   UpdateAllValidityStates(false);
 }