Bug 1348488 part 1 - Capitalize name of tree pseudo-elements to match other anonboxes. r?heycam draft
authorXidorn Quan <me@upsuper.org>
Mon, 10 Jul 2017 10:26:25 +1000
changeset 607561 5cc2e8be92b6b715e00fcbdfc5b7699b5dc214b8
parent 607269 3c8c1d7d2a657ac6d2e648320472b65592c3a59d
child 607562 e665d8f7ff81b72fe705da6beeb69855f4725499
push id68023
push userxquan@mozilla.com
push dateWed, 12 Jul 2017 11:06:11 +0000
reviewersheycam
bugs1348488
milestone56.0a1
Bug 1348488 part 1 - Capitalize name of tree pseudo-elements to match other anonboxes. r?heycam MozReview-Commit-ID: 5TRHwTwkY0O
layout/style/nsCSSAnonBoxList.h
layout/xul/tree/nsTreeBodyFrame.cpp
--- a/layout/style/nsCSSAnonBoxList.h
+++ b/layout/style/nsCSSAnonBoxList.h
@@ -98,28 +98,28 @@ CSS_ANON_BOX(anonymousGridItem, ":-moz-a
 
 CSS_ANON_BOX(ruby, ":-moz-ruby", false)
 CSS_ANON_BOX(rubyBase, ":-moz-ruby-base", false)
 CSS_ANON_BOX(rubyBaseContainer, ":-moz-ruby-base-container", false)
 CSS_ANON_BOX(rubyText, ":-moz-ruby-text", false)
 CSS_ANON_BOX(rubyTextContainer, ":-moz-ruby-text-container", false)
 
 #ifdef MOZ_XUL
-CSS_ANON_BOX(moztreecolumn, ":-moz-tree-column", false)
-CSS_ANON_BOX(moztreerow, ":-moz-tree-row", false)
-CSS_ANON_BOX(moztreeseparator, ":-moz-tree-separator", false)
-CSS_ANON_BOX(moztreecell, ":-moz-tree-cell", false)
-CSS_ANON_BOX(moztreeindentation, ":-moz-tree-indentation", false)
-CSS_ANON_BOX(moztreeline, ":-moz-tree-line", false)
-CSS_ANON_BOX(moztreetwisty, ":-moz-tree-twisty", false)
-CSS_ANON_BOX(moztreeimage, ":-moz-tree-image", false)
-CSS_ANON_BOX(moztreecelltext, ":-moz-tree-cell-text", false)
-CSS_ANON_BOX(moztreecheckbox, ":-moz-tree-checkbox", false)
-CSS_ANON_BOX(moztreeprogressmeter, ":-moz-tree-progressmeter", false)
-CSS_ANON_BOX(moztreedropfeedback, ":-moz-tree-drop-feedback", false)
+CSS_ANON_BOX(mozTreeColumn, ":-moz-tree-column", false)
+CSS_ANON_BOX(mozTreeRow, ":-moz-tree-row", false)
+CSS_ANON_BOX(mozTreeSeparator, ":-moz-tree-separator", false)
+CSS_ANON_BOX(mozTreeCell, ":-moz-tree-cell", false)
+CSS_ANON_BOX(mozTreeIndentation, ":-moz-tree-indentation", false)
+CSS_ANON_BOX(mozTreeLine, ":-moz-tree-line", false)
+CSS_ANON_BOX(mozTreeTwisty, ":-moz-tree-twisty", false)
+CSS_ANON_BOX(mozTreeImage, ":-moz-tree-image", false)
+CSS_ANON_BOX(mozTreeCellText, ":-moz-tree-cell-text", false)
+CSS_ANON_BOX(mozTreeCheckbox, ":-moz-tree-checkbox", false)
+CSS_ANON_BOX(mozTreeProgressmeter, ":-moz-tree-progressmeter", false)
+CSS_ANON_BOX(mozTreeDropFeedback, ":-moz-tree-drop-feedback", false)
 #endif
 
 CSS_ANON_BOX(mozSVGMarkerAnonChild, ":-moz-svg-marker-anon-child", false)
 CSS_ANON_BOX(mozSVGOuterSVGAnonChild, ":-moz-svg-outer-svg-anon-child", false)
 CSS_ANON_BOX(mozSVGForeignContent, ":-moz-svg-foreign-content", false)
 CSS_ANON_BOX(mozSVGText, ":-moz-svg-text", false)
 
 #ifdef DEFINED_CSS_NON_INHERITING_ANON_BOX
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -234,17 +234,17 @@ nscoord
 nsTreeBodyFrame::CalcMaxRowWidth()
 {
   if (mStringWidth != -1)
     return mStringWidth;
 
   if (!mView)
     return 0;
 
-  nsStyleContext* rowContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreerow);
+  nsStyleContext* rowContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeRow);
   nsMargin rowMargin(0,0,0,0);
   GetBorderPadding(rowContext, rowMargin);
 
   nscoord rowWidth;
   nsTreeColumn* col;
 
   RefPtr<gfxContext> rc =
     PresContext()->PresShell()->CreateReferenceRenderingContext();
