Bug 1471542 - Remove support for tree[seltype=cell] and tree[seltype=text]. r=Paolo draft
authorTim Nguyen <ntim.bugs@gmail.com>
Wed, 27 Jun 2018 18:35:18 +0100
changeset 811463 bf0895ac41708fa62125109a480f6dd172a03798
parent 811244 65df1f8bb3cb7c95cadc91b542c1a8b9c11309ac
child 811520 ba69d68d726448dfc80438af07f84120af577134
child 811533 cffab350bd2408d9f639fbddc035af2b189054e5
child 811554 9e94b8156276c47f3f108e6ccf180e2ce93f959f
push id114315
push userbmo:ntim.bugs@gmail.com
push dateWed, 27 Jun 2018 17:37:03 +0000
reviewersPaolo
bugs1471542
milestone63.0a1
Bug 1471542 - Remove support for tree[seltype=cell] and tree[seltype=text]. r=Paolo MozReview-Commit-ID: BW9u3CvvP1p
accessible/tests/mochitest/selectable/test_tree.xul
layout/xul/tree/crashtests/399227-2.xul
layout/xul/tree/crashtests/crashtests.list
toolkit/content/jar.mn
toolkit/content/tests/chrome/chrome.ini
toolkit/content/tests/chrome/test_tree_hier_cell.xul
toolkit/content/tests/widgets/tree_shared.js
toolkit/content/widgets/tree.xml
toolkit/themes/linux/global/tree.css
toolkit/themes/osx/global/tree.css
toolkit/themes/windows/global/tree.css
--- a/accessible/tests/mochitest/selectable/test_tree.xul
+++ b/accessible/tests/mochitest/selectable/test_tree.xul
@@ -45,17 +45,17 @@
         this.DOMNode.view = aView;
       }
       this.check = function check()
       {
         var tree = getAccessible(this.DOMNode);
 
         var isTreeMultiSelectable = false;
         var seltype = this.DOMNode.getAttribute("seltype");
-        if (seltype != "single" && seltype != "cell" && seltype != "text")
+        if (seltype != "single")
           isTreeMultiSelectable = true;
 
         // selectAll
         var accSelectable = getAccessible(this.DOMNode,
                                           [nsIAccessibleSelectable]);
         ok(accSelectable, "tree is not selectable!");
         if (accSelectable) {
           is(accSelectable.selectAll(), isTreeMultiSelectable,
@@ -105,18 +105,16 @@
 
     var gQueue = null;
 
     function doTest()
     {
       gQueue = new eventQueue(EVENT_REORDER);
       gQueue.push(new statesChecker("tree", new nsTreeTreeView()));
       gQueue.push(new statesChecker("treesingle", new nsTreeTreeView()));
-      gQueue.push(new statesChecker("treecell", new nsTreeTreeView()));
-      gQueue.push(new statesChecker("treetext", new nsTreeTreeView()));
       gQueue.push(new statesChecker("tabletree", new nsTreeTreeView()));
 
       gQueue.invoke(); // Will call SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   ]]>
@@ -151,30 +149,16 @@
 
       <tree id="treesingle" flex="1" seltype="single">
         <treecols>
           <treecol id="col_single" flex="1" primary="true" label="column"/>
         </treecols>
         <treechildren/>
       </tree>
 
-      <tree id="treecell" flex="1" seltype="cell">
-        <treecols>
-          <treecol id="col_cell" flex="1" primary="true" label="column"/>
-        </treecols>
-        <treechildren/>
-      </tree>
-
-      <tree id="treetext" flex="1" seltype="text">
-        <treecols>
-          <treecol id="col_text" flex="1" primary="true" label="column"/>
-        </treecols>
-        <treechildren/>
-      </tree>
-
       <tree id="tabletree" flex="1" editable="true">
         <treecols>
           <treecol id="tabletree_col1" cycler="true" label="cycler"/>
           <treecol id="tabletree_col2" flex="1" primary="true" label="column1"/>
           <treecol id="tabletree_col3" flex="1" label="column2"/>
           <treecol id="tabletree_col4" flex="1" label="checker"
                    type="checkbox" editable="true"/>
         </treecols>
deleted file mode 100644
--- a/layout/xul/tree/crashtests/399227-2.xul
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="reftest-wait" onload="setTimeout(boom, 30);">
-
-
-  <script>
-  function boom()
-  {
-    var tree = document.getElementById("thetree");
-    var selection = tree.view.selection;
-    var treecolumn0 = tree.columns[0];
-    var treecolumn1 = tree.columns[1];
-
-    selection.select(0);
-    selection.currentColumn = treecolumn0;
-    tree.parentNode.removeChild(tree);
-
-    // This is expected to throw an error (it used to crash).
-    try {
-      selection.currentColumn = treecolumn1;
-    }
-    catch (ex) {}
-
-    document.documentElement.removeAttribute("class");
-  }
-  </script>
-
-<tree flex="1" id="thetree" seltype="cell">
-    <treecols>
-      <treecol label="Name"/>
-      <treecol label="Test"/>
-    </treecols>
-    <treechildren id="TC">
-      <treeitem id="TI1">
-        <treerow>
-          <treecell label="First treecell"/>
-          <treecell label="Second treecell"/>
-        </treerow>
-      </treeitem>
-      <treeitem id="TI2">
-        <treerow>
-          <treecell label="Third treecell"/>
-          <treecell label="Fourth treecell"/>
-        </treerow>
-      </treeitem>
-    </treechildren>
-  </tree>
-</window>
--- a/layout/xul/tree/crashtests/crashtests.list
+++ b/layout/xul/tree/crashtests/crashtests.list
@@ -3,17 +3,16 @@ load 309732-1.xul
 load 309732-2.xul
 load 366583-1.xul
 load 380217-1.xul
 load 382444-1.html
 load 391178-1.xhtml
 load 391178-2.xul
 load 393665-1.xul
 load 399227-1.xul
-load 399227-2.xul
 load 399692-1.xhtml
 load 399715-1.xhtml
 load 409807-1.xul
 load 414170-1.xul
 load 430394-1.xul
 load 479931-1.xhtml
 load 585815.html
 load 601427.html
--- a/toolkit/content/jar.mn
+++ b/toolkit/content/jar.mn
@@ -92,17 +92,17 @@ toolkit.jar:
    content/global/bindings/spinner.js          (widgets/spinner.js)
 *  content/global/bindings/tabbox.xml          (widgets/tabbox.xml)
    content/global/bindings/text.xml            (widgets/text.xml)
 *  content/global/bindings/textbox.xml         (widgets/textbox.xml)
    content/global/bindings/timekeeper.js       (widgets/timekeeper.js)
    content/global/bindings/timepicker.js       (widgets/timepicker.js)
    content/global/bindings/toolbar.xml         (widgets/toolbar.xml)
    content/global/bindings/toolbarbutton.xml   (widgets/toolbarbutton.xml)
-*  content/global/bindings/tree.xml            (widgets/tree.xml)
+   content/global/bindings/tree.xml            (widgets/tree.xml)
    content/global/bindings/videocontrols.xml   (widgets/videocontrols.xml)
 *  content/global/bindings/wizard.xml          (widgets/wizard.xml)
    content/global/elements/general.js           (widgets/general.js)
    content/global/elements/stringbundle.js     (widgets/stringbundle.js)
 #ifdef XP_MACOSX
    content/global/macWindowMenu.js
 #endif
    content/global/gmp-sources/openh264.json    (gmp-sources/openh264.json)
--- a/toolkit/content/tests/chrome/chrome.ini
+++ b/toolkit/content/tests/chrome/chrome.ini
@@ -181,17 +181,16 @@ support-files = window_preferences_onsyn
 [test_textbox_search.xul]
 [test_titlebar.xul]
 skip-if = os == "linux"
 [test_tooltip.xul]
 skip-if = (os == 'mac' && os_version == '10.10') || (os == 'win') # Bug 1141245, frequent timeouts on OSX 10.10, Windows
 [test_tooltip_noautohide.xul]
 [test_tree.xul]
 [test_tree_hier.xul]
-[test_tree_hier_cell.xul]
 [test_tree_single.xul]
 [test_tree_view.xul]
 [test_window_intrinsic_size.xul]
 support-files = window_intrinsic_size.xul
 # test_panel_focus.xul won't work if the Full Keyboard Access preference is set to
 # textboxes and lists only, so skip this test on Mac
 [test_panel_focus.xul]
 support-files = window_panel_focus.xul
deleted file mode 100644
--- a/toolkit/content/tests/chrome/test_tree_hier_cell.xul
+++ /dev/null
@@ -1,136 +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"?>
-<!--
-  XUL Widget Test for cell selection tree
-  -->
-<window title="Cell Selection Tree" width="500" height="600"
-        onload="setTimeout(testtag_tree, 0, 'tree-cell', 'treechildren-cell', 'cell', '', 'cell selection tree');"
-        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/EventUtils.js"></script>  
-
-<script src="tree_shared.js"/>
-
-<tree id="tree-cell" rows="4" seltype="cell">
-  <treecols>
-    <treecol id="name" label="Name" primary="true"
-             sort="label" properties="one two" flex="1"/>
-    <treecol id="address" label="Address" flex="2"/>
-    <treecol id="planet" label="Planet" flex="1"/>
-    <treecol id="gender" label="Gender" flex="1" cycler="true"/>
-  </treecols>
-  <treechildren id="treechildren-cell">
-    <treeitem>
-      <treerow properties="firstrow">
-        <treecell label="Mary" value="mary" properties="firstname"/>
-        <treecell label="206 Garden Avenue" value="206ga"/>
-        <treecell label="Earth"/>
-        <treecell label="Female" value="f"/>
-      </treerow>
-    </treeitem>
-    <treeitem>
-      <treerow>
-        <treecell/>
-        <treecell value="19ms"/>
-        <treecell label="Earth"/>
-        <treecell label="Male" value="m"/>
-      </treerow> 
-    </treeitem>
-    <treeitem container="true">
-      <treerow>
-        <treecell label="Sarah"/>
-        <treecell label="702 Fern Avenue" editable="false"/>
-        <treecell label="Saturn"/>
-        <treecell label="Female" value="f"/>
-      </treerow>
-      <treechildren>
-        <treeitem>
-          <treerow>
-            <treecell label="Mary"/>
-            <treecell label="206 Garden Avenue"/>
-            <treecell label="Female" value="f"/>
-            <treecell label="Neptune"/>
-          </treerow>
-        </treeitem>
-        <treeitem>
-          <treerow>
-            <treecell label="Chris"/>
-            <treecell label="19 Marion Street"/>
-            <treecell label="Omicron Persei 8"/>
-            <treecell label="Male" value="m"/>
-          </treerow>
-        </treeitem>
-        <treeitem>
-          <treerow>
-            <treecell label="Sarah"/>
-            <treecell label="702 Fern Avenue" editable="false"/>
-            <treecell label="Earth"/>
-            <treecell label="Female" value="f"/>
-          </treerow>
-        </treeitem>
-        <treeitem>
-          <treerow>
-            <treecell label="John"/>
-            <treecell label="99 Westminster Avenue"/>
-            <treecell label="Neptune"/>
-            <treecell label="Male" value="m"/>
-          </treerow>
-        </treeitem>
-      </treechildren>
-    </treeitem>
-    <treeitem>
-      <treerow>
-        <treecell label="John"/>
-        <treecell label="99 Westminster Avenue"/>
-        <treecell/>
-        <treecell label="Male" value="m"/>
-      </treerow>
-    </treeitem>
-    <treeitem>
-      <treerow>
-        <treecell label="Mary"/>
-        <treecell label="206 Garden Avenue" selectable="false"/>
-        <treecell label=""/>
-        <treecell label="Female" value="f"/>
-      </treerow>
-    </treeitem>
-    <treeitem>
-      <treerow>
-        <treecell label="Chris"/>
-        <treecell label="19 Marion Street"/>
-        <treecell label="Neptune"/>
-        <treecell label="Male" value="m"/>
-      </treerow>
-    </treeitem>
-    <treeitem>
-      <treerow>
-        <treecell label="Sarah"/>
-        <treecell label="702 Fern Avenue"/>
-        <treecell label="Earth"/>
-        <treecell label="Female" value="f"/>
-      </treerow>
-    </treeitem>
-    <treeitem>
-      <treerow>
-        <treecell label="John"/>
-        <treecell label="99 Westminster Avenue"/>
-        <treecell label="Mars"/>
-        <treecell label="Male" value="m"/>
-      </treerow>
-    </treeitem>
-  </treechildren>
-</tree>
-
-  <!-- test results are displayed in the html:body -->
-  <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
-
-  <!-- test code goes here -->
-  <script type="application/javascript"><![CDATA[
-
-SimpleTest.waitForExplicitFinish();
-
-]]>
-</script>
-
-</window>
--- a/toolkit/content/tests/widgets/tree_shared.js
+++ b/toolkit/content/tests/widgets/tree_shared.js
@@ -44,27 +44,19 @@ function testtag_tree(treeid, treerowinf
     rowInfo = convertDOMtoTreeRowInfo(treerowinfo, 0, { value: -1 });
   var columnInfo = (columnstype == "simple") ? columns_simpletree : columns_hiertree;
 
   is(tree.view.selection.currentColumn, null, testid + " initial currentColumn");
   is(tree.selType, seltype == "multiple" ? "" : seltype, testid + " seltype");
 
   // note: the functions below should be in this order due to changes made in later tests
 
-  // select the first column in cell selection mode so that the selection
-  // functions can be tested
-  if (seltype == "cell")
-    tree.view.selection.currentColumn = tree.columns[0];
-
   testtag_tree_columns(tree, columnInfo, testid);
   testtag_tree_TreeSelection(tree, testid, multiple);
   testtag_tree_TreeSelection_UI(tree, testid, multiple);
-  if (seltype == "cell")
-    testtag_tree_TreeSelection_UI_cell(tree, testid, rowInfo);
-
   testtag_tree_TreeView(tree, testid, rowInfo);
 
   is(tree.editable, false, "tree should not be editable");
   // currently, the editable flag means that tree editing cannot be invoked
   // by the user. However, editing can still be started with a script.
   is(tree.editingRow, -1, testid + " initial editingRow");
   is(tree.editingColumn, null, testid + " initial editingColumn");
 
@@ -601,18 +593,17 @@ function testtag_tree_TreeSelection_UI(t
   }
 
   // check that clicking on a row selects it
   tree.treeBoxObject.scrollToRow(0);
   selection.select(2);
   selection.currentIndex = 2;
   if (0) { // XXXndeakin disable these tests for now
     mouseOnCell(tree, 1, tree.columns[1], "mouse on row");
-    testtag_tree_TreeSelection_State(tree, testid + "mouse on row", 1, [1], 0,
-                                     tree.selType == "cell" ? tree.columns[1] : null);
+    testtag_tree_TreeSelection_State(tree, testid + "mouse on row", 1, [1], 0, null);
   }
 
   // restore the scroll position to the start of the page
   sendKey("HOME");
 
   window.removeEventListener("keydown", keydownListener);
   window.removeEventListener("keypress", keypressListener);
   is(keydownFired, multiple ? 63 : 40, "keydown event wasn't fired properly");
@@ -632,33 +623,16 @@ function testtag_tree_UI_editing(tree, t
     tree.editable = true;
 
   // if this is a container save its current open status
   var row = rowInfo.rows[rowIndex];
   var wasOpen = null;
   if (tree.view.isContainer(row))
     wasOpen = tree.view.isContainerOpen(row);
 
-  // Test whether a keystroke can enter text entry, and another can exit.
-  if (tree.selType == "cell") {
-    tree.stopEditing(false);
-    ok(!tree.editingColumn, "Should not be editing tree cell now");
-    tree.view.selection.currentColumn = ecolumn;
-    tree.currentIndex = rowIndex;
-
-    const isMac = (navigator.platform.includes("Mac"));
-    const StartEditingKey = isMac ? "RETURN" : "F2";
-    sendKey(StartEditingKey);
-    is(tree.editingColumn, ecolumn, "Should be editing tree cell now");
-    sendKey("ESCAPE");
-    ok(!tree.editingColumn, "Should not be editing tree cell now");
-    is(tree.currentIndex, rowIndex, "Current index should not have changed");
-    is(tree.view.selection.currentColumn, ecolumn, "Current column should not have changed");
-  }
-
   mouseDblClickOnCell(tree, rowIndex, ecolumn, testid + "edit on double click");
   is(tree.editingColumn, ecolumn, testid + "editing column");
   is(tree.editingRow, rowIndex, testid + "editing row");
 
   // ensure that we don't expand an expandable container on edit
   if (wasOpen != null)
     is(tree.view.isContainerOpen(row), wasOpen, testid + "opened container node on edit");
 
@@ -1039,28 +1013,23 @@ function testtag_tree_TreeView_rows_sort
 
   is(columnElement.getAttribute("sortDirection"), "",
      "cycleHeader column sortDirection reset");
 }
 
 // checks if the current and selected rows are correct
 // current is the index of the current row
 // selected is an array of the indicies of the selected rows
-// column is the selected column
 // viewidx is the row that should be visible at the top of the tree
-function testtag_tree_TreeSelection_State(tree, testid, current, selected, viewidx, column) {
+function testtag_tree_TreeSelection_State(tree, testid, current, selected, viewidx) {
   var selection = tree.view.selection;
 
-  if (!column)
-    column = (tree.selType == "cell") ? tree.columns[0] : null;
-
   is(selection.count, selected.length, testid + " count");
   is(tree.currentIndex, current, testid + " currentIndex");
   is(selection.currentIndex, current, testid + " TreeSelection currentIndex");
-  is(selection.currentColumn, column, testid + " currentColumn");
   if (viewidx !== null && viewidx !== undefined)
     is(tree.treeBoxObject.getFirstVisibleRow(), viewidx, testid + " first visible row");
 
   var actualSelected = [];
   var count = tree.view.rowCount;
   for (var s = 0; s < count; s++) {
     if (selection.isSelected(s))
       actualSelected.push(s);
--- a/toolkit/content/widgets/tree.xml
+++ b/toolkit/content/widgets/tree.xml
@@ -251,27 +251,16 @@
               this.dispatchEvent(event);
             }
             return true;
           }
           return false;
         ]]></body>
       </method>
 
-      <property name="_cellSelType">
-        <getter>
-          <![CDATA[
-            var seltype = this.selType;
-            if (seltype == "cell" || seltype == "text")
-              return seltype;
-            return null;
-          ]]>
-        </getter>
-      </property>
-
       <method name="_getNextColumn">
         <parameter name="row"/>
         <parameter name="left"/>
         <body><![CDATA[
           var col = this.view.selection.currentColumn;
           if (col) {
             col = left ? col.getPrevious() : col.getNext();
           } else {
@@ -439,28 +428,16 @@
 
             var c = this.currentIndex + offset;
             if (offset > 0 ? c > edge : c < edge) {
               if (this.view.selection.isSelected(edge) && this.view.selection.count <= 1)
                 return;
               c = edge;
             }
 
-            var cellSelType = this._cellSelType;
-            if (cellSelType) {
-              var column = this.view.selection.currentColumn;
-              if (!column)
-                return;
-
-              while ((offset > 0 ? c <= edge : c >= edge) && !this.view.isSelectable(c, column))
-                c += offset;
-              if (offset > 0 ? c > edge : c < edge)
-                return;
-            }
-
             if (!this._isAccelPressed(event))
               this.view.selection.timedSelect(c, this._selectDelay);
             else // Ctrl+Up/Down moves the anchor without selecting
               this.currentIndex = c;
             this.treeBoxObject.ensureRowIsVisible(c);
           ]]>
         </body>
       </method>
@@ -665,26 +642,16 @@
         <parameter name="event"/>
         <body><![CDATA[
           if (this._editingColumn) {
             this.stopEditing(true);
             this.focus();
             return true;
           }
 
-          if (/Mac/.test(navigator.platform)) {
-            // See if we can edit the cell.
-            var row = this.currentIndex;
-            if (this._cellSelType) {
-              var column = this.view.selection.currentColumn;
-              var startedEditing = this.startEditing(row, column);
-              if (startedEditing)
-                return true;
-            }
-          }
           return this.changeOpenState(this.currentIndex);
         ]]></body>
       </method>
     </implementation>
 
     <handlers>
       <handler event="touchstart">
         <![CDATA[
@@ -773,45 +740,27 @@
       <handler event="select" phase="target"
                action="if (event.originalTarget == this) this.stopEditing(true);"/>
       <handler event="focus">
         <![CDATA[
           this.treeBoxObject.focused = true;
           if (this.currentIndex == -1 && this.view.rowCount > 0) {
             this.currentIndex = this.treeBoxObject.getFirstVisibleRow();
           }
-          if (this._cellSelType && !this.view.selection.currentColumn) {
-            var col = this._getNextColumn(this.currentIndex, false);
-            this.view.selection.currentColumn = col;
-          }
         ]]>
       </handler>
       <handler event="blur" action="this.treeBoxObject.focused = false;"/>
       <handler event="blur" phase="capturing"
                action="if (event.originalTarget == this.inputField.inputField) this.stopEditing(true);"/>
       <handler event="keydown" keycode="VK_RETURN">
         if (this._handleEnter(event)) {
           event.stopPropagation();
           event.preventDefault();
         }
       </handler>
-#ifndef XP_MACOSX
-      <!-- Use F2 key to enter text editing. -->
-      <handler event="keydown" keycode="VK_F2">
-        <![CDATA[
-          if (!this._cellSelType)
-            return;
-          var row = this.currentIndex;
-          var column = this.view.selection.currentColumn;
-          if (this.startEditing(row, column))
-            event.preventDefault();
-        ]]>
-      </handler>
-#endif // XP_MACOSX
-
       <handler event="keydown" keycode="VK_ESCAPE">
         <![CDATA[
           if (this._editingColumn) {
             this.stopEditing(false);
             this.focus();
             event.stopPropagation();
             event.preventDefault();
           }
@@ -821,103 +770,56 @@
         <![CDATA[
          if (this._editingColumn)
            return;
 
          var row = this.currentIndex;
          if (row < 0)
            return;
 
-         var cellSelType = this._cellSelType;
          var checkContainers = true;
-
-         var currentColumn;
-         if (cellSelType) {
-           currentColumn = this.view.selection.currentColumn;
-           if (currentColumn && !currentColumn.primary)
-             checkContainers = false;
-         }
-
          if (checkContainers) {
            if (this.changeOpenState(this.currentIndex, false)) {
              event.preventDefault();
              return;
            }
            var parentIndex = this.view.getParentIndex(this.currentIndex);
            if (parentIndex >= 0) {
-             if (cellSelType && !this.view.isSelectable(parentIndex, currentColumn)) {
-               return;
-             }
              this.view.selection.select(parentIndex);
              this.treeBoxObject.ensureRowIsVisible(parentIndex);
              event.preventDefault();
-             return;
-           }
-         }
-
-         if (cellSelType) {
-           var col = this._getNextColumn(row, true);
-           if (col) {
-             this.view.selection.currentColumn = col;
-             this.treeBoxObject.ensureCellIsVisible(row, col);
-             event.preventDefault();
            }
          }
         ]]>
       </handler>
       <handler event="keydown" keycode="VK_RIGHT">
         <![CDATA[
          if (this._editingColumn)
            return;
 
           var row = this.currentIndex;
           if (row < 0)
             return;
 
-          var cellSelType = this._cellSelType;
           var checkContainers = true;
-
-          var currentColumn;
-          if (cellSelType) {
-            currentColumn = this.view.selection.currentColumn;
-            if (currentColumn && !currentColumn.primary)
-              checkContainers = false;
-          }
-
           if (checkContainers) {
             if (this.changeOpenState(row, true)) {
               event.preventDefault();
               return;
             }
             var c = row + 1;
             var view = this.view;
             if (c < view.rowCount &&
                 view.getParentIndex(c) == row) {
               // If already opened, select the first child.
               // The getParentIndex test above ensures that the children
               // are already populated and ready.
-              if (cellSelType && !this.view.isSelectable(c, currentColumn)) {
-                let col = this._getNextColumn(c, false);
-                if (col) {
-                  this.view.selection.currentColumn = col;
-                }
-              }
               this.view.selection.timedSelect(c, this._selectDelay);
               this.treeBoxObject.ensureRowIsVisible(c);
               event.preventDefault();
-              return;
-            }
-          }
-
-          if (cellSelType) {
-            let col = this._getNextColumn(row, false);
-            if (col) {
-              this.view.selection.currentColumn = col;
-              this.treeBoxObject.ensureCellIsVisible(row, col);
-              event.preventDefault();
             }
           }
         ]]>
       </handler>
       <handler event="keydown" keycode="VK_UP" modifiers="accel any">
         <![CDATA[
           if (this._editingColumn)
             return;
@@ -1134,35 +1036,20 @@
                  var value = view.getCellValue(cell.row, cell.col);
                  value = value == "true" ? "false" : "true";
                  view.setCellValue(cell.row, cell.col, value);
                  return;
                }
              }
            }
 
-           var cellSelType = this.parentNode._cellSelType;
-           if (cellSelType == "text" && cell.childElt != "text" && cell.childElt != "image")
-             return;
-
-           if (cellSelType) {
-             if (!cell.col.selectable ||
-                 !view.isSelectable(cell.row, cell.col)) {
-               return;
-             }
-           }
-
            if (!view.selection.isSelected(cell.row)) {
              view.selection.select(cell.row);
              b.ensureRowIsVisible(cell.row);
            }
-
-           if (cellSelType) {
-             view.selection.currentColumn = cell.col;
-           }
          }
       ]]>
       </handler>
 
       <!-- On a click (up+down on the same item), deselect everything
            except this item. -->
       <handler event="click" button="0" clickcount="1">
       <![CDATA[
@@ -1178,21 +1065,16 @@
         if (cell.childElt == "twisty") {
           if (view.selection.currentIndex >= 0 &&
               view.isContainerOpen(cell.row)) {
             var parentIndex = view.getParentIndex(view.selection.currentIndex);
             while (parentIndex >= 0 && parentIndex != cell.row)
               parentIndex = view.getParentIndex(parentIndex);
             if (parentIndex == cell.row) {
               var parentSelectable = true;
-              if (this.parentNode._cellSelType) {
-                var currentColumn = view.selection.currentColumn;
-                if (!view.isSelectable(parentIndex, currentColumn))
-                  parentSelectable = false;
-              }
               if (parentSelectable)
                 view.selection.select(parentIndex);
             }
           }
           this.parentNode.changeOpenState(cell.row);
           return;
         }
 
@@ -1218,34 +1100,18 @@
 
         if (!cell.col) return;
 
         // if the last row has changed in between the time we
         // mousedown and the time we click, don't fire the select handler.
         // see bug #92366
         if (!cell.col.cycler && this._lastSelectedRow == cell.row &&
             cell.col.type != window.TreeColumn.TYPE_CHECKBOX) {
-
-          var cellSelType = this.parentNode._cellSelType;
-          if (cellSelType == "text" && cell.childElt != "text" && cell.childElt != "image")
-            return;
-
-          if (cellSelType) {
-            if (!cell.col.selectable ||
-                !view.isSelectable(cell.row, cell.col)) {
-              return;
-            }
-          }
-
           view.selection.select(cell.row);
           b.ensureRowIsVisible(cell.row);
-
-          if (cellSelType) {
-            view.selection.currentColumn = cell.col;
-          }
         }
       ]]>
       </handler>
 
       <!-- double-click -->
       <handler event="click" clickcount="2">
       <![CDATA[
         if (this.parentNode.disabled)
--- a/toolkit/themes/linux/global/tree.css
+++ b/toolkit/themes/linux/global/tree.css
@@ -51,122 +51,55 @@ treechildren::-moz-tree-row(selected, fo
 treechildren::-moz-tree-row(current, focus) {
   border: 1px dotted Highlight;
 }
 
 treechildren::-moz-tree-row(selected, current, focus) {
   border: 1px dotted #F3D982;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-row,
-tree[seltype="text"] > treechildren::-moz-tree-row {
-  border: none;
-  background-color: transparent;
-}
-
 /* ::::: tree cells ::::: */
 
 treechildren::-moz-tree-cell {
   padding: 0 2px;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-cell-text,
-tree[seltype="text"] > treechildren::-moz-tree-cell-text,
 treechildren::-moz-tree-cell-text {
   color: inherit;
 }
 
 treechildren::-moz-tree-cell-text(selected) {
   color: -moz-cellhighlighttext;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-cell {
-  border: 1px solid transparent;
-  padding: 0 1px;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text {
-  border: 1px solid transparent;
-  padding: 0 1px 1px;
-}
-
-tree[seltype="cell"] > treechildren::-moz-tree-cell(active, selected) {
-  background-color: -moz-cellhighlight;
-}
-tree[seltype="cell"] > treechildren::-moz-tree-cell-text(active, selected) {
-  color: -moz-cellhighlighttext;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(active, selected) {
-  background-color: -moz-cellhighlight;
-  color: -moz-cellhighlighttext;
-}
-
 treechildren::-moz-tree-cell-text(selected, focus) {
   color: HighlightText;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-cell(active, selected, focus) {
-  background-color: Highlight;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(active, selected, focus) {
-  background-color: Highlight;
-}
-
-tree[seltype="cell"] > treechildren::-moz-tree-cell-text(active, selected, focus) {
-  color: HighlightText;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(active, selected, focus) {
-  color: HighlightText;
-}
-
-tree[seltype="cell"] > treechildren::-moz-tree-cell(active, current, focus) {
-  border: 1px dotted #000000;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(active, current, focus) {
-  border: 1px dotted #000000;
-}
-
-tree[seltype="cell"] > treechildren::-moz-tree-cell(active, selected, current, focus) {
-  border: 1px dotted #C0C0C0;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(active, selected, current, focus) {
-  border: 1px dotted #C0C0C0;
-}
-
 /* ::::: lines connecting cells ::::: */
 
-tree[seltype="cell"] > treechildren::-moz-tree-line,
-tree[seltype="text"] > treechildren::-moz-tree-line,
 treechildren::-moz-tree-line {
   border: 1px dotted ThreeDShadow;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-line(active, selected, focus),
 treechildren::-moz-tree-line(selected, focus) {
   border: 1px dotted HighlightText;
 }
 
 
 /* ::::: tree separator ::::: */
 
 treechildren::-moz-tree-separator {
   border-top: 1px solid ThreeDShadow;
   border-bottom: 1px solid ThreeDHighlight;
 }
 
 
 /* ::::: drop feedback ::::: */
 
-tree[seltype="cell"] > treechildren::-moz-tree-cell-text(primary, dropOn),
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(primary, dropOn),
 treechildren::-moz-tree-cell-text(primary, dropOn) {
   background-color: Highlight;
   color: HighlightText;
 }
 
 treechildren::-moz-tree-drop-feedback {
   background-color: Highlight;
   width: 50px;
@@ -253,19 +186,17 @@ treechildren::-moz-tree-row(selected, ed
   background-color: transparent;
   border: none;
 }
 
 treechildren::-moz-tree-cell-text(selected, editing) {
   color: inherit;
 }
 
-treechildren::-moz-tree-cell(active, selected, focus, editing),
-tree[seltype="cell"] > treechildren::-moz-tree-cell(active, selected, focus, editing),
-tree[seltype="text"] > treechildren::-moz-tree-cell(active, selected, focus, editing) {
+treechildren::-moz-tree-cell(active, selected, focus, editing) {
   background-color: transparent;
   border: none;
 }
 
 treechildren::-moz-tree-cell-text(active, selected, editing) {
   opacity: 0;
 }
 
--- a/toolkit/themes/osx/global/tree.css
+++ b/toolkit/themes/osx/global/tree.css
@@ -39,75 +39,34 @@ treechildren::-moz-tree-row(selected) {
   background-color: -moz-mac-secondaryhighlight;
 }
 
 treechildren::-moz-tree-row(selected, focus) {
   background-color: Highlight;
   color: HighlightText;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-row,
-tree[seltype="text"] > treechildren::-moz-tree-row {
-  border-top: none;
-  background-color: transparent;
-}
-
 /* ::::: tree cells ::::: */
 
 treechildren::-moz-tree-cell {
   padding: 0px 2px 0px 2px;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-cell-text,
-tree[seltype="text"] > treechildren::-moz-tree-cell-text,
 treechildren::-moz-tree-cell-text {
   color: inherit;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-cell {
-  padding: 0px 1px 0px 1px;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text {
-  padding: 0px 1px 1px 1px;
-}
-
 treechildren::-moz-tree-cell-text(selected) {
   color: -moz-DialogText;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-cell(active, selected) {
-  background-color: -moz-mac-secondaryhighlight;
-
-}
-tree[seltype="cell"] > treechildren::-moz-tree-cell-text(active, selected) {
-  color: -moz-DialogText;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(active, selected) {
-  background-color: -moz-mac-secondaryhighlight;
-  color: -moz-DialogText;
-}
-
 treechildren::-moz-tree-cell-text(selected, focus) {
   color: HighlightText;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-cell(active, selected, focus) {
-  background-color: Highlight;
-}
-tree[seltype="cell"] > treechildren::-moz-tree-cell-text(active, selected, focus) {
-  color: HighlightText;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(active, selected, focus) {
-  background-color: Highlight;
-  color: HighlightText;
-}
-
 /* ::::: lines connecting cells ::::: */
 
 treechildren::-moz-tree-line {
   /* XXX there should be no border on Mac, but trees currently
          paint the line black by default, so I'll just leave this
          for now. */
   visibility: hidden;
   border: 1px dotted grey;
@@ -119,25 +78,22 @@ treechildren::-moz-tree-line {
 treechildren::-moz-tree-separator {
   border-top: 1px dashed #C7C7C7;
   margin: 0 2px;
 }
 
 
 /* ::::: drop feedback ::::: */
 
-tree[seltype="cell"] > treechildren::-moz-tree-cell(primary, dropOn),
-tree[seltype="text"] > treechildren::-moz-tree-cell(primary, dropOn),
 treechildren::-moz-tree-cell(primary, dropOn) {
   background-color: #A1A1A1 !important;
   color: #FFF !important;
   background-image: none;
 }
-tree[seltype="cell"] > treechildren::-moz-tree-cell-text(primary, dropOn),
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(primary, dropOn),
+
 treechildren::-moz-tree-cell-text(primary, dropOn) {
   color: #FFF !important;
 }
 
 treechildren::-moz-tree-drop-feedback {
   background-color: #A1A1A1;
   width: 50px;
   height: 2px;
@@ -215,18 +171,16 @@ treechildren::-moz-tree-indentation {
   -moz-appearance: none;
   border-width: 0;
   box-shadow: var(--focus-ring-box-shadow);
   margin: 0;
   margin-inline-start: -2px;
   padding: 2px 1px 1px;
 }
 
-treechildren::-moz-tree-cell(active, selected, focus, editing),
-tree[seltype="cell"] > treechildren::-moz-tree-cell(active, selected, focus, editing),
-tree[seltype="text"] > treechildren::-moz-tree-cell(active, selected, focus, editing) {
+treechildren::-moz-tree-cell(active, selected, focus, editing) {
   background-color: transparent;
   border: none;
 }
 
 treechildren::-moz-tree-cell-text(active, selected, editing) {
   opacity: 0;
 }
--- a/toolkit/themes/windows/global/tree.css
+++ b/toolkit/themes/windows/global/tree.css
@@ -47,106 +47,40 @@ treechildren::-moz-tree-row(selected, fo
 treechildren::-moz-tree-row(current, focus) {
   border: 1px dotted Highlight;
 }
 
 treechildren::-moz-tree-row(selected, current, focus) {
   border: 1px dotted #F3D982;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-row,
-tree[seltype="text"] > treechildren::-moz-tree-row {
-  border: none;
-  background-color: transparent;
-  background-image: none;
-}
-
 /* ::::: tree cells ::::: */
 
 treechildren::-moz-tree-cell {
   padding: 0 2px;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-cell-text,
-tree[seltype="text"] > treechildren::-moz-tree-cell-text,
 treechildren::-moz-tree-cell-text {
   color: inherit;
 }
 
 treechildren::-moz-tree-cell-text(selected) {
   color: -moz-cellhighlighttext;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-cell {
-  border: 1px solid transparent;
-  padding: 0px 1px 0px 1px;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text {
-  border: 1px solid transparent;
-  padding: 0px 1px 1px 1px;
-}
-
-tree[seltype="cell"] > treechildren::-moz-tree-cell(active, selected) {
-  background-color: -moz-cellhighlight;
-}
-tree[seltype="cell"] > treechildren::-moz-tree-cell-text(active, selected) {
-  color: -moz-cellhighlighttext;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(active, selected) {
-  background-color: -moz-cellhighlight;
-  color: -moz-cellhighlighttext;
-}
-
 treechildren::-moz-tree-cell-text(selected, focus) {
   color: HighlightText;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-cell(active, selected, focus) {
-  background-color: Highlight;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(active, selected, focus) {
-  background-color: Highlight;
-}
-
-tree[seltype="cell"] > treechildren::-moz-tree-cell-text(active, selected, focus) {
-  color: HighlightText;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(active, selected, focus) {
-  color: HighlightText;
-}
-
-tree[seltype="cell"] > treechildren::-moz-tree-cell(active, current, focus) {
-  border: 1px dotted #000000;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(active, current, focus) {
-  border: 1px dotted #000000;
-}
-
-tree[seltype="cell"] > treechildren::-moz-tree-cell(active, selected, current, focus) {
-  border: 1px dotted #C0C0C0;
-}
-
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(active, selected, current, focus) {
-  border: 1px dotted #C0C0C0;
-}
-
 /* ::::: lines connecting cells ::::: */
 
-tree[seltype="cell"] > treechildren::-moz-tree-line,
-tree[seltype="text"] > treechildren::-moz-tree-line,
 treechildren::-moz-tree-line {
   border: 1px dotted ThreeDShadow;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-line(active, selected, focus),
 treechildren::-moz-tree-line(selected, focus) {
   border: 1px dotted HighlightText;
 }
 
 /* ::::: tree separator ::::: */
 
 treechildren::-moz-tree-separator {
   border-top: 1px solid ThreeDShadow;
@@ -155,18 +89,16 @@ treechildren::-moz-tree-separator {
 
 
 /* ::::: drop feedback ::::: */
 
 treechildren::-moz-tree-row(dropOn) {
   background-color: Highlight;
 }
 
-tree[seltype="cell"] > treechildren::-moz-tree-cell-text(primary, dropOn),
-tree[seltype="text"] > treechildren::-moz-tree-cell-text(primary, dropOn),
 treechildren::-moz-tree-cell-text(primary, dropOn) {
   color: HighlightText;
 }
 
 treechildren::-moz-tree-drop-feedback {
   background-color: Highlight;
   width: 50px;
   height: 2px;
@@ -294,19 +226,17 @@ treechildren::-moz-tree-row(selected, ed
   background-color: transparent;
   border: none;
 }
 
 treechildren::-moz-tree-cell-text(selected, editing) {
   color: inherit;
 }
 
-treechildren::-moz-tree-cell(active, selected, focus, editing),
-tree[seltype="cell"] > treechildren::-moz-tree-cell(active, selected, focus, editing),
-tree[seltype="text"] > treechildren::-moz-tree-cell(active, selected, focus, editing) {
+treechildren::-moz-tree-cell(active, selected, focus, editing) {
   background-color: transparent;
   border: none;
 }
 
 treechildren::-moz-tree-cell-text(active, selected, editing) {
   opacity: 0;
 }