Bug 528686 - xf:select doesn't work if contenteditable element is presented within the document; r=dbaron
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 06 May 2010 20:33:31 -0400
changeset 42172 36b3e529f9dbc76d27e790fc141830c530f80615
parent 42171 6a779c75c7bff36632a57a1830e4edb55eeb9644
child 42173 a6138098775fcacd0030e7679206553bbef296ec
push id13212
push usereakhgari@mozilla.com
push dateTue, 11 May 2010 21:24:24 +0000
treeherdermozilla-central@36b3e529f9db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs528686
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 528686 - xf:select doesn't work if contenteditable element is presented within the document; r=dbaron
layout/style/contenteditable.css
--- a/layout/style/contenteditable.css
+++ b/layout/style/contenteditable.css
@@ -31,21 +31,23 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-::-moz-canvas {
+@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
+
+*|*::-moz-canvas {
   cursor: text;
 }
 
-:focus:-moz-read-write :-moz-read-only {
+*|*:focus:-moz-read-write :-moz-read-only {
   -moz-user-select: all !important;
 }
 
 input:-moz-read-write > .anonymous-div:-moz-read-only,
 textarea:-moz-read-write > .anonymous-div:-moz-read-only {
   -moz-user-select: text !important;
 }
 
@@ -58,17 +60,17 @@ img:-moz-read-write, img:-moz-read-write
 object:-moz-read-write, object:-moz-read-write[usemap], 
 applet:-moz-read-write, hr:-moz-read-write, button:-moz-read-write,
 isindex:-moz-read-write, select:-moz-read-write,
 a:-moz-read-write:link img, a:-moz-read-write:visited img,
 a:-moz-read-write:active img, a:-moz-read-write:-moz-only-whitespace[name] {
   cursor: default;
 }
 
-:-moz-any-link:-moz-read-write {
+*|*:-moz-any-link:-moz-read-write {
   cursor: text;
 }
 
 /* Prevent clicking on links from going to link */
 a:link:-moz-read-write img, a:visited:-moz-read-write img,
 a:active:-moz-read-write img {
   -moz-user-input: none;
 }
@@ -78,30 +80,30 @@ a:active:-moz-read-write img {
 */
 a:link:-moz-read-write {
   text-decoration: underline -moz-anchor-decoration;
   color: -moz-hyperlinktext;
 }
 
 /* Allow double-clicks on these widgets to open properties dialogs
    XXX except when the widget has disabled attribute */
-:-moz-read-write > input:-moz-read-only,
-:-moz-read-write > button:-moz-read-only,
-:-moz-read-write > textarea:-moz-read-only {
+*|*:-moz-read-write > input:-moz-read-only,
+*|*:-moz-read-write > button:-moz-read-only,
+*|*:-moz-read-write > textarea:-moz-read-only {
   -moz-user-select: all !important;
   -moz-user-input: auto !important;
   -moz-user-focus: none !important;
 }
 
 /* XXX Still need a better way of blocking other events to these widgets */
 select:-moz-read-write,
-:-moz-read-write > input[disabled],
-:-moz-read-write > input[type="checkbox"],
-:-moz-read-write > input[type="radio"],
-:-moz-read-write > input[type="file"],
+*|*:-moz-read-write > input[disabled],
+*|*:-moz-read-write > input[type="checkbox"],
+*|*:-moz-read-write > input[type="radio"],
+*|*:-moz-read-write > input[type="file"],
 input[contenteditable="true"][disabled],
 input[contenteditable="true"][type="checkbox"],
 input[contenteditable="true"][type="radio"],
 input[contenteditable="true"][type="file"] {
   -moz-user-select: all !important;
   -moz-user-input: none !important;
   -moz-user-focus: none !important;
 }
@@ -117,27 +119,27 @@ isindex:-moz-read-write[prompt]
 marquee:-moz-read-write {
   -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-horizontal-editable');
 }
 
 marquee[direction="up"]:-moz-read-write, marquee[direction="down"]:-moz-read-write {
   -moz-binding: url('chrome://xbl-marquee/content/xbl-marquee.xml#marquee-vertical-editable');
 }
 
-:-moz-read-write > input[type="hidden"],
+*|*:-moz-read-write > input[type="hidden"],
 input[contenteditable="true"][type="hidden"] {
   border: 1px solid black !important;
   visibility: visible !important;
 }
 
 label:-moz-read-write {
     -moz-user-select: all !important;
 }
 
-::-moz-display-comboboxcontrol-frame {
+*|*::-moz-display-comboboxcontrol-frame {
   -moz-user-select: text !important;
 }
 
 option:-moz-read-write {
   -moz-user-select: text !important;
 }
 
 /* the following rules are for Image Resizing */