Bug 842361 - nsIClipboard's clearClipboard doesn't clear the clipboard on Windows. r=bbondy

This commit is contained in:
Jim Mathies 2013-02-19 19:51:02 -06:00
parent 5f4e3d6b40
commit dfc41199ba
2 changed files with 10 additions and 0 deletions

View File

@ -924,6 +924,15 @@ nsClipboard::GetNativeClipboardData ( nsITransferable * aTransferable, int32_t a
}
NS_IMETHODIMP
nsClipboard::EmptyClipboard(int32_t aWhichClipboard)
{
if (::OpenClipboard(nullptr)) {
::EmptyClipboard();
::CloseClipboard();
}
return nsBaseClipboard::EmptyClipboard(aWhichClipboard);
}
//-------------------------------------------------------------------------
NS_IMETHODIMP nsClipboard::HasDataMatchingFlavors(const char** aFlavorList,

View File

@ -30,6 +30,7 @@ public:
// nsIClipboard
NS_IMETHOD HasDataMatchingFlavors(const char** aFlavorList, uint32_t aLength,
int32_t aWhichClipboard, bool *_retval);
NS_IMETHOD EmptyClipboard(int32_t aWhichClipboard);
// Internal Native Routines
static nsresult CreateNativeDataObject(nsITransferable * aTransferable,