Bug 510670: have the nsIWebBrowserPersist used for some drops automatically detect the need for content converters (fixes dropping of images served gzipped on Mac), r=bz
authorGavin Sharp <gavin@gavinsharp.com>
Thu, 15 Dec 2011 11:14:38 -0800
changeset 82688 ee190c4d5bfe388f00e7f40fc7e68344c46fc9c7
parent 82687 e27edbae265e64095c14bd04c64cd508e83043a0
child 82689 403c7bcfb42a36589998fbe898e1ae6e2ed9acdb
push id4062
push usergsharp@mozilla.com
push dateThu, 15 Dec 2011 19:18:58 +0000
treeherdermozilla-inbound@ee190c4d5bfe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs510670
milestone11.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 510670: have the nsIWebBrowserPersist used for some drops automatically detect the need for content converters (fixes dropping of images served gzipped on Mac), r=bz
browser/modules/Makefile.in
browser/modules/NetworkPrioritizer.jsm
browser/modules/WindowsJumpLists.jsm
browser/modules/WindowsPreviewPerTab.jsm
browser/modules/openLocationLastURL.jsm
browser/modules/test/browser_NetworkPrioritizer.js
browser/modules/test/browser_taskbar_preview.js
content/base/src/nsContentAreaDragDrop.cpp
--- a/content/base/src/nsContentAreaDragDrop.cpp
+++ b/content/base/src/nsContentAreaDragDrop.cpp
@@ -210,16 +210,18 @@ nsContentAreaDragDropDataProvider::SaveU
 
   // we rely on the fact that the WPB is refcounted by the channel etc,
   // so we don't keep a ref to it. It will die when finished.
   nsCOMPtr<nsIWebBrowserPersist> persist =
     do_CreateInstance("@mozilla.org/embedding/browser/nsWebBrowserPersist;1",
                       &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
+  persist->SetPersistFlags(nsIWebBrowserPersist::PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION);
+
   return persist->SaveURI(sourceURI, nsnull, nsnull, nsnull, nsnull, inDestFile);
 }
 
 // This is our nsIFlavorDataProvider callback. There are several
 // assumptions here that make this work:
 //
 // 1. Someone put a kFilePromiseURLMime flavor into the transferable
 //    with the source URI of the file to save (as a string). We did