@@ -1057,23 +1057,23 @@ nsTreeBodyFrame::GetCellAt(int32_t aX, i
   }
 
   nsTreeColumn* col;
   nsICSSAnonBoxPseudo* child;
   GetCellAt(point.x, point.y, aRow, &col, &child);
 
   if (col) {
     NS_ADDREF(*aCol = col);
-    if (child == nsCSSAnonBoxes::moztreecell)
+    if (child == nsCSSAnonBoxes::mozTreeCell)
       aChildElt.AssignLiteral("cell");
-    else if (child == nsCSSAnonBoxes::moztreetwisty)
+    else if (child == nsCSSAnonBoxes::mozTreeTwisty)
       aChildElt.AssignLiteral("twisty");
-    else if (child == nsCSSAnonBoxes::moztreeimage)
+    else if (child == nsCSSAnonBoxes::mozTreeImage)
       aChildElt.AssignLiteral("image");
-    else if (child == nsCSSAnonBoxes::moztreecelltext)
+    else if (child == nsCSSAnonBoxes::mozTreeCellText)
       aChildElt.AssignLiteral("text");
   }
 
   return NS_OK;
 }
 
 
 //
@@ -1135,24 +1135,24 @@ nsTreeBodyFrame::GetCoordsForCellItem(in
     }
     // Now obtain the properties for our cell.
     PrefillPropertyArray(aRow, currCol);
 
     nsAutoString properties;
     mView->GetCellProperties(aRow, currCol, properties);
     nsTreeUtils::TokenizeProperties(properties, mScratchArray);
 
-    nsStyleContext* rowContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreerow);
+    nsStyleContext* rowContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeRow);
 
     // We don't want to consider any of the decorations that may be present
     // on the current row, so we have to deflate the rect by the border and
     // padding and offset its left and top coordinates appropriately.
     AdjustForBorderPadding(rowContext, cellRect);
 
-    nsStyleContext* cellContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreecell);
+    nsStyleContext* cellContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeCell);
 
     NS_NAMED_LITERAL_CSTRING(cell, "cell");
     if (currCol->IsCycler() || cell.Equals(aElement)) {
       // If the current Column is a Cycler, then the Rect is just the cell - the margins.
       // Similarly, if we're just being asked for the cell rect, provide it.
 
       theRect = cellRect;
       nsMargin cellMargin;
@@ -1185,17 +1185,17 @@ nsTreeBodyFrame::GetCoordsForCellItem(in
       mView->GetLevel(aRow, &level);
       if (!isRTL)
         cellX += mIndentation * level;
       remainWidth -= mIndentation * level;
 
       // Find the twisty rect by computing its size.
       nsRect imageRect;
       nsRect twistyRect(cellRect);
-      nsStyleContext* twistyContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreetwisty);
+      nsStyleContext* twistyContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeTwisty);
       GetTwistyRect(aRow, currCol, imageRect, twistyRect, presContext,
                     twistyContext);
 
       if (NS_LITERAL_CSTRING("twisty").Equals(aElement)) {
         // If we're looking for the twisty Rect, just return the size
         theRect = twistyRect;
         break;
       }
@@ -1208,17 +1208,17 @@ nsTreeBodyFrame::GetCoordsForCellItem(in
 
       // Adjust our working X value with the twisty width (image size, margins,
       // borders, padding.
       if (!isRTL)
         cellX += twistyRect.width;
     }
 
     // Cell Image
