

Choosing the best video to GIF converter: Our reviews….What’s the difference between a video and an animated GIF?.The exception is |rv|, which you can declare at the top of the function if you prefer +569,5 + nsCOMPtr mimeService =ĭon't put the whole body of this function inside an |if| block. Nit: don't declare variables at the top of functions. Nit: |nsITransferable* aTransferable| and |imgIRequest* aImgRequest|, per Mozilla style.Īlso, why don't you just define this up here? It's better to avoid forward declarations where +558,5 return AppendString(aTransferable, context, kHTMLContext) > +static nsresult AppendImagePromise(nsITransferable *aTransferable, > +// copy image as file promise onto the transferable Nit: please alphabetize these new +80,5 nsINode* aDOMNode)
#DROP TO GIF REVIEW PATCH#
Only looking at AppendImagePromise(), because most of this patch is touching stuff that I have no familiarity with. If you really can not query a requestingNode, then you would have to add some special do to the 'transferable' that accounts specificially for your case and pass the requestingPrincipal in that case. JFYI: we are working on moving security checks within nsDataObj.cpp over in Bug 1192945. Using the systemPrincipal would cause all security checks to be bypassed for all of the drag and drop operations which is obviously not that great. I am not the expert for drag and drop operations, but is there no possibility to pass the node? Maybe you should consult with jmathies. Please *do not* remove the bits for the requestingNode to be passed to NS_NewChannel(). Hey Hector, unfortunately we can't accept that change. > necessary to use the loadingDocument, I just removed the check for this > but saved as a local file with drag/drop or copy/paste, it's not really > the file data loaded from internet/cache will not be used in any document > comments of NS_NewChannel, I think in the case of nsITransferable, where The requestingNode part was introduced in bug 1038756. > requestingNode of the nsITransferable, but still failed the assertion at > * I tried to set the |aImageElement| QI-ed into nsIDOMNode as the (In reply to Hector Zhao from comment #16) > + mimeInfo->GetPrimaryExtension(primaryExtension) > + mimeService->GetFromTypeAndExtension(mimeType, Empt圜String(), > + aImgRequest->GetMimeType(getter_Copies(mimeType)) This can +580,5 + nsAutoCString extension This can +577,5 + nsCOMPtr imgUrl(do_QueryInterface(imgUri)) > + aImgRequest->GetCurrentURI(getter_AddRefs(imgUri)) > + // Fix the file extension in the URL if necessary
#DROP TO GIF REVIEW HOW TO#
* Also I'm not sure how to organize the additional |#include|Ĭomment on attachment 8646721 Would it be proper if I move the common parts into nsContentUtils? * The logic to generate imageSourceString & imageDestFileName was copied from, and adding kFilePromiseMime flavor without setting a nsIFlavorDataProvider will not work on OSX. After reading comments of NS_NewChannel, I think in the case of nsITransferable, where the file data loaded from internet/cache will not be used in any document but saved as a local file with drag/drop or copy/paste, it's not really necessary to use the loadingDocument, I just removed the check for this patch. * I tried to set the |aImageElement| QI-ed into nsIDOMNode as the requestingNode of the nsITransferable, but still failed the assertion at. Splinter Review With this patch, I can copy an animated gif into Tencent QQ on Windows. IE has rich text, file and bitmap, which is convenient in many scenario Though the rich text format is quite different.

IE outplay others on this, unless you still think Fx mechanism is better. Tested Chrome and Opera, the same as Fx, no wonder you think OS clipboards don't support animations. When you copy selecte something in a web page contain font color, size and link, there are two different kinds of text: plain text and with style, and that is true both in Fx and IE.įor example, copy the above comment 5, we got plain 21:39:20 PDT A friend of a forum make a more sophisticated test, using a simple c# application.
