Bug 1427363 - Part 1 - Remove "autocomplete-result-popup" and related bindings. r=mak draft
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Fri, 29 Dec 2017 14:12:10 +0000
changeset 714776 a1fd121d417a05dfd1e604aa9004b17ec39d17bb
parent 714773 c51cccde9a7130a431f573dbfdb770867fb88b09
child 714777 8e58448233084180bff7ff2d8893c092f7d98e1e
push id94026
push userpaolo.mozmail@amadzone.org
push dateFri, 29 Dec 2017 14:55:30 +0000
reviewersmak
bugs1427363
milestone59.0a1
Bug 1427363 - Part 1 - Remove "autocomplete-result-popup" and related bindings. r=mak MozReview-Commit-ID: oJ08wuZMop
toolkit/content/widgets/autocomplete.xml
toolkit/content/xul.css
toolkit/themes/linux/global/autocomplete.css
toolkit/themes/linux/global/tree.css
toolkit/themes/osx/global/autocomplete.css
toolkit/themes/osx/global/tree.css
toolkit/themes/shared/in-content/common.inc.css
toolkit/themes/windows/global/autocomplete.css
toolkit/themes/windows/global/tree.css
--- a/toolkit/content/widgets/autocomplete.xml
+++ b/toolkit/content/widgets/autocomplete.xml
@@ -664,226 +664,16 @@
           }
           if (!this.ignoreBlurWhileSearching)
             this.detachController();
         }
       ]]></handler>
     </handlers>
   </binding>
 