-    nsStyleContext* imageContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreeimage);
+    nsStyleContext* imageContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeImage);
 
     nsRect imageSize = GetImageSize(aRow, currCol, false, imageContext);
     if (NS_LITERAL_CSTRING("image").Equals(aElement)) {
       theRect = imageSize;
       theRect.x = cellX;
       theRect.y = cellRect.y;
       break;
     }
@@ -1244,17 +1244,17 @@ nsTreeBodyFrame::GetCoordsForCellItem(in
     // remaining width we have left to traverse in the cell, which will be the
     // widest possible value for the text rect, and the row height.
     nsRect textRect(cellX, cellRect.y, remainWidth, cellRect.height);
 
     // Measure the width of the text. If the width of the text is greater than
     // the remaining width available, then we just assume that the text has
     // been cropped and use the remaining rect as the text Rect. Otherwise,
     // we add in borders and padding to the text dimension and give that back.
-    nsStyleContext* textContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreecelltext);
+    nsStyleContext* textContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeCellText);
 
     RefPtr<nsFontMetrics> fm =
       nsLayoutUtils::GetFontMetricsForStyleContext(textContext);
     nscoord height = fm->MaxHeight();
 
     nsMargin textMargin;
     textContext->StyleMargin()->GetMargin(textMargin);
     textRect.Deflate(textMargin);
@@ -1493,31 +1493,31 @@ nsTreeBodyFrame::GetItemWithinCellAt(nsc
 
   // Obtain the properties for our cell.
   PrefillPropertyArray(aRowIndex, aColumn);
   nsAutoString properties;
   mView->GetCellProperties(aRowIndex, aColumn, properties);
   nsTreeUtils::TokenizeProperties(properties, mScratchArray);
 
   // Resolve style for the cell.
-  nsStyleContext* cellContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreecell);
+  nsStyleContext* cellContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeCell);
 
   // Obtain the margins for the cell and then deflate our rect by that
   // amount.  The cell is assumed to be contained within the deflated rect.
   nsRect cellRect(aCellRect);
   nsMargin cellMargin;
   cellContext->StyleMargin()->GetMargin(cellMargin);
   cellRect.Deflate(cellMargin);
 
   // Adjust the rect for its border and padding.
   AdjustForBorderPadding(cellContext, cellRect);
 
   if (aX < cellRect.x || aX >= cellRect.x + cellRect.width) {
     // The user clicked within the cell's margins/borders/padding.  This constitutes a click on the cell.
-    return nsCSSAnonBoxes::moztreecell;
+    return nsCSSAnonBoxes::mozTreeCell;
   }
 
   nscoord currX = cellRect.x;
   nscoord remainingWidth = cellRect.width;
 
   // Handle right alignment hit testing.
   bool isRTL = StyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL;
 
@@ -1532,33 +1532,33 @@ nsTreeBodyFrame::GetItemWithinCellAt(nsc
 
     if (!isRTL)
       currX += mIndentation*level;
     remainingWidth -= mIndentation*level;
 
     if ((isRTL && aX > currX + remainingWidth) ||
         (!isRTL && aX < currX)) {
       // The user clicked within the indentation.
-      return nsCSSAnonBoxes::moztreecell;
+      return nsCSSAnonBoxes::mozTreeCell;
     }
 
     // Always leave space for the twisty.
     nsRect twistyRect(currX, cellRect.y, remainingWidth, cellRect.height);
     bool hasTwisty = false;
     bool isContainer = false;
     mView->IsContainer(aRowIndex, &isContainer);
     if (isContainer) {
       bool isContainerEmpty = false;
       mView->IsContainerEmpty(aRowIndex, &isContainerEmpty);
       if (!isContainerEmpty)
         hasTwisty = true;
     }
 
     // Resolve style for the twisty.
-    nsStyleContext* twistyContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreetwisty);
+    nsStyleContext* twistyContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeTwisty);
 
     nsRect imageSize;
     GetTwistyRect(aRowIndex, aColumn, imageSize, twistyRect, presContext,
                   twistyContext);
 
     // We will treat a click as hitting the twisty if it happens on the margins, borders, padding,
     // or content of the twisty object.  By allowing a "slop" into the margin, we make it a little
     // bit easier for a user to hit the twisty.  (We don't want to be too picky here.)
