diff --git a/accessible/tests/mochitest/selectable/test_tree.xul b/accessible/tests/mochitest/selectable/test_tree.xul index 81e08253437f..47e9c73855d3 100644 --- a/accessible/tests/mochitest/selectable/test_tree.xul +++ b/accessible/tests/mochitest/selectable/test_tree.xul @@ -50,7 +50,7 @@ var isTreeMultiSelectable = false; var seltype = this.DOMNode.getAttribute("seltype"); - if (seltype != "single" && seltype != "cell" && seltype != "text") + if (seltype != "single") isTreeMultiSelectable = true; // selectAll @@ -110,8 +110,6 @@ 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(); @@ -156,20 +154,6 @@ - - - - - - - - - - - - - - diff --git a/layout/xul/tree/crashtests/399227-2.xul b/layout/xul/tree/crashtests/399227-2.xul deleted file mode 100644 index 55665ec475b8..000000000000 --- a/layout/xul/tree/crashtests/399227-2.xul +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/layout/xul/tree/crashtests/crashtests.list b/layout/xul/tree/crashtests/crashtests.list index a18cd9761b54..cbb96a615363 100644 --- a/layout/xul/tree/crashtests/crashtests.list +++ b/layout/xul/tree/crashtests/crashtests.list @@ -8,7 +8,6 @@ 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 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn index 4c3ddb422fbc..08d4d66823e5 100644 --- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn @@ -97,7 +97,7 @@ toolkit.jar: 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) diff --git a/toolkit/content/tests/chrome/chrome.ini b/toolkit/content/tests/chrome/chrome.ini index 114293aef00b..e905d048e29c 100644 --- a/toolkit/content/tests/chrome/chrome.ini +++ b/toolkit/content/tests/chrome/chrome.ini @@ -186,7 +186,6 @@ skip-if = (os == 'mac' && os_version == '10.10') || (os == 'win') # Bug 1141245, [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] diff --git a/toolkit/content/tests/chrome/test_tree_hier_cell.xul b/toolkit/content/tests/chrome/test_tree_hier_cell.xul deleted file mode 100644 index 29e92ba3b6c2..000000000000 --- a/toolkit/content/tests/chrome/test_tree_hier_cell.xul +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - diff --git a/toolkit/content/tests/widgets/tree_shared.js b/toolkit/content/tests/widgets/tree_shared.js index 96e074bafb49..6ed36cdd53fb 100644 --- a/toolkit/content/tests/widgets/tree_shared.js +++ b/toolkit/content/tests/widgets/tree_shared.js @@ -49,17 +49,9 @@ function testtag_tree(treeid, treerowinfoid, seltype, columnstype, testid) { // 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"); @@ -606,8 +598,7 @@ function testtag_tree_TreeSelection_UI(tree, testid, multiple) { 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 @@ -637,23 +628,6 @@ function testtag_tree_UI_editing(tree, testid, rowInfo) { 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"); @@ -1044,18 +1018,13 @@ function testtag_tree_TreeView_rows_sort(tree, testid, rowInfo) { // 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"); diff --git a/toolkit/content/widgets/tree.xml b/toolkit/content/widgets/tree.xml index eccede1eb3af..acd99550e5b3 100644 --- a/toolkit/content/widgets/tree.xml +++ b/toolkit/content/widgets/tree.xml @@ -256,17 +256,6 @@ ]]> - - - - - - @@ -444,18 +433,6 @@ 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 @@ -670,16 +647,6 @@ 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); ]]> @@ -778,10 +745,6 @@ 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; - } ]]> @@ -793,20 +756,6 @@ event.preventDefault(); } -#ifndef XP_MACOSX - - - - -#endif // XP_MACOSX - = 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(); } } ]]> @@ -872,16 +799,7 @@ 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(); @@ -894,25 +812,9 @@ // 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(); } } ]]> @@ -1139,25 +1041,10 @@ } } - 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; - } } ]]> @@ -1183,11 +1070,6 @@ 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); } @@ -1223,24 +1105,8 @@ // 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; - } } ]]> diff --git a/toolkit/themes/linux/global/tree.css b/toolkit/themes/linux/global/tree.css index ecd5ca28b411..a4491fdaba35 100644 --- a/toolkit/themes/linux/global/tree.css +++ b/toolkit/themes/linux/global/tree.css @@ -56,20 +56,12 @@ 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; } @@ -78,73 +70,16 @@ 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; } @@ -160,8 +95,6 @@ treechildren::-moz-tree-separator { /* ::::: 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; @@ -258,9 +191,7 @@ 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; } diff --git a/toolkit/themes/osx/global/tree.css b/toolkit/themes/osx/global/tree.css index e42b612d27ea..a18bc0b1be02 100644 --- a/toolkit/themes/osx/global/tree.css +++ b/toolkit/themes/osx/global/tree.css @@ -44,65 +44,24 @@ treechildren::-moz-tree-row(selected, focus) { 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 { @@ -124,15 +83,12 @@ treechildren::-moz-tree-separator { /* ::::: 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; } @@ -220,9 +176,7 @@ treechildren::-moz-tree-indentation { 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; } diff --git a/toolkit/themes/windows/global/tree.css b/toolkit/themes/windows/global/tree.css index 643e4ab527ab..11b48ccf9929 100644 --- a/toolkit/themes/windows/global/tree.css +++ b/toolkit/themes/windows/global/tree.css @@ -52,21 +52,12 @@ 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; } @@ -75,73 +66,16 @@ 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; } @@ -160,8 +94,6 @@ 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; } @@ -299,9 +231,7 @@ 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; }