-  <binding id="autocomplete-result-popup" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete-base-popup">
-    <resources>
-      <stylesheet src="chrome://global/content/autocomplete.css"/>
-      <stylesheet src="chrome://global/skin/tree.css"/>
-      <stylesheet src="chrome://global/skin/autocomplete.css"/>
-    </resources>
-
-    <content ignorekeys="true" level="top" consumeoutsideclicks="never">
-      <xul:tree anonid="tree" class="autocomplete-tree plain" hidecolumnpicker="true" flex="1" seltype="single">
-        <xul:treecols anonid="treecols">
-          <xul:treecol id="treecolAutoCompleteValue" class="autocomplete-treecol" flex="1" overflow="true"/>
-        </xul:treecols>
-        <xul:treechildren class="autocomplete-treebody"/>
-      </xul:tree>
-    </content>
-
-    <implementation>
-      <field name="mShowCommentColumn">false</field>
-      <field name="mShowImageColumn">false</field>
-
-      <property name="showCommentColumn"
-                   onget="return this.mShowCommentColumn;">
-        <setter>
-          <![CDATA[
-          if (!val && this.mShowCommentColumn) {
-            // reset the flex on the value column and remove the comment column
-            document.getElementById("treecolAutoCompleteValue").setAttribute("flex", 1);
-            this.removeColumn("treecolAutoCompleteComment");
-          } else if (val && !this.mShowCommentColumn) {
-            // reset the flex on the value column and add the comment column
-            document.getElementById("treecolAutoCompleteValue").setAttribute("flex", 2);
-            this.addColumn({id: "treecolAutoCompleteComment", flex: 1});
-          }
-          this.mShowCommentColumn = val;
-          return val;
-        ]]>
-        </setter>
-      </property>
-
-      <property name="showImageColumn"
-                onget="return this.mShowImageColumn;">
-        <setter>
-          <![CDATA[
-          if (!val && this.mShowImageColumn) {
-            // remove the image column
-            this.removeColumn("treecolAutoCompleteImage");
-          } else if (val && !this.mShowImageColumn) {
-            // add the image column
-            this.addColumn({id: "treecolAutoCompleteImage", flex: 1});
-          }
-          this.mShowImageColumn = val;
-          return val;
-        ]]>
-        </setter>
-      </property>
-
-
-      <method name="addColumn">
-        <parameter name="aAttrs"/>
-        <body>
-          <![CDATA[
-          var col = document.createElement("treecol");
-          col.setAttribute("class", "autocomplete-treecol");
-          for (var name in aAttrs)
-            col.setAttribute(name, aAttrs[name]);
-          this.treecols.appendChild(col);
-          return col;
-        ]]>
-        </body>
-      </method>
-
-      <method name="removeColumn">
-        <parameter name="aColId"/>
-        <body>
-          <![CDATA[
-          return this.treecols.removeChild(document.getElementById(aColId));
-        ]]>
-        </body>
-      </method>
-
-      <property name="selectedIndex"
-                onget="return this.tree.currentIndex;">
-        <setter>
-          <![CDATA[
-          this.tree.view.selection.select(val);
-          if (this.tree.treeBoxObject.height > 0)
-            this.tree.treeBoxObject.ensureRowIsVisible(val < 0 ? 0 : val);
-          // Fire select event on xul:tree so that accessibility API
-          // support layer can fire appropriate accessibility events.
-          var event = document.createEvent("Events");
-          event.initEvent("select", true, true);
-          this.tree.dispatchEvent(event);
-          return val;
-        ]]></setter>
-      </property>
-
-      <method name="adjustHeight">
-        <body>
-          <![CDATA[
-          // detect the desired height of the tree
-          var bx = this.tree.treeBoxObject;
-          var view = this.tree.view;
-          if (!view)
-            return;
-          var rows = this.maxRows;
-          if (!view.rowCount || (rows && view.rowCount < rows))
-            rows = view.rowCount;
-
-          var height = rows * bx.rowHeight;
-
-          if (height == 0) {
-            this.tree.setAttribute("collapsed", "true");
-          } else {
-            if (this.tree.hasAttribute("collapsed"))
-              this.tree.removeAttribute("collapsed");
-
-            this.tree.setAttribute("height", height);
-          }
-          this.tree.setAttribute("hidescrollbar", view.rowCount <= rows);
-        ]]>
-        </body>
-      </method>
-
-      <method name="openAutocompletePopup">
-        <parameter name="aInput"/>
-        <parameter name="aElement"/>
-        <body><![CDATA[
-          // until we have "baseBinding", (see bug #373652) this allows
-          // us to override openAutocompletePopup(), but still call
-          // the method on the base class
-          this._openAutocompletePopup(aInput, aElement);
-        ]]></body>
-      </method>
-
-      <method name="_openAutocompletePopup">
-        <parameter name="aInput"/>
-        <parameter name="aElement"/>
-        <body><![CDATA[
-          if (!this.mPopupOpen) {
-            this.mInput = aInput;
-            this.view = aInput.controller.QueryInterface(Components.interfaces.nsITreeView);
-            this.invalidate();
-
-            this.showCommentColumn = this.mInput.showCommentColumn;
-            this.showImageColumn = this.mInput.showImageColumn;
-
-            var rect = aElement.getBoundingClientRect();
-            var nav = aElement.ownerGlobal.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
-                              .getInterface(Components.interfaces.nsIWebNavigation);
-            var docShell = nav.QueryInterface(Components.interfaces.nsIDocShell);
-            var docViewer = docShell.contentViewer;
-            var width = (rect.right - rect.left) * docViewer.fullZoom;
-            this.setAttribute("width", width > 100 ? width : 100);
-
-            // Adjust the direction of the autocomplete popup list based on the textbox direction, bug 649840
-            var popupDirection = aElement.ownerGlobal.getComputedStyle(aElement).direction;
-            this.style.direction = popupDirection;
-
-            this.openPopup(aElement, "after_start", 0, 0, false, false);
-          }
-        ]]></body>
-      </method>
-
-      <method name="invalidate">
-        <body><![CDATA[
-          this.adjustHeight();
-          this.tree.treeBoxObject.invalidate();
-        ]]></body>
-      </method>
-
-      <method name="selectBy">
-        <parameter name="aReverse"/>
-        <parameter name="aPage"/>
-        <body><![CDATA[
-          try {
-            var amount = aPage ? 5 : 1;
-            this.selectedIndex = this.getNextIndex(aReverse, amount, this.selectedIndex, this.tree.view.rowCount - 1);
-            if (this.selectedIndex == -1) {
-              this.input._focus();
-            }
-          } catch (ex) {
-            // do nothing - occasionally timer-related js errors happen here
-            // e.g. "this.selectedIndex has no properties", when you type fast and hit a
-            // navigation key before this popup has opened
-          }
-        ]]></body>
-      </method>
-
-      <!-- =================== PUBLIC MEMBERS =================== -->
-
-      <field name="tree">
-        document.getAnonymousElementByAttribute(this, "anonid", "tree");
-      </field>
-
-      <field name="treecols">
-        document.getAnonymousElementByAttribute(this, "anonid", "treecols");
-      </field>
-
-      <property name="view"
-                onget="return this.mView;">
-        <setter><![CDATA[
-          // We must do this by hand because the tree binding may not be ready yet
-          this.mView = val;
-          this.tree.boxObject.view = val;
-        ]]></setter>
-      </property>
-
-    </implementation>
-  </binding>
-
   <binding id="autocomplete-base-popup" role="none"
 extends="chrome://global/content/bindings/popup.xml#popup">
     <implementation implements="nsIAutoCompletePopup">
       <field name="mInput">null</field>
       <field name="mPopupOpen">false</field>
 
       <!-- =================== nsIAutoCompletePopup =================== -->
 