@@ -1568,73 +1568,73 @@ nsTreeBodyFrame::GetItemWithinCellAt(nsc
     if (isRTL)
       twistyRect.x = currX + remainingWidth - twistyRect.width;
 
     // Now we test to see if aX is actually within the twistyRect.  If it is, and if the item should
     // have a twisty, then we return "twisty".  If it is within the rect but we shouldn't have a twisty,
     // then we return "cell".
     if (aX >= twistyRect.x && aX < twistyRect.x + twistyRect.width) {
       if (hasTwisty)
-        return nsCSSAnonBoxes::moztreetwisty;
+        return nsCSSAnonBoxes::mozTreeTwisty;
       else
-        return nsCSSAnonBoxes::moztreecell;
+        return nsCSSAnonBoxes::mozTreeCell;
     }
 
     if (!isRTL)
       currX += twistyRect.width;
     remainingWidth -= twistyRect.width;
   }
 
   // Now test to see if the user hit the icon for the cell.
   nsRect iconRect(currX, cellRect.y, remainingWidth, cellRect.height);
 
   // Resolve style for the image.
-  nsStyleContext* imageContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreeimage);
+  nsStyleContext* imageContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeImage);
 
   nsRect iconSize = GetImageSize(aRowIndex, aColumn, false, imageContext);
   nsMargin imageMargin;
   imageContext->StyleMargin()->GetMargin(imageMargin);
   iconSize.Inflate(imageMargin);
   iconRect.width = iconSize.width;
   if (isRTL)
     iconRect.x = currX + remainingWidth - iconRect.width;
 
   if (aX >= iconRect.x && aX < iconRect.x + iconRect.width) {
     // The user clicked on the image.
-    return nsCSSAnonBoxes::moztreeimage;
+    return nsCSSAnonBoxes::mozTreeImage;
   }
 
   if (!isRTL)
     currX += iconRect.width;
   remainingWidth -= iconRect.width;
 
   nsAutoString cellText;
   mView->GetCellText(aRowIndex, aColumn, cellText);
   // We're going to measure this text so we need to ensure bidi is enabled if
   // necessary
   CheckTextForBidi(cellText);
 
   nsRect textRect(currX, cellRect.y, remainingWidth, cellRect.height);
 
-  nsStyleContext* textContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreecelltext);
+  nsStyleContext* textContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeCellText);
 
   nsMargin textMargin;
   textContext->StyleMargin()->GetMargin(textMargin);
   textRect.Deflate(textMargin);
 
   AdjustForBorderPadding(textContext, textRect);
 
   RefPtr<nsFontMetrics> fm =
     nsLayoutUtils::GetFontMetricsForStyleContext(textContext);
   AdjustForCellText(cellText, aRowIndex, aColumn, *rc, *fm, textRect);
 
   if (aX >= textRect.x && aX < textRect.x + textRect.width)
-    return nsCSSAnonBoxes::moztreecelltext;
+    return nsCSSAnonBoxes::mozTreeCellText;
   else
-    return nsCSSAnonBoxes::moztreecell;
+    return nsCSSAnonBoxes::mozTreeCell;
 }
 
 void
 nsTreeBodyFrame::GetCellAt(nscoord aX, nscoord aY, int32_t* aRow,
                            nsTreeColumn** aCol,
                            nsICSSAnonBoxPseudo** aChildElt)
 {
   *aCol = nullptr;
@@ -1662,17 +1662,17 @@ nsTreeBodyFrame::GetCellAt(nscoord aX, n
       continue;
 
     if (aX >= cellRect.x && aX < cellRect.x + cellRect.width) {
       // We know the column hit now.
       *aCol = currCol;
 
       if (currCol->IsCycler())
         // Cyclers contain only images.  Fill this in immediately and return.
-        *aChildElt = nsCSSAnonBoxes::moztreeimage;
+        *aChildElt = nsCSSAnonBoxes::mozTreeImage;
       else
         *aChildElt = GetItemWithinCellAt(aX, cellRect, *aRow, currCol);
       break;
     }
   }
 }
 
 nsresult
