Bug 259636. Don't do sync reflow when setting .value on text inputs. r=roc, sr=dbaron
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 11 Nov 2009 18:28:16 -0500
changeset 34784 678e3c57654a66ddca27708a8d4e34bd9d96e16b
parent 34783 171e825463a54d384e966d586b34134c38b8be77
child 34785 09df1b07d7f1a9e563903742fa27902ce338d3dc
push id10250
push userbzbarsky@mozilla.com
push dateWed, 11 Nov 2009 23:28:45 +0000
treeherdermozilla-central@09df1b07d7f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, dbaron
bugs259636
milestone1.9.3a1pre
Bug 259636. Don't do sync reflow when setting .value on text inputs. r=roc, sr=dbaron
layout/forms/nsTextControlFrame.cpp
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -2675,16 +2675,17 @@ nsTextControlFrame::SetValue(const nsASt
 
         // get the flags, remove readonly and disabled, set the value,
         // restore flags
         PRUint32 flags, savedFlags;
         editor->GetFlags(&savedFlags);
         flags = savedFlags;
         flags &= ~(nsIPlaintextEditor::eEditorDisabledMask);
         flags &= ~(nsIPlaintextEditor::eEditorReadonlyMask);
+        flags |= nsIPlaintextEditor::eEditorUseAsyncUpdatesMask;
         editor->SetFlags(flags);
 
         // Also don't enforce max-length here
         PRInt32 savedMaxLength;
         plaintextEditor->GetMaxTextLength(&savedMaxLength);
         plaintextEditor->SetMaxTextLength(-1);
 
         if (currentValue.Length() < 1)