@@ -2446,25 +2236,16 @@ extends="chrome://global/content/binding
         if (!this.selected) {
           control.selectItem(this);
         }
         control.currentItem = this;
       ]]></handler>
     </handlers>
   </binding>
 
-  <binding id="autocomplete-tree" extends="chrome://global/content/bindings/tree.xml#tree">
-    <content>
-      <children includes="treecols"/>
-      <xul:treerows class="autocomplete-treerows tree-rows" xbl:inherits="hidescrollbar" flex="1">
-        <children/>
-      </xul:treerows>
-    </content>
-  </binding>
-
   <binding id="autocomplete-richlistbox" extends="chrome://global/content/bindings/richlistbox.xml#richlistbox">
     <implementation>
       <field name="mLastMoveTime">Date.now()</field>
       <field name="mousedOverIndex">-1</field>
     </implementation>
     <handlers>
       <handler event="mouseup">
         <![CDATA[
@@ -2504,62 +2285,9 @@ extends="chrome://global/content/binding
           this.selectedIndex = index;
         }
 
         this.mLastMoveTime = Date.now();
       ]]>
       </handler>
     </handlers>
   </binding>
-
-  <binding id="autocomplete-treebody">
-    <implementation>
-      <field name="mLastMoveTime">Date.now()</field>
-      <property name="noSelectOnMouseMove">
-        <getter><![CDATA[
-          return this.getAttribute("noSelectOnMouseMove") == "true";
-        ]]></getter>
-        <setter><![CDATA[
-          if (val) {
-            this.setAttribute("noSelectOnMouseMove", "true");
-          } else {
-            this.removeAttribute("noSelectOnMouseMove");
-          }
-          return !!val;
-        ]]></setter>
-      </property>
-    </implementation>
-
-    <handlers>
-      <handler event="mouseup" action="this.parentNode.parentNode.onPopupClick(event);"/>
-
-      <handler event="mousedown"><![CDATA[
-         var rc = this.parentNode.treeBoxObject.getRowAt(event.clientX, event.clientY);
-         if (rc != this.parentNode.currentIndex)
-            this.parentNode.view.selection.select(rc);
-      ]]></handler>
-
-      <handler event="mousemove"><![CDATA[
-        if (this.noSelectOnMouseMove) {
-          // Allow uses of this binding to cancel the event so that
-          // nothing is selected.
-          return;
-        }
-        if (Date.now() - this.mLastMoveTime > 30) {
-         var rc = this.parentNode.treeBoxObject.getRowAt(event.clientX, event.clientY);
-         if (rc != this.parentNode.currentIndex)
-            this.parentNode.view.selection.select(rc);
-         this.mLastMoveTime = Date.now();
-        }
-      ]]></handler>
-    </handlers>
-  </binding>
-
-  <binding id="autocomplete-treerows">
-    <content>
-      <xul:hbox flex="1" class="tree-bodybox">
-        <children/>
-      </xul:hbox>
-      <xul:scrollbar xbl:inherits="collapsed=hidescrollbar" orient="vertical" class="tree-scrollbar"/>
-    </content>
-  </binding>
-
 </bindings>
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -798,62 +798,37 @@ textbox[type="number"] {
 
 /* SeaMonkey uses its own autocomplete and the toolkit's autocomplete widget */
 %ifndef MOZ_SUITE
 
 textbox[type="autocomplete"] {
   -moz-binding: url("chrome://global/content/bindings/autocomplete.xml#autocomplete");
 }
 
-panel[type="autocomplete"] {
-  -moz-binding: url("chrome://global/content/bindings/autocomplete.xml#autocomplete-result-popup");
-}
-
 panel[type="autocomplete-richlistbox"] {
   -moz-binding: url("chrome://global/content/bindings/autocomplete.xml#autocomplete-rich-result-popup");
 }
 
-/* FIXME: bug 616258 */
-
-.autocomplete-tree {
-  -moz-binding: url("chrome://global/content/bindings/autocomplete.xml#autocomplete-tree");
-  -moz-user-focus: ignore;
-}
-
-.autocomplete-treebody {
-  -moz-binding: url("chrome://global/content/bindings/autocomplete.xml#autocomplete-treebody");
-}
-
 .autocomplete-richlistbox {
   -moz-binding: url("chrome://global/content/bindings/autocomplete.xml#autocomplete-richlistbox");
   -moz-user-focus: ignore;
 }
 
 .autocomplete-richlistbox > scrollbox {
   overflow-x: hidden !important;
 }
 
 .autocomplete-richlistitem {
   -moz-binding: url("chrome://global/content/bindings/autocomplete.xml#autocomplete-richlistitem");
   -moz-box-orient: vertical;
   overflow: -moz-hidden-unscrollable;
 }
 
-.autocomplete-treerows {
-  -moz-binding: url("chrome://global/content/bindings/autocomplete.xml#autocomplete-treerows");
-}
-
 %endif
 
-/* the C++ implementation of widgets is too eager to make popups visible.
-   this causes problems (bug 120155 and others), thus this workaround: */
-popup[type="autocomplete"][hidden="true"] {
-  visibility: hidden;
-}
-
 /* The following rule is here to fix bug 96899 (and now 117952).
    Somehow trees create a situation
    in which a popupset flows itself as if its popup child is directly within it
    instead of the placeholder child that should actually be inside the popupset.
    This is a stopgap measure, and it does not address the real bug.  */
 .autocomplete-result-popupset {
   max-width: 0px;
   width: 0 !important;
--- a/toolkit/themes/linux/global/autocomplete.css
+++ b/toolkit/themes/linux/global/autocomplete.css
@@ -12,67 +12,29 @@
 /* ::::: autocomplete ::::: */
 
 textbox[nomatch="true"][highlightnonmatches="true"] {
   color: red;
 }
 
 /* ::::: autocomplete popups ::::: */
 
-panel[type="autocomplete"],
 panel[type="autocomplete-richlistbox"],
 .autocomplete-history-popup {
   border: 1px solid ThreeDShadow;
   padding: 0;
   color: -moz-FieldText;
   background-color: -moz-Field;
   -moz-appearance: none;
 }
 
 .autocomplete-history-popup {
   max-height: 180px;
 }
 
-/* ::::: tree ::::: */
-
-.autocomplete-tree {
-  -moz-appearance: none !important;
-  border: none !important;
-  background-color: transparent !important;
-}
-
-.autocomplete-treecol {
-  -moz-appearance: none !important;
-  margin: 0 !important;
-  border: none !important;
-  padding: 0 !important;
-}
-
-/* GTK calculates space for a sort arrow */
-.autocomplete-treecol > .treecol-sortdirection {
-  -moz-appearance: none !important;
-}
-
-.autocomplete-treebody::-moz-tree-cell-text {
-  padding-inline-start: 8px;
-}
-
-treechildren.autocomplete-treebody::-moz-tree-row(selected) {
- background-color: Highlight;
-}
-
-treechildren.autocomplete-treebody::-moz-tree-cell-text(selected) {
-  color: HighlightText !important;
-}
-
-.autocomplete-treebody::-moz-tree-image(treecolAutoCompleteValue) {
-  max-width: 16px;
-  height: 16px;
-}
-
 /* ::::: richlistbox autocomplete ::::: */
 
 .autocomplete-richlistbox {
   -moz-appearance: none;
   margin: 1px;
   background-color: transparent;
 }
 
--- a/toolkit/themes/linux/global/tree.css
+++ b/toolkit/themes/linux/global/tree.css
@@ -31,25 +31,25 @@ tree {
 /* ::::: tree rows ::::: */
 
 treechildren::-moz-tree-row {
   border: 1px solid transparent;
   min-height: 18px;
   height: 1.3em;
 }
 
-treechildren:not(.autocomplete-treebody)::-moz-tree-row(multicol, odd) {
+treechildren::-moz-tree-row(multicol, odd) {
   background-color: -moz-oddtreerow;
 }
 
-treechildren:not(.autocomplete-treebody)::-moz-tree-row(selected) {
+treechildren::-moz-tree-row(selected) {
   background-color: -moz-cellhighlight;
 }
 
-treechildren:not(.autocomplete-treebody)::-moz-tree-row(selected, focus) {
+treechildren::-moz-tree-row(selected, focus) {
   background-color: Highlight;
 }
 
 treechildren::-moz-tree-row(current, focus) {
   border: 1px dotted Highlight;
 }
 
 treechildren::-moz-tree-row(selected, current, focus) {
--- a/toolkit/themes/osx/global/autocomplete.css
+++ b/toolkit/themes/osx/global/autocomplete.css
@@ -6,66 +6,29 @@
 @namespace html url("http://www.w3.org/1999/xhtml");
 
 textbox[nomatch="true"][highlightnonmatches="true"] {
   color: red;
 }
 
 /* ::::: autocomplete popups ::::: */
 
-panel[type="autocomplete"],
 panel[type="autocomplete-richlistbox"],
 .autocomplete-history-popup {
   padding: 0px !important;
   color: -moz-FieldText;
   background-color: -moz-Field;
   font: icon;
   -moz-appearance: none;
 }
 
 .autocomplete-history-popup {
   max-height: 180px;
 }
 
-/* ::::: tree ::::: */
-
-.autocomplete-tree {
-  -moz-appearance: none !important;
-  border: none !important;
-  background-color: transparent !important;
-}
-
-.autocomplete-treecol {
-  -moz-appearance: none !important;
-  margin: 0 !important;
-  border: none !important;
-  padding: 0 !important;
-}
-
-.autocomplete-treebody::-moz-tree-cell-text {
-  padding-left: 2px;
-}
-
-.autocomplete-treebody::-moz-tree-row {
-  border-top: none;
-}
-
-treechildren.autocomplete-treebody::-moz-tree-row(selected) {
- background-color: Highlight;
-}
-
-treechildren.autocomplete-treebody::-moz-tree-cell-text(selected) {
-  color: HighlightText !important;
-}
-
-.autocomplete-treebody::-moz-tree-image(treecolAutoCompleteValue) {
-  max-width: 16px;
-  height: 16px;
-}
-
 /* ::::: richlistbox autocomplete ::::: */
 
 .autocomplete-richlistbox {
   -moz-appearance: none;
   margin: 0;
 }
 
 .ac-type-icon {
--- a/toolkit/themes/osx/global/tree.css
+++ b/toolkit/themes/osx/global/tree.css
@@ -26,25 +26,25 @@ tree {
 /* ::::: tree rows ::::: */
 
 treechildren::-moz-tree-row {
   border-top: 1px solid transparent;
   height: 18px;
   background-color: -moz-field;
 }
 
-treechildren:not(.autocomplete-treebody)::-moz-tree-row(multicol, odd) {
+treechildren::-moz-tree-row(multicol, odd) {
   background-color: -moz-oddtreerow;
 }
 
-treechildren:not(.autocomplete-treebody)::-moz-tree-row(selected) {
+treechildren::-moz-tree-row(selected) {
   background-color: -moz-mac-secondaryhighlight;
 }
 
-treechildren:not(.autocomplete-treebody)::-moz-tree-row(selected, focus) {
+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;
--- a/toolkit/themes/shared/in-content/common.inc.css
+++ b/toolkit/themes/shared/in-content/common.inc.css
@@ -854,20 +854,16 @@ xul|richlistbox:-moz-focusring {
 xul|listheader,
 xul|treecols {
   -moz-appearance: none;
   border: none;
   border-bottom: 1px solid var(--in-content-border-color);
   padding: 0;
 }
 
-.autocomplete-tree > xul|treecols {
-  border-bottom: none !important;
-}
-
 xul|treecol:not([hideheader="true"]),
 xul|treecolpicker {
   -moz-appearance: none;
   border: none;
   background-color: var(--in-content-box-background-hover);
   color: #808080;
   padding: 5px 10px;
 }
--- a/toolkit/themes/windows/global/autocomplete.css
+++ b/toolkit/themes/windows/global/autocomplete.css
@@ -12,66 +12,28 @@
 /* ::::: autocomplete ::::: */
 
 textbox[nomatch="true"][highlightnonmatches="true"] {
   color: red;
 }
 
 /* ::::: autocomplete popups ::::: */
 
-panel[type="autocomplete"],
 panel[type="autocomplete-richlistbox"],
 .autocomplete-history-popup {
   -moz-appearance: none;
   padding: 0;
   color: -moz-FieldText;
   background-color: -moz-Field;
 }
 
 .autocomplete-history-popup {
   max-height: 180px;
 }
 
-/* ::::: tree ::::: */
-
-.autocomplete-tree {
-  -moz-appearance: none !important;
-  border: none !important;
-  background-color: transparent !important;
-}
-
-.autocomplete-treecol {
-  -moz-appearance: none !important;
-  margin: 0 !important;
-  border: none !important;
-  padding: 0 !important;
-}
-
-/* GTK calculates space for a sort arrow */
-.autocomplete-treecol > .treecol-sortdirection {
-  -moz-appearance: none !important;
-}
-
-.autocomplete-treebody::-moz-tree-cell-text {
-  padding-inline-start: 8px;
-}
-
-treechildren.autocomplete-treebody::-moz-tree-row(selected) {
- background-color: Highlight;
-}
-
-treechildren.autocomplete-treebody::-moz-tree-cell-text(selected) {
-  color: HighlightText !important;
-}
-
-.autocomplete-treebody::-moz-tree-image(treecolAutoCompleteValue) {
-  max-width: 16px;
-  height: 16px;
-}
-
 /* ::::: richlistbox autocomplete ::::: */
 
 .autocomplete-richlistbox {
   -moz-appearance: none;
   margin: 0;
 }
 
 .autocomplete-richlistitem[selected] {
--- a/toolkit/themes/windows/global/tree.css
+++ b/toolkit/themes/windows/global/tree.css
@@ -392,83 +392,83 @@ treechildren::-moz-tree-cell-text(active
     --treechildren-hoverCurrentBorder: var(--treechildren-currentColor);
     --treechildren-hoverCurrentBottomBorder: var(--treechildren-currentColor);
     --treechildren-hoverCurrentImage: linear-gradient(rgba(131,183,249,.16), rgba(131,183,249,.16));
     --treechildren-hoverSelectedBorder: var(--treechildren-focusColor);
     --treechildren-hoverSelectedBottomBorder: var(--treechildren-focusColor);
     --treechildren-hoverSelectedImage: linear-gradient(rgb(205,232,255), rgb(205,232,255));
   }
 
-  treechildren:not(.autocomplete-treebody)::-moz-tree-row {
+  treechildren::-moz-tree-row {
     height: 1.8em;
     color: -moz-FieldText;
     margin-inline-start: 1px;
     margin-inline-end: 1px;
     border-width: 1px;
     border-color: transparent;
     background-repeat: no-repeat;
     background-size: 100% 100%;
   }
 
-  treechildren:not(.autocomplete-treebody)::-moz-tree-row(selected) {
+  treechildren::-moz-tree-row(selected) {
     -moz-border-top-colors: var(--treechildren-selectedBorder);
     -moz-border-right-colors: var(--treechildren-selectedBorder);
     -moz-border-left-colors: var(--treechildren-selectedBorder);
     -moz-border-bottom-colors: var(--treechildren-selectedBottomBorder);
     background-image: var(--treechildren-selectedImage);
     background-color: var(--treechildren-selectedBackground);
     outline: var(--treechildren-outline);
   }
 
-  treechildren:not(.autocomplete-treebody)::-moz-tree-row(current, focus) {
+  treechildren::-moz-tree-row(current, focus) {
     border-style: solid;
     -moz-border-top-colors: var(--treechildren-currentFocusBorder);
     -moz-border-right-colors: var(--treechildren-currentFocusBorder);
     -moz-border-left-colors: var(--treechildren-currentFocusBorder);
     -moz-border-bottom-colors: var(--treechildren-currentFocusBottomBorder);
     outline: var(--treechildren-outline);
   }
 
-  treechildren:not(.autocomplete-treebody)::-moz-tree-row(selected, focus),
+  treechildren::-moz-tree-row(selected, focus),
   treechildren::-moz-tree-row(dropOn) {
     -moz-border-top-colors: var(--treechildren-selectedFocusBorder);
     -moz-border-right-colors: var(--treechildren-selectedFocusBorder);
     -moz-border-left-colors: var(--treechildren-selectedFocusBorder);
     -moz-border-bottom-colors: var(--treechildren-selectedFocusBottomBorder);
     background-image: var(--treechildren-selectedFocusImage);
     background-color: var(--treechildren-selectedFocusBackground);
   }
 
-  treechildren:not(.autocomplete-treebody)::-moz-tree-row(selected, current, focus) {
+  treechildren::-moz-tree-row(selected, current, focus) {
     border-style: solid;
     -moz-border-top-colors: var(--treechildren-selectedFocusCurrentBorder);
     -moz-border-right-colors: var(--treechildren-selectedFocusCurrentBorder);
     -moz-border-left-colors: var(--treechildren-selectedFocusCurrentBorder);
     -moz-border-bottom-colors: var(--treechildren-selectedFocusCurrentBottomBorder);
     background-image: var(--treechildren-selectedFocusCurrentImage);
   }
 
-  treechildren:not(.autocomplete-treebody)::-moz-tree-row(hover) {
+  treechildren::-moz-tree-row(hover) {
     -moz-border-top-colors: var(--treechildren-hoverBorder);
     -moz-border-right-colors: var(--treechildren-hoverBorder);
     -moz-border-left-colors: var(--treechildren-hoverBorder);
     -moz-border-bottom-colors: var(--treechildren-hoverBottomBorder);
     background-image: var(--treechildren-hoverImage);
     outline: var(--treechildren-outline);
   }
 
-  treechildren:not(.autocomplete-treebody)::-moz-tree-row(hover, current) {
+  treechildren::-moz-tree-row(hover, current) {
     -moz-border-top-colors: var(--treechildren-hoverCurrentBorder);
     -moz-border-right-colors: var(--treechildren-hoverCurrentBorder);
     -moz-border-left-colors: var(--treechildren-hoverCurrentBorder);
     -moz-border-bottom-colors: var(--treechildren-hoverCurrentBottomBorder);
     background-image: var(--treechildren-hoverCurrentImage);
   }
 
-  treechildren:not(.autocomplete-treebody)::-moz-tree-row(hover, selected) {
+  treechildren::-moz-tree-row(hover, selected) {
     -moz-border-top-colors: var(--treechildren-hoverSelectedBorder);
     -moz-border-right-colors: var(--treechildren-hoverSelectedBorder);
     -moz-border-left-colors: var(--treechildren-hoverSelectedBorder);
     -moz-border-bottom-colors: var(--treechildren-hoverSelectedBottomBorder);
     background-image: var(--treechildren-hoverSelectedImage);
   }
 
   tree[disabled="true"] > treechildren::-moz-tree-row {
@@ -484,23 +484,23 @@ treechildren::-moz-tree-cell-text(active
     background-color: transparent;
     border-radius: 0;
   }
 
   treechildren::-moz-tree-cell-text(primary, dropOn) {
     color: -moz-FieldText;
   }
 
-  treechildren:not(.autocomplete-treebody)::-moz-tree-cell-text {
+  treechildren::-moz-tree-cell-text {
     padding-bottom: initial;
     border-color: transparent;
     background-color: transparent;
   }
 
-  treechildren:not(.autocomplete-treebody)::-moz-tree-cell-text(selected, focus) {
+  treechildren::-moz-tree-cell-text(selected, focus) {
     color: -moz-DialogText;
   }
 
   @media (-moz-os-version: windows-win7) {
     treechildren {
       --treechildren-outline: 1px solid var(--treechildren-2ndBorderColor);
       --treechildren-2ndBottomBorderColor: rgba(255,255,255,.6);
       --treechildren-selectedBorder: var(--treechildren-selectedColor) var(--treechildren-2ndBorderColor);
@@ -521,17 +521,17 @@ treechildren::-moz-tree-cell-text(active
       --treechildren-hoverCurrentBorder: var(--treechildren-currentColor) var(--treechildren-2ndBorderColor);
       --treechildren-hoverCurrentBottomBorder: var(--treechildren-currentColor) var(--treechildren-2ndBottomBorderColor);
       --treechildren-hoverCurrentImage: linear-gradient(rgba(131,183,249,.05), rgba(131,183,249,.16));
       --treechildren-hoverSelectedBorder: var(--treechildren-currentColor) var(--treechildren-2ndBorderColor);
       --treechildren-hoverSelectedBottomBorder: var(--treechildren-currentColor) var(--treechildren-2ndBottomBorderColor);
       --treechildren-hoverSelectedImage: linear-gradient(rgba(131,183,249,.28), rgba(131,183,249,.5));
     }
 
-    treechildren:not(.autocomplete-treebody)::-moz-tree-row {
+    treechildren::-moz-tree-row {
       border-width: 2px;
       border-radius: 3px;
       -moz-outline-radius: 3px;
     }
   }
 
   @media (-moz-os-version: windows-win8) {
     treechildren {