@@ -1690,49 +1690,49 @@ nsTreeBodyFrame::GetCellWidth(int32_t aR
 
   nsRect cellRect(0, 0, colWidth, mRowHeight);
 
   int32_t overflow = cellRect.x+cellRect.width-(mInnerBox.x+mInnerBox.width);
   if (overflow > 0)
     cellRect.width -= overflow;
 
   // Adjust borders and padding for the cell.
-  nsStyleContext* cellContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreecell);
+  nsStyleContext* cellContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeCell);
   nsMargin bp(0,0,0,0);
   GetBorderPadding(cellContext, bp);
 
   aCurrentSize = cellRect.width;
   aDesiredSize = bp.left + bp.right;
 
   if (aCol->IsPrimary()) {
     // If the current Column is a Primary, then we need to take into account
     // the indentation and possibly a twisty.
 
     // The amount of indentation is the indentation width (|mIndentation|) by the level.
     int32_t level;
     mView->GetLevel(aRow, &level);
     aDesiredSize += mIndentation * level;
 
     // Find the twisty rect by computing its size.
-    nsStyleContext* twistyContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreetwisty);
+    nsStyleContext* twistyContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeTwisty);
 
     nsRect imageSize;
     nsRect twistyRect(cellRect);
     GetTwistyRect(aRow, aCol, imageSize, twistyRect, PresContext(),
                   twistyContext);
 
     // Add in the margins of the twisty element.
     nsMargin twistyMargin;
     twistyContext->StyleMargin()->GetMargin(twistyMargin);
     twistyRect.Inflate(twistyMargin);
 
     aDesiredSize += twistyRect.width;
   }
 
-  nsStyleContext* imageContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreeimage);
+  nsStyleContext* imageContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeImage);
 
   // Account for the width of the cell image.
   nsRect imageSize = GetImageSize(aRow, aCol, false, imageContext);
   // Add in the margins of the cell image.
   nsMargin imageMargin;
   imageContext->StyleMargin()->GetMargin(imageMargin);
   imageSize.Inflate(imageMargin);
 
@@ -1740,17 +1740,17 @@ nsTreeBodyFrame::GetCellWidth(int32_t aR
 
   // Get the cell text.
   nsAutoString cellText;
   mView->GetCellText(aRow, aCol, cellText);
   // We're going to measure this text so we need to ensure bidi is enabled if
   // necessary
   CheckTextForBidi(cellText);
 
-  nsStyleContext* textContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreecelltext);
+  nsStyleContext* textContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeCellText);
 
   // Get the borders and padding for the text.
   GetBorderPadding(textContext, bp);
 
   RefPtr<nsFontMetrics> fm =
     nsLayoutUtils::GetFontMetricsForStyleContext(textContext);
   // Get the width of the text itself
   nscoord width = nsLayoutUtils::AppUnitWidthOfStringBidi(cellText, this, *fm,
@@ -2430,17 +2430,17 @@ nsTreeBodyFrame::GetImageSourceRect(nsSt
   return r;
 }
 
 int32_t nsTreeBodyFrame::GetRowHeight()
 {
   // Look up the correct height.  It is equal to the specified height
   // + the specified margins.
   mScratchArray.Clear();
-  nsStyleContext* rowContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreerow);
+  nsStyleContext* rowContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeRow);
   if (rowContext) {
     const nsStylePosition* myPosition = rowContext->StylePosition();
 
     nscoord minHeight = 0;
     if (myPosition->mMinHeight.GetUnit() == eStyleUnit_Coord)
       minHeight = myPosition->mMinHeight.GetCoordValue();
 
     nscoord height = 0;
@@ -2468,17 +2468,17 @@ int32_t nsTreeBodyFrame::GetRowHeight()
 
   return nsPresContext::CSSPixelsToAppUnits(18); // As good a default as any.
 }
 
 int32_t nsTreeBodyFrame::GetIndentation()
 {
   // Look up the correct indentation.  It is equal to the specified indentation width.
   mScratchArray.Clear();
-  nsStyleContext* indentContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreeindentation);
+  nsStyleContext* indentContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeIndentation);
   if (indentContext) {
     const nsStylePosition* myPosition = indentContext->StylePosition();
     if (myPosition->mWidth.GetUnit() == eStyleUnit_Coord)  {
       nscoord val = myPosition->mWidth.GetCoordValue();
       return val;
     }
   }
 
