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 288736 53e23098346eae71d5178f8b8882f4a8327d92a3
parent 288735 69d953fbaccbc2f0df87f7745fab07d846015a54
child 288737 22ca2af337eb2b1d870ba392e1ede85576e98ab5
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslmandel
bugs1132768, 1181130
milestone42.0a2
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
@@ -151,17 +151,16 @@ 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'],
                                                      ['selectioncaret.enabled'],
                                                      ['layout.accessiblecaret.enabled']]}, nextTest);} ,
 ];
 
 if (navigator.appVersion.indexOf("Android") == -1 &&
   SpecialPowers.Services.appinfo.name != "B2G") {
   tests.push(function() {SpecialPowers.pushPrefEnv({'set': [['touchcaret.enabled', false]]}, nextTest);});
--- 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;
 }