backout a268f8037bb0
authorJonathan Watt <jwatt@jwatt.org>
Mon, 14 Oct 2013 08:48:39 +0100
changeset 164473 f510f2d945c30ed4250c481f6e8ae7c9590b3ae6
parent 164472 a268f8037bb0c92dc42b607a017fc73dfa211615
child 164474 3620f49eb6e9b5367ee682d24832d87b80cb01df
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone27.0a1
backs outa268f8037bb0c92dc42b607a017fc73dfa211615
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
backout a268f8037bb0
content/html/content/src/HTMLInputElement.cpp
content/html/content/src/HTMLInputElement.h
--- a/content/html/content/src/HTMLInputElement.cpp
+++ b/content/html/content/src/HTMLInputElement.cpp
@@ -613,20 +613,16 @@ NS_IMETHODIMP
 HTMLInputElement::nsFilePickerShownCallback::Done(int16_t aResult)
 {
   if (aResult == nsIFilePicker::returnCancel) {
     return NS_OK;
   }
 
   mInput->CancelDirectoryPickerScanIfRunning();
 
-  // Clear HTMLInputElement.files early to avoid authors thinking the old list
-  // is the result of the directory picker operation before its completed.
-  mInput->ClearFiles();
-
   int16_t mode;
   mFilePicker->GetMode(&mode);
 
   if (mode == static_cast<int16_t>(nsIFilePicker::modeGetFolder)) {
     // Directory picking is different, since we still need to do more I/O to
     // build up the list of nsDOMFileFile objects. Since this may block for a
     // long time, we need to build the list off on another dedicated thread to
     // avoid blocking any other activities that the browser is carrying out.
@@ -2454,22 +2450,16 @@ HTMLInputElement::SetFiles(nsIDOMFileLis
       mFiles.AppendElement(file);
     }
   }
 
   AfterSetFiles(aSetValueChanged);
 }
 
 void
-HTMLInputElement::ClearFiles()
-{
-  mFiles.Clear();
-}
-
-void
 HTMLInputElement::AfterSetFiles(bool aSetValueChanged)
 {
   // No need to flush here, if there's no frame at this point we
   // don't need to force creation of one just to tell it about this
   // new value.  We just want the display to update as needed.
   nsIFormControlFrame* formControlFrame = GetFormControlFrame(false);
   if (formControlFrame) {
     nsAutoString readableValue;
--- a/content/html/content/src/HTMLInputElement.h
+++ b/content/html/content/src/HTMLInputElement.h
@@ -196,17 +196,16 @@ public:
 
   const nsTArray<nsCOMPtr<nsIDOMFile> >& GetFilesInternal() const
   {
     return mFiles;
   }
 
   void SetFiles(const nsTArray<nsCOMPtr<nsIDOMFile> >& aFiles, bool aSetValueChanged);
   void SetFiles(nsIDOMFileList* aFiles, bool aSetValueChanged);
-  void ClearFiles();
 
   void SetCheckedChangedInternal(bool aCheckedChanged);
   bool GetCheckedChanged() const {
     return mCheckedChanged;
   }
   void AddedToRadioGroup();
   void WillRemoveFromRadioGroup();