@@ -2871,17 +2871,17 @@ nsTreeBodyFrame::BuildDisplayList(nsDisp
       bool isSelected;
       selection->IsSelected(i, &isSelected);
       if (isSelected) {
         PrefillPropertyArray(i, nullptr);
         nsAutoString properties;
         mView->GetRowProperties(i, properties);
         nsTreeUtils::TokenizeProperties(properties, mScratchArray);
         nsStyleContext* rowContext =
-          GetPseudoStyleContext(nsCSSAnonBoxes::moztreerow);
+          GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeRow);
         auto appearance = rowContext->StyleDisplay()->mAppearance;
         if (appearance) {
           if (theme->ThemeSupportsWidget(PresContext(), this, appearance)) {
             nsITheme::ThemeGeometryType type =
               theme->ThemeGeometryTypeForWidget(this, appearance);
             if (type != nsITheme::eThemeGeometryTypeUnknown) {
               nsRect rowRect(mInnerBox.x, mInnerBox.y + mRowHeight *
                              (i - FirstVisibleRow()), mInnerBox.width,
@@ -2998,17 +2998,17 @@ nsTreeBodyFrame::PaintColumn(nsTreeColum
   // Now obtain the properties for our cell.
   PrefillPropertyArray(-1, aColumn);
   nsAutoString properties;
   mView->GetColumnProperties(aColumn, properties);
   nsTreeUtils::TokenizeProperties(properties, mScratchArray);
 
   // Resolve style for the column.  It contains all the info we need to lay ourselves
   // out and to paint.
-  nsStyleContext* colContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreecolumn);
+  nsStyleContext* colContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeColumn);
 
   // Obtain the margins for the cell and then deflate our rect by that
   // amount.  The cell is assumed to be contained within the deflated rect.
   nsRect colRect(aColumnRect);
   nsMargin colMargin;
   colContext->StyleMargin()->GetMargin(colMargin);
   colRect.Deflate(colMargin);
 
@@ -3040,17 +3040,17 @@ nsTreeBodyFrame::PaintRow(int32_t       
   PrefillPropertyArray(aRowIndex, nullptr);
 
   nsAutoString properties;
   mView->GetRowProperties(aRowIndex, properties);
   nsTreeUtils::TokenizeProperties(properties, mScratchArray);
 
   // Resolve style for the row.  It contains all the info we need to lay ourselves
   // out and to paint.
-  nsStyleContext* rowContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreerow);
+  nsStyleContext* rowContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeRow);
 
   // Obtain the margins for the row and then deflate our rect by that
   // amount.  The row is assumed to be contained within the deflated rect.
   nsRect rowRect(aRowRect);
   nsMargin rowMargin;
   rowContext->StyleMargin()->GetMargin(rowMargin);
   rowRect.Deflate(rowMargin);
 
@@ -3192,17 +3192,17 @@ nsTreeBodyFrame::PaintRow(int32_t       
 DrawResult
 nsTreeBodyFrame::PaintSeparator(int32_t              aRowIndex,
                                 const nsRect&        aSeparatorRect,
                                 nsPresContext*      aPresContext,
                                 gfxContext&          aRenderingContext,
                                 const nsRect&        aDirtyRect)
 {
   // Resolve style for the separator.
-  nsStyleContext* separatorContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreeseparator);
+  nsStyleContext* separatorContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeSeparator);
   bool useTheme = false;
   nsITheme *theme = nullptr;
   const nsStyleDisplay* displayData = separatorContext->StyleDisplay();
   if ( displayData->mAppearance ) {
     theme = aPresContext->GetTheme();
     if (theme && theme->ThemeSupportsWidget(aPresContext, nullptr, displayData->mAppearance))
       useTheme = true;
   }
@@ -3263,17 +3263,17 @@ nsTreeBodyFrame::PaintCell(int32_t      
   // XXX Automatically fill in the following props: open, closed, container, leaf, selected, focused, and the col ID.
   PrefillPropertyArray(aRowIndex, aColumn);
   nsAutoString properties;
   mView->GetCellProperties(aRowIndex, aColumn, properties);
   nsTreeUtils::TokenizeProperties(properties, mScratchArray);
 
   // Resolve style for the cell.  It contains all the info we need to lay ourselves
   // out and to paint.
-  nsStyleContext* cellContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreecell);
+  nsStyleContext* cellContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeCell);
 
   bool isRTL = StyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL;
 
   // Obtain the margins for the cell and then deflate our rect by that
   // amount.  The cell is assumed to be contained within the deflated rect.
   nsRect cellRect(aCellRect);
   nsMargin cellMargin;
   cellContext->StyleMargin()->GetMargin(cellMargin);
@@ -3302,26 +3302,26 @@ nsTreeBodyFrame::PaintCell(int32_t      
     int32_t level;
     mView->GetLevel(aRowIndex, &level);
 
     if (!isRTL)
       currX += mIndentation * level;
     remainingWidth -= mIndentation * level;
 
     // Resolve the style to use for the connecting lines.
-    nsStyleContext* lineContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreeline);
+    nsStyleContext* lineContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeLine);
 
     if (mIndentation && level &&
         lineContext->StyleVisibility()->IsVisibleOrCollapsed()) {
       // Paint the thread lines.
 
       // Get the size of the twisty. We don't want to paint the twisty
       // before painting of connecting lines since it would paint lines over
       // the twisty. But we need to leave a place for it.
-      nsStyleContext* twistyContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreetwisty);
+      nsStyleContext* twistyContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeTwisty);
 
       nsRect imageSize;
       nsRect twistyRect(aCellRect);
       GetTwistyRect(aRowIndex, aColumn, imageSize, twistyRect, aPresContext,
                     twistyContext);
 
       nsMargin twistyMargin;
       twistyContext->StyleMargin()->GetMargin(twistyMargin);
