Backout changeset b8d354d37128 (bug 574005) for Linux M3 orange; a=bbondy
authorEd Morley <bmo@edmorley.co.uk>
Tue, 13 Sep 2011 00:49:59 +0100
changeset 76902 90a54cb7f985ea9613444d4cc2403e0171e76d09
parent 76901 b8d354d37128bdbbd7e3f781c914dd45b0e71a3d
child 76903 1a84481f69875da535508041e90041f06bd2deae
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersbbondy
bugs574005
milestone9.0a1
backs outb8d354d37128bdbbd7e3f781c914dd45b0e71a3d
Backout changeset b8d354d37128 (bug 574005) for Linux M3 orange; a=bbondy
editor/libeditor/html/tests/test_CF_HTML_clipboard.html
widget/src/xpwidgets/nsPrimitiveHelpers.cpp
--- a/editor/libeditor/html/tests/test_CF_HTML_clipboard.html
+++ b/editor/libeditor/html/tests/test_CF_HTML_clipboard.html
@@ -131,14 +131,21 @@ function runTest() {
         }, false);
         win.focus();
       }, 0);
     }, false);
     iframe.src = "data:text/html,";
   }, SimpleTest.finish);
 }
 
-SimpleTest.waitForFocus(runTest);
+var isMac = ("nsILocalFileMac" in Components.interfaces);
+if (isMac)
+  SimpleTest.waitForFocus(runTest);
+else {
+  // This test is not yet supported on non-Mac platforms, see bug 574005.
+  todo(false, "Test not supported on this platform");
+  SimpleTest.finish();
+}
 
 </script>
 </pre>
 </body>
 </html>
--- a/widget/src/xpwidgets/nsPrimitiveHelpers.cpp
+++ b/widget/src/xpwidgets/nsPrimitiveHelpers.cpp
@@ -138,25 +138,16 @@ nsPrimitiveHelpers :: CreateDataFromPrim
 
   if ( strcmp(aFlavor,kTextMime) == 0 ) {
     nsCOMPtr<nsISupportsCString> plainText ( do_QueryInterface(aPrimitive) );
     if ( plainText ) {
       nsCAutoString data;
       plainText->GetData ( data );
       *aDataBuff = ToNewCString(data);
     }
-  // CF_HTML only supports single byte.
-  // Reference: http://msdn.microsoft.com/en-us/library/aa767917(v=vs.85).aspx
-  } else if ( strcmp(aFlavor,kNativeHTMLMime) == 0 ) {
-    nsCOMPtr<nsISupportsCString> plainText ( do_QueryInterface(aPrimitive) );
-    if ( plainText ) {
-      nsCAutoString data;
-      plainText->GetData ( data );
-      *aDataBuff = ToNewUnicode(data);
-    }
   }
   else {
     nsCOMPtr<nsISupportsString> doubleByteText ( do_QueryInterface(aPrimitive) );
     if ( doubleByteText ) {
       nsAutoString data;
       doubleByteText->GetData ( data );
       *aDataBuff = ToNewUnicode(data);
     }