Backed out 2 changesets (bug 1317322) for frequent clipboard test failures a=backout
authorWes Kocher <wkocher@mozilla.com>
Tue, 17 Jan 2017 14:10:53 -0800
changeset 374730 486075111a453bbcf52d7534b0b7c79b5798cff3
parent 374729 56f0b3f7b1259509f93bc907e25c41cc5b8779c7
child 374731 d9a9a05a2602cf29df5066de2baea32f27103754
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1317322
milestone53.0a1
backs out1bc18bb10cc6caad3cde789025e4061e850755e4
79d6e9229fda9ed2076cdb1b675b2662759ee0be
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
Backed out 2 changesets (bug 1317322) for frequent clipboard test failures a=backout Backed out changeset 1bc18bb10cc6 Backed out changeset 79d6e9229fda (bug 1317322) MozReview-Commit-ID: 9SUWpmTLJqG
editor/libeditor/HTMLEditorDataTransfer.cpp
editor/libeditor/TextEditorDataTransfer.cpp
editor/libeditor/tests/chrome.ini
editor/libeditor/tests/mochitest.ini
editor/libeditor/tests/test_pasteImgTextarea.html
editor/libeditor/tests/test_pasteImgTextarea.xul
--- a/editor/libeditor/HTMLEditorDataTransfer.cpp
+++ b/editor/libeditor/HTMLEditorDataTransfer.cpp
@@ -1533,23 +1533,16 @@ static const char* textHtmlEditorFlavors
 
 NS_IMETHODIMP
 HTMLEditor::CanPaste(int32_t aSelectionType,
                      bool* aCanPaste)
 {
   NS_ENSURE_ARG_POINTER(aCanPaste);
   *aCanPaste = false;
 
-  // Always enable the paste command when inside of a HTML or XHTML document.
-  nsCOMPtr<nsIDocument> doc = GetDocument();
-  if (doc && doc->IsHTMLOrXHTML()) {
-    *aCanPaste = true;
-    return NS_OK;
-  }
-
   // can't paste if readonly
   if (!IsModifiable()) {
     return NS_OK;
   }
 
   nsresult rv;
   nsCOMPtr<nsIClipboard> clipboard(do_GetService("@mozilla.org/widget/clipboard;1", &rv));
   NS_ENSURE_SUCCESS(rv, rv);
--- a/editor/libeditor/TextEditorDataTransfer.cpp
+++ b/editor/libeditor/TextEditorDataTransfer.cpp
@@ -377,23 +377,16 @@ TextEditor::PasteTransferable(nsITransfe
 
 NS_IMETHODIMP
 TextEditor::CanPaste(int32_t aSelectionType,
                      bool* aCanPaste)
 {
   NS_ENSURE_ARG_POINTER(aCanPaste);
   *aCanPaste = false;
 
-  // Always enable the paste command when inside of a HTML or XHTML document.
-  nsCOMPtr<nsIDocument> doc = GetDocument();
-  if (doc && doc->IsHTMLOrXHTML()) {
-    *aCanPaste = true;
-    return NS_OK;
-  }
-
   // can't paste if readonly
   if (!IsModifiable()) {
     return NS_OK;
   }
 
   nsresult rv;
   nsCOMPtr<nsIClipboard> clipboard(do_GetService("@mozilla.org/widget/clipboard;1", &rv));
   NS_ENSURE_SUCCESS(rv, rv);
--- a/editor/libeditor/tests/chrome.ini
+++ b/editor/libeditor/tests/chrome.ini
@@ -6,9 +6,8 @@ support-files = green.png
 [test_bug599983.xul]
 [test_bug607584.xul]
 [test_bug616590.xul]
 [test_bug780908.xul]
 [test_contenteditable_text_input_handling.html]
 [test_htmleditor_keyevent_handling.html]
 [test_texteditor_keyevent_handling.html]
 skip-if = (debug && os=='win') || (os == 'linux') # Bug 1116205, leaks on windows debug, fails delete key on linux
-[test_pasteImgTextarea.xul]
--- a/editor/libeditor/tests/mochitest.ini
+++ b/editor/libeditor/tests/mochitest.ini
@@ -234,10 +234,8 @@ skip-if = os == 'android'
 [test_root_element_replacement.html]
 [test_select_all_without_body.html]
 [test_spellcheck_pref.html]
 skip-if = toolkit == 'android'
 [test_backspace_vs.html]
 [test_css_chrome_load_access.html]
 skip-if = toolkit == 'android' # chrome urls not available due to packaging
 [test_selection_move_commands.html]
-[test_pasteImgTextarea.html]
-skip-if = toolkit == 'android' # bug 1299578
deleted file mode 100644
--- a/editor/libeditor/tests/test_pasteImgTextarea.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<script src="/tests/SimpleTest/SimpleTest.js"></script>
-<script src="/tests/SimpleTest/SpawnTask.js"></script>
-<img id="i" src="green.png">
-<textarea id="t"></textarea>
-
-<script>
-let loaded = new Promise(resolve => addLoadEvent(resolve));
-    add_task(function*() {
-        yield loaded;
-        SpecialPowers.setCommandNode(window, document.getElementById("i"));
-        SpecialPowers.doCommand(window, "cmd_copyImageContents");
-        let input = document.getElementById("t");
-        input.focus();
-        var controller =
-          SpecialPowers.wrap(input).controllers.getControllerForCommand("cmd_paste");
-        is(controller.isCommandEnabled("cmd_paste"), true,
-           "paste should be enabled in html textareas when an image is on the clipboard");
-    });
-</script>
deleted file mode 100644
--- a/editor/libeditor/tests/test_pasteImgTextarea.xul
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
-<window xmlns:html="http://www.w3.org/1999/xhtml"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SpawnTask.js"></script>
-
-  <body xmlns="http://www.w3.org/1999/xhtml">
-    <html:img id="i" src="green.png" />
-    <html:textarea id="t"></html:textarea>
-  </body>
-  <script type="text/javascript"><![CDATA[
-    let loaded = new Promise(resolve => addLoadEvent(resolve));
-    add_task(function*() {
-        yield loaded;
-        SpecialPowers.setCommandNode(window, document.getElementById("i"));
-        SpecialPowers.doCommand(window, "cmd_copyImageContents");
-        let input = document.getElementById("t");
-        input.focus();
-        var controller =
-          SpecialPowers.wrap(input).controllers.getControllerForCommand("cmd_paste");
-        is(controller.isCommandEnabled("cmd_paste"), false,
-           "paste should not be enabled in xul textareas when an image is on the clipboard");
-    });
-  ]]></script>
-</window>