@@ -3476,17 +3476,17 @@ nsTreeBodyFrame::PaintTwisty(int32_t    
   if (isContainer) {
     bool isContainerEmpty = false;
     mView->IsContainerEmpty(aRowIndex, &isContainerEmpty);
     if (!isContainerEmpty)
       shouldPaint = true;
   }
 
   // Resolve style for the twisty.
-  nsStyleContext* twistyContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreetwisty);
+  nsStyleContext* twistyContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeTwisty);
 
   // Obtain the margins for the twisty and then deflate our rect by that
   // amount.  The twisty is assumed to be contained within the deflated rect.
   nsRect twistyRect(aTwistyRect);
   nsMargin twistyMargin;
   twistyContext->StyleMargin()->GetMargin(twistyMargin);
   twistyRect.Deflate(twistyMargin);
 
@@ -3567,17 +3567,17 @@ nsTreeBodyFrame::PaintImage(int32_t     
                             nscoord&              aCurrX,
                             nsDisplayListBuilder* aBuilder)
 {
   NS_PRECONDITION(aColumn && aColumn->GetFrame(), "invalid column passed");
 
   bool isRTL = StyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL;
   nscoord rightEdge = aCurrX + aRemainingWidth;
   // Resolve style for the image.
-  nsStyleContext* imageContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreeimage);
+  nsStyleContext* imageContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeImage);
 
   // Obtain opacity value for the image.
   float opacity = imageContext->StyleEffects()->mOpacity;
 
   // Obtain the margins for the image and then deflate our rect by that
   // amount.  The image is assumed to be contained within the deflated rect.
   nsRect imageRect(aImageRect);
   nsMargin imageMargin;
@@ -3772,17 +3772,17 @@ nsTreeBodyFrame::PaintText(int32_t      
     return result;
   }
 
   int32_t appUnitsPerDevPixel = PresContext()->AppUnitsPerDevPixel();
   DrawTarget* drawTarget = aRenderingContext.GetDrawTarget();
 
   // Resolve style for the text.  It contains all the info we need to lay ourselves
   // out and to paint.
-  nsStyleContext* textContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreecelltext);
+  nsStyleContext* textContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeCellText);
 
   // Obtain opacity value for the image.
   float opacity = textContext->StyleEffects()->mOpacity;
 
   // Obtain the margins for the text and then deflate our rect by that
   // amount.  The text is assumed to be contained within the deflated rect.
   nsRect textRect(aTextRect);
   nsMargin textMargin;
