Backout bug 1132768 in order to fix the regression in bug 1181130. a=lmandel
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 07 Jul 2015 14:55:00 -0400
changeset 275282 a48f2e50c10d0472059a8e01f6d3a282b7d9c4b3
parent 275281 b555ebf842b76be4da5244e1350cd3a21655cbda
child 275283 c06de6062d0e6b8674a5d56673659a317cb6319d
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslmandel
bugs1132768, 1181130
milestone40.0
Backout bug 1132768 in order to fix the regression in bug 1181130. a=lmandel
layout/base/tests/bug1132768-1-ref.html
layout/base/tests/bug1132768-1.html
layout/base/tests/mochitest.ini
layout/base/tests/test_reftests_with_caret.html
layout/style/contenteditable.css
deleted file mode 100644
--- a/layout/base/tests/bug1132768-1-ref.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <script>
-    function test() {
-      focus();
-      getSelection().selectAllChildren(document.querySelector("span"));
-    }
-  </script>
-  <body onload="test()">
-    <div>foo<span>bar</span>baz</div>
-  </body>
-</html>
deleted file mode 100644
--- a/layout/base/tests/bug1132768-1.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html class="reftest-wait">
-  <script src="/tests/SimpleTest/EventUtils.js"></script>
-  <script>
-    function test() {
-      focus();
-      synthesizeMouseAtCenter(document.querySelector("span"), {});
-    }
-    function focused() {
-      document.documentElement.removeAttribute("class");
-    }
-  </script>
-  <body onload="setTimeout(test, 0)">
-    <div contenteditable spellcheck="false" onfocus="focused()"
-         style="outline: none">foo<span contenteditable=false>bar</span>baz</div>
-  </body>
-</html>
--- a/layout/base/tests/mochitest.ini
+++ b/layout/base/tests/mochitest.ini
@@ -28,18 +28,16 @@ support-files =
   bug1109968-1-ref.html
   bug1109968-1.html
   bug1109968-2-ref.html
   bug1109968-2.html
   bug1123067-1.html
   bug1123067-2.html
   bug1123067-3.html
   bug1123067-ref.html
-  bug1132768-1.html
-  bug1132768-1-ref.html
   selection-utils.js
   multi-range-user-select.html
   multi-range-user-select-ref.html
   multi-range-script-select.html
   multi-range-script-select-ref.html
 
 [test_preserve3d_sorting_hit_testing.html]
 [test_after_paint_pref.html]
--- a/layout/base/tests/test_reftests_with_caret.html
+++ b/layout/base/tests/test_reftests_with_caret.html
@@ -103,20 +103,19 @@ function endTest() {
 var tests = [
     [ 'bug106855-1.html' , 'bug106855-1-ref.html' ] ,
     [ 'bug106855-2.html' , 'bug106855-1-ref.html' ] ,
     [ 'bug389321-2.html' , 'bug389321-2-ref.html' ] ,
     [ 'bug613807-1.html' , 'bug613807-1-ref.html' ] ,
     [ 'bug1082486-1.html', 'bug1082486-1-ref.html'] ,
     [ 'bug1082486-2.html', 'bug1082486-2-ref.html'] ,
     // The following test cases are all involving with one sending
-    // synthesizeKey(), the other without. They fail when the touch
-    // or selection caret is enabled. Test them with these preferences off.
+    // synthesizeKey(), the other without. They ought to be failed
+    // when touch caret preference on. Test them with preference off.
     function() {SpecialPowers.pushPrefEnv({'set': [['touchcaret.enabled', false]]}, nextTest);} ,
-    function() {SpecialPowers.pushPrefEnv({'set': [['selectioncaret.enabled', false]]}, nextTest);} ,
     [ 'bug240933-1.html' , 'bug240933-1-ref.html' ] ,
     [ 'bug240933-2.html' , 'bug240933-1-ref.html' ] ,
     [ 'bug389321-1.html' , 'bug389321-1-ref.html' ] ,
     [ 'bug389321-3.html' , 'bug389321-3-ref.html' ] ,
     [ 'bug482484.html'   , 'bug482484-ref.html'   ] ,
     [ 'bug503399.html'   , 'bug503399-ref.html'   ] ,
     [ 'bug585922.html'   , 'bug585922-ref.html'   ] ,
     [ 'bug597519-1.html' , 'bug597519-1-ref.html' ] ,
@@ -151,19 +150,17 @@ var tests = [
     [ 'bug1007067-1.html' , 'bug1007067-1-ref.html' ] ,
     [ 'bug1061468.html'  , 'bug1061468-ref.html'  ] ,
     [ 'bug1097242-1.html', 'bug1097242-1-ref.html'] ,
     [ 'bug1109968-1.html', 'bug1109968-1-ref.html'] ,
     [ 'bug1109968-2.html', 'bug1109968-2-ref.html'] ,
     // [ 'bug1123067-1.html' , 'bug1123067-ref.html'  ] , TODO: bug 1129205
     [ 'bug1123067-2.html' , 'bug1123067-ref.html'  ] ,
     [ 'bug1123067-3.html' , 'bug1123067-ref.html'  ] ,
-    [ 'bug1132768-1.html' , 'bug1132768-1-ref.html'] ,
     function() {SpecialPowers.pushPrefEnv({'clear': [['touchcaret.enabled']]}, nextTest);} ,
-    function() {SpecialPowers.pushPrefEnv({'clear': [['selectioncaret.enabled']]}, nextTest);} ,
 ];
 
 if (navigator.appVersion.indexOf("Android") == -1 &&
   SpecialPowers.Services.appinfo.name != "B2G") {
   tests.push(function() {SpecialPowers.pushPrefEnv({'set': [['touchcaret.enabled', false]]}, nextTest);});
   tests.push([ 'bug512295-1.html' , 'bug512295-1-ref.html' ]);
   tests.push([ 'bug512295-2.html' , 'bug512295-2-ref.html' ]);
   tests.push([ 'bug923376.html'   , 'bug923376-ref.html'   ]);
--- a/layout/style/contenteditable.css
+++ b/layout/style/contenteditable.css
@@ -4,17 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
 
 *|*::-moz-canvas {
   cursor: text;
 }
 
-*|*:-moz-read-write :-moz-read-only {
+*|*:focus:-moz-read-write :-moz-read-only {
   -moz-user-select: all;
 }
 
 input:-moz-read-write > .anonymous-div:-moz-read-only,
 textarea:-moz-read-write > .anonymous-div:-moz-read-only {
   -moz-user-select: text;
 }