Bug 1470920 - Remove support for ::-moz-tree-line. r=smaug
MozReview-Commit-ID: GHde9Xb2e99
--- a/layout/style/nsCSSAnonBoxList.h
+++ b/layout/style/nsCSSAnonBoxList.h
@@ -128,17 +128,16 @@ CSS_WRAPPER_ANON_BOX(rubyText, ":-moz-ru
CSS_WRAPPER_ANON_BOX(rubyTextContainer, ":-moz-ruby-text-container")
#ifdef MOZ_XUL
CSS_ANON_BOX(mozTreeColumn, ":-moz-tree-column")
CSS_ANON_BOX(mozTreeRow, ":-moz-tree-row")
CSS_ANON_BOX(mozTreeSeparator, ":-moz-tree-separator")
CSS_ANON_BOX(mozTreeCell, ":-moz-tree-cell")
CSS_ANON_BOX(mozTreeIndentation, ":-moz-tree-indentation")
-CSS_ANON_BOX(mozTreeLine, ":-moz-tree-line")
CSS_ANON_BOX(mozTreeTwisty, ":-moz-tree-twisty")
CSS_ANON_BOX(mozTreeImage, ":-moz-tree-image")
CSS_ANON_BOX(mozTreeCellText, ":-moz-tree-cell-text")
CSS_ANON_BOX(mozTreeCheckbox, ":-moz-tree-checkbox")
CSS_ANON_BOX(mozTreeDropFeedback, ":-moz-tree-drop-feedback")
#endif
CSS_ANON_BOX(mozSVGMarkerAnonChild, ":-moz-svg-marker-anon-child")
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -3232,101 +3232,16 @@ 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.
- ComputedStyle* lineContext = GetPseudoComputedStyle(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.
- ComputedStyle* twistyContext = GetPseudoComputedStyle(nsCSSAnonBoxes::mozTreeTwisty);
-
- nsRect imageSize;
- nsRect twistyRect(aCellRect);
- GetTwistyRect(aRowIndex, aColumn, imageSize, twistyRect, aPresContext,
- twistyContext);
-
- nsMargin twistyMargin;
- twistyContext->StyleMargin()->GetMargin(twistyMargin);
- twistyRect.Inflate(twistyMargin);
-
- const nsStyleBorder* borderStyle = lineContext->StyleBorder();
- // Resolve currentcolor values against the treeline context
- nscolor color = borderStyle->mBorderLeftColor.CalcColor(lineContext);
- ColorPattern colorPatt(ToDeviceColor(color));
-
- uint8_t style = borderStyle->GetBorderStyle(eSideLeft);
- StrokeOptions strokeOptions;
- nsLayoutUtils::InitDashPattern(strokeOptions, style);
-
- nscoord srcX = currX + twistyRect.width - mIndentation / 2;
- nscoord lineY = (aRowIndex - mTopRowIndex) * mRowHeight + aPt.y;
-
- DrawTarget* drawTarget = aRenderingContext.GetDrawTarget();
- nsPresContext* pc = PresContext();
-
- // Don't paint off our cell.
- if (srcX <= cellRect.x + cellRect.width) {
- nscoord destX = currX + twistyRect.width;
- if (destX > cellRect.x + cellRect.width)
- destX = cellRect.x + cellRect.width;
- if (isRTL) {
- srcX = currX + remainingWidth - (srcX - cellRect.x);
- destX = currX + remainingWidth - (destX - cellRect.x);
- }
- Point p1(pc->AppUnitsToGfxUnits(srcX),
- pc->AppUnitsToGfxUnits(lineY + mRowHeight / 2));
- Point p2(pc->AppUnitsToGfxUnits(destX),
- pc->AppUnitsToGfxUnits(lineY + mRowHeight / 2));
- SnapLineToDevicePixelsForStroking(p1, p2, *drawTarget,
- strokeOptions.mLineWidth);
- drawTarget->StrokeLine(p1, p2, colorPatt, strokeOptions);
- }
-
- int32_t currentParent = aRowIndex;
- for (int32_t i = level; i > 0; i--) {
- if (srcX <= cellRect.x + cellRect.width) {
- // Paint full vertical line only if we have next sibling.
- bool hasNextSibling;
- mView->HasNextSibling(currentParent, aRowIndex, &hasNextSibling);
- if (hasNextSibling || i == level) {
- Point p1(pc->AppUnitsToGfxUnits(srcX),
- pc->AppUnitsToGfxUnits(lineY));
- Point p2;
- p2.x = pc->AppUnitsToGfxUnits(srcX);
-
- if (hasNextSibling)
- p2.y = pc->AppUnitsToGfxUnits(lineY + mRowHeight);
- else if (i == level)
- p2.y = pc->AppUnitsToGfxUnits(lineY + mRowHeight / 2);
-
- SnapLineToDevicePixelsForStroking(p1, p2, *drawTarget,
- strokeOptions.mLineWidth);
- drawTarget->StrokeLine(p1, p2, colorPatt, strokeOptions);
- }
- }
-
- int32_t parent;
- if (NS_FAILED(mView->GetParentIndex(currentParent, &parent)) || parent < 0)
- break;
- currentParent = parent;
- srcX -= mIndentation;
- }
- }
-
// Always leave space for the twisty.
nsRect twistyRect(currX, cellRect.y, remainingWidth, cellRect.height);
result &= PaintTwisty(aRowIndex, aColumn, twistyRect, aPresContext,
aRenderingContext, aDirtyRect, remainingWidth,
currX);
}
// Now paint the icon for our cell.
--- a/security/manager/pki/resources/content/certViewer.xul
+++ b/security/manager/pki/resources/content/certViewer.xul
@@ -129,17 +129,17 @@
hidecolumnpicker="true" style="height: 8em;">
<treecols>
<treecol id="dumpCol" flex="1" primary="true" hideheader="true"/>
</treecols>
</tree>
<label class="header" value="&certmgr.details.label;"
control="prettyDumpTree" accesskey="&certmgr.details.accesskey;"/>
- <tree id="prettyDumpTree" style="height: 15em" treelines="true" flex="1"
+ <tree id="prettyDumpTree" style="height: 15em" flex="1"
onselect="displaySelected();" hidecolumnpicker="true">
<treecols>
<treecol flex="1" id="certDataCol" primary="true" hideheader="true"/>
</treecols>
<treechildren/>
</tree>
<label class="header" value="&certmgr.fields.label;"
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -631,21 +631,16 @@ treecol[hidden="true"] {
display: -moz-box;
}
.tree-scrollable-columns {
/* Yes, Virginia, this makes it scrollable */
overflow: hidden;
}
-/* ::::: lines connecting cells ::::: */
-tree:not([treelines="true"]) > treechildren::-moz-tree-line {
- visibility: hidden;
-}
-
treechildren::-moz-tree-cell(ltr) {
direction: ltr !important;
}
/********** deck & stack *********/
deck {
display: -moz-deck;
--- a/toolkit/themes/linux/global/tree.css
+++ b/toolkit/themes/linux/global/tree.css
@@ -131,30 +131,16 @@ tree[seltype="text"] > treechildren::-mo
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;
}
--- a/toolkit/themes/osx/global/tree.css
+++ b/toolkit/themes/osx/global/tree.css
@@ -98,27 +98,16 @@ tree[seltype="cell"] > treechildren::-mo
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;
-}
-
-
/* ::::: tree separator ::::: */
treechildren::-moz-tree-separator {
border-top: 1px dashed #C7C7C7;
margin: 0 2px;
}
--- a/toolkit/themes/windows/global/tree.css
+++ b/toolkit/themes/windows/global/tree.css
@@ -128,29 +128,16 @@ tree[seltype="text"] > treechildren::-mo
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;
}