@@ -3848,17 +3848,17 @@ nsTreeBodyFrame::PaintText(int32_t      
   }
   if (decorations & NS_STYLE_TEXT_DECORATION_LINE_LINE_THROUGH) {
     fontMet->GetStrikeout(offset, size);
     nsRect r(textRect.x, textRect.y + baseline - offset, textRect.width, size);
     Rect devPxRect =
       NSRectToSnappedRect(r, appUnitsPerDevPixel, *drawTarget);
     drawTarget->FillRect(devPxRect, color);
   }
-  nsStyleContext* cellContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreecell);
+  nsStyleContext* cellContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeCell);
 
   if (opacity != 1.0f) {
     aRenderingContext.PushGroupForBlendBack(gfxContentType::COLOR_ALPHA, opacity);
   }
 
   aRenderingContext.SetColor(Color::FromABGR(textContext->StyleColor()->mColor));
   nsLayoutUtils::DrawString(this, *fontMet, &aRenderingContext, text.get(),
                             text.Length(),
@@ -3881,17 +3881,17 @@ nsTreeBodyFrame::PaintCheckbox(int32_t  
                                const nsRect&        aCheckboxRect,
                                nsPresContext*      aPresContext,
                                gfxContext&          aRenderingContext,
                                const nsRect&        aDirtyRect)
 {
   NS_PRECONDITION(aColumn && aColumn->GetFrame(), "invalid column passed");
 
   // Resolve style for the checkbox.
-  nsStyleContext* checkboxContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreecheckbox);
+  nsStyleContext* checkboxContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeCheckbox);
 
   nscoord rightEdge = aCheckboxRect.XMost();
 
   // Obtain the margins for the checkbox and then deflate our rect by that
   // amount.  The checkbox is assumed to be contained within the deflated rect.
   nsRect checkboxRect(aCheckboxRect);
   nsMargin checkboxMargin;
   checkboxContext->StyleMargin()->GetMargin(checkboxMargin);
@@ -3952,17 +3952,17 @@ nsTreeBodyFrame::PaintProgressMeter(int3
                                     gfxContext&           aRenderingContext,
                                     const nsRect&         aDirtyRect,
                                     nsDisplayListBuilder* aBuilder)
 {
   NS_PRECONDITION(aColumn && aColumn->GetFrame(), "invalid column passed");
 
   // Resolve style for the progress meter.  It contains all the info we need
   // to lay ourselves out and to paint.
-  nsStyleContext* meterContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreeprogressmeter);
+  nsStyleContext* meterContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeProgressmeter);
 
   // Obtain the margins for the progress meter and then deflate our rect by that
   // amount. The progress meter is assumed to be contained within the deflated
   // rect.
   nsRect meterRect(aProgressMeterRect);
   nsMargin meterMargin;
   meterContext->StyleMargin()->GetMargin(meterMargin);
   meterRect.Deflate(meterMargin);
@@ -4072,17 +4072,17 @@ nsTreeBodyFrame::PaintDropFeedback(const
     currX += aPt.x - mHorzPosition;
   } else {
     currX = aDropFeedbackRect.x;
   }
 
   PrefillPropertyArray(mSlots->mDropRow, primaryCol);
 
   // Resolve the style to use for the drop feedback.
-  nsStyleContext* feedbackContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreedropfeedback);
+  nsStyleContext* feedbackContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeDropFeedback);
 
   DrawResult result = DrawResult::SUCCESS;
 
   // Paint only if it is visible.
   if (feedbackContext->StyleVisibility()->IsVisibleOrCollapsed()) {
     int32_t level;
     mView->GetLevel(mSlots->mDropRow, &level);
 
@@ -4103,17 +4103,17 @@ nsTreeBodyFrame::PaintDropFeedback(const
         if (nextLevel > level)
           level = nextLevel;
       }
     }
 
     currX += mIndentation * level;
 
     if (primaryCol){
-      nsStyleContext* twistyContext = GetPseudoStyleContext(nsCSSAnonBoxes::moztreetwisty);
+      nsStyleContext* twistyContext = GetPseudoStyleContext(nsCSSAnonBoxes::mozTreeTwisty);
       nsRect imageSize;
       nsRect twistyRect;
       GetTwistyRect(mSlots->mDropRow, primaryCol, imageSize, twistyRect,
                     aPresContext, twistyContext);
       nsMargin twistyMargin;
       twistyContext->StyleMargin()->GetMargin(twistyMargin);
       twistyRect.Inflate(twistyMargin);
       currX += twistyRect.width;