WebKit Bugzilla
Attachment 347732 Details for
Bug 188449
: Web Inspector: Remove TreeOutlineDataGridSynchronizer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-188449-20180821170247.patch (text/plain), 27.01 KB, created by
Matt Baker
on 2018-08-21 17:02:54 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Matt Baker
Created:
2018-08-21 17:02:54 PDT
Size:
27.01 KB
patch
obsolete
>Subversion Revision: 235142 >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 58b2615e4477daa290e5e5763238f827a591299e..e2bb2659503fa4d752e3f92986c90fa37263a463 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,33 @@ >+2018-08-21 Matt Baker <mattbaker@apple.com> >+ >+ Web Inspector: Remove TreeOutlineDataGridSynchronizer >+ https://bugs.webkit.org/show_bug.cgi?id=188449 >+ <rdar://problem/43107980> >+ >+ Reviewed by Devin Rousso. >+ >+ * UserInterface/Views/HeapAllocationsTimelineView.js: >+ (WI.HeapAllocationsTimelineView.prototype.layout): >+ * UserInterface/Views/LayoutTimelineView.js: >+ (WI.LayoutTimelineView.prototype._processPendingRecords): >+ * UserInterface/Views/NetworkTimelineView.js: >+ (WI.NetworkTimelineView.prototype._processPendingRecords): >+ * UserInterface/Views/RenderingFrameTimelineView.js: >+ (WI.RenderingFrameTimelineView.prototype._processPendingRecords): >+ (WI.RenderingFrameTimelineView.prototype.dataGridNodeForTreeElement): Deleted. >+ * UserInterface/Views/ScriptDetailsTimelineView.js: >+ (WI.ScriptDetailsTimelineView.prototype._processPendingRecords): >+ * UserInterface/Views/TimelineDataGrid.js: >+ (WI.TimelineDataGrid): >+ (WI.TimelineDataGrid.prototype.reset): >+ (WI.TimelineDataGrid.prototype.shown): >+ (WI.TimelineDataGrid.prototype.addRowInSortOrder): >+ (WI.TimelineDataGrid.prototype._refreshDirtyDataGridNodes): >+ (WI.TimelineDataGrid.prototype._sort): >+ (WI.TimelineDataGrid.prototype.treeElementForDataGridNode): Deleted. >+ (WI.TimelineDataGrid.prototype.dataGridNodeForTreeElement): Deleted. >+ * UserInterface/Views/TreeOutlineDataGridSynchronizer.js: Removed. >+ > 2018-08-21 Devin Rousso <drousso@apple.com> > > Web Inspector: REGRESSION(r235095): duplicate actions existing in WI.CanvasSidebarPanel >diff --git a/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js b/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js >index 762f92bcc0049bf6f56517aa1ef8157caccb3aef..73a604c7fbb4cfb0a2d476a5ff3410715a4c28d0 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js >@@ -268,7 +268,7 @@ WI.HeapAllocationsTimelineView = class HeapAllocationsTimelineView extends WI.Ti > if (this._pendingRecords.length) { > for (let heapAllocationsTimelineRecord of this._pendingRecords) { > let dataGridNode = new WI.HeapAllocationsTimelineDataGridNode(heapAllocationsTimelineRecord, this.zeroTime, this); >- this._dataGrid.addRowInSortOrder(null, dataGridNode); >+ this._dataGrid.addRowInSortOrder(dataGridNode); > if (!this.zeroTime) > this._pendingZeroTimeDataGridNodes.push(dataGridNode); > } >diff --git a/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js b/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js >index eed8dd3ed5fa292f94ada36e72e0de3339094798..c117240cc919e7ff5cdb15648f6f4f117e2ff06e 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineView.js >@@ -203,7 +203,7 @@ WI.LayoutTimelineView = class LayoutTimelineView extends WI.TimelineView > for (var layoutTimelineRecord of this._pendingRecords) { > let dataGridNode = new WI.LayoutTimelineDataGridNode(layoutTimelineRecord, this.zeroTime); > >- this._dataGrid.addRowInSortOrder(null, dataGridNode); >+ this._dataGrid.addRowInSortOrder(dataGridNode); > > let stack = [{children: layoutTimelineRecord.children, parentDataGridNode: dataGridNode, index: 0}]; > while (stack.length) { >@@ -218,7 +218,7 @@ WI.LayoutTimelineView = class LayoutTimelineView extends WI.TimelineView > > let childDataGridNode = new WI.LayoutTimelineDataGridNode(childRecord, this.zeroTime); > console.assert(entry.parentDataGridNode, "Missing parent node for entry.", entry); >- this._dataGrid.addRowInSortOrder(null, childDataGridNode, entry.parentDataGridNode); >+ this._dataGrid.addRowInSortOrder(childDataGridNode, entry.parentDataGridNode); > > if (childDataGridNode && childRecord.children.length) > stack.push({children: childRecord.children, parentDataGridNode: childDataGridNode, index: 0}); >diff --git a/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js b/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js >index 880e481b938c70a84497a577a75b10c8fcfa7d9a..2bce76e0f4ff22af15519f6aae8932ae09ebec7b 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineView.js >@@ -259,7 +259,7 @@ WI.NetworkTimelineView = class NetworkTimelineView extends WI.TimelineView > dataGridNode = new WI.ResourceTimelineDataGridNode(resourceTimelineRecord, includesGraph, this, shouldShowPopover); > this._resourceDataGridNodeMap.set(resourceTimelineRecord.resource, dataGridNode); > >- this._dataGrid.addRowInSortOrder(null, dataGridNode); >+ this._dataGrid.addRowInSortOrder(dataGridNode); > } > > this._pendingRecords = []; >diff --git a/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js b/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js >index f839e11dd4440bc7039e76a41271dd7f09a37ec6..68e0d02fc456c5487cbe16aa0cc99a80ab641a73 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/RenderingFrameTimelineView.js >@@ -195,13 +195,6 @@ WI.RenderingFrameTimelineView = class RenderingFrameTimelineView extends WI.Time > dataGridNode.revealAndSelect(); > } > >- dataGridNodeForTreeElement(treeElement) >- { >- if (treeElement instanceof WI.ProfileNodeTreeElement) >- return new WI.ProfileNodeDataGridNode(treeElement.profileNode, this.zeroTime, this.startTime, this.endTime); >- return null; >- } >- > matchDataGridNodeAgainstCustomFilters(node) > { > if (!super.matchDataGridNodeAgainstCustomFilters(node)) >@@ -240,7 +233,7 @@ WI.RenderingFrameTimelineView = class RenderingFrameTimelineView extends WI.Time > console.assert(renderingFrameTimelineRecord instanceof WI.RenderingFrameTimelineRecord); > > let dataGridNode = new WI.RenderingFrameTimelineDataGridNode(renderingFrameTimelineRecord, this.zeroTime); >- this._dataGrid.addRowInSortOrder(null, dataGridNode); >+ this._dataGrid.addRowInSortOrder(dataGridNode); > > let stack = [{children: renderingFrameTimelineRecord.children, parentDataGridNode: dataGridNode, index: 0}]; > while (stack.length) { >@@ -255,7 +248,7 @@ WI.RenderingFrameTimelineView = class RenderingFrameTimelineView extends WI.Time > if (childRecord.type === WI.TimelineRecord.Type.Layout) { > childDataGridNode = new WI.LayoutTimelineDataGridNode(childRecord, this.zeroTime); > >- this._dataGrid.addRowInSortOrder(null, childDataGridNode, entry.parentDataGridNode); >+ this._dataGrid.addRowInSortOrder(childDataGridNode, entry.parentDataGridNode); > } else if (childRecord.type === WI.TimelineRecord.Type.Script) { > let rootNodes = []; > if (childRecord.profile) { >@@ -265,11 +258,11 @@ WI.RenderingFrameTimelineView = class RenderingFrameTimelineView extends WI.Time > > childDataGridNode = new WI.ScriptTimelineDataGridNode(childRecord, this.zeroTime); > >- this._dataGrid.addRowInSortOrder(null, childDataGridNode, entry.parentDataGridNode); >+ this._dataGrid.addRowInSortOrder(childDataGridNode, entry.parentDataGridNode); > > for (let profileNode of rootNodes) { > let profileNodeDataGridNode = new WI.ProfileNodeDataGridNode(profileNode, this.zeroTime, this.startTime, this.endTime); >- this._dataGrid.addRowInSortOrder(null, profileNodeDataGridNode, childDataGridNode); >+ this._dataGrid.addRowInSortOrder(profileNodeDataGridNode, childDataGridNode); > } > } > >diff --git a/Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js b/Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js >index daafe10e8f9ffc64e08de7a361566dfe2db5d125..88c392c0158cf5027febada68ab6a73a83e2ee8e 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ScriptDetailsTimelineView.js >@@ -211,11 +211,11 @@ WI.ScriptDetailsTimelineView = class ScriptDetailsTimelineView extends WI.Timeli > } > > let dataGridNode = new WI.ScriptTimelineDataGridNode(scriptTimelineRecord, zeroTime); >- this._dataGrid.addRowInSortOrder(null, dataGridNode); >+ this._dataGrid.addRowInSortOrder(dataGridNode); > > for (let profileNode of rootNodes) { > let profileNodeDataGridNode = new WI.ProfileNodeDataGridNode(profileNode, zeroTime, startTime, endTime); >- this._dataGrid.addRowInSortOrder(null, profileNodeDataGridNode, dataGridNode); >+ this._dataGrid.addRowInSortOrder(profileNodeDataGridNode, dataGridNode); > } > } > >diff --git a/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js b/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js >index d481f3814fb7e5be84da84a84d65e50578c93ea9..63edac6c94ea596a18d74af020c4a3ace52a1fe7 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js >@@ -25,13 +25,10 @@ > > WI.TimelineDataGrid = class TimelineDataGrid extends WI.DataGrid > { >- constructor(columns, treeOutline, synchronizerDelegate, editCallback, deleteCallback) >+ constructor(columns, editCallback, deleteCallback) > { > super(columns, editCallback, deleteCallback); > >- if (treeOutline) >- this._treeOutlineDataGridSynchronizer = new WI.TreeOutlineDataGridSynchronizer(treeOutline, this, synchronizerDelegate); >- > this.element.classList.add("timeline"); > > this._sortDelegate = null; >@@ -101,8 +98,7 @@ WI.TimelineDataGrid = class TimelineDataGrid extends WI.DataGrid > { > // May be overridden by subclasses. If so, they should call the superclass. > >- if (!this._treeOutlineDataGridSynchronizer) >- this.removeChildren(); >+ this.removeChildren(); > > this._hidePopover(); > } >@@ -110,9 +106,6 @@ WI.TimelineDataGrid = class TimelineDataGrid extends WI.DataGrid > shown() > { > // May be overridden by subclasses. If so, they should call the superclass. >- >- if (this._treeOutlineDataGridSynchronizer) >- this._treeOutlineDataGridSynchronizer.synchronize(); > } > > hidden() >@@ -122,61 +115,21 @@ WI.TimelineDataGrid = class TimelineDataGrid extends WI.DataGrid > this._hidePopover(); > } > >- treeElementForDataGridNode(dataGridNode) >- { >- if (!this._treeOutlineDataGridSynchronizer) >- return null; >- >- return this._treeOutlineDataGridSynchronizer.treeElementForDataGridNode(dataGridNode); >- } >- >- dataGridNodeForTreeElement(treeElement) >- { >- if (!this._treeOutlineDataGridSynchronizer) >- return null; >- >- return this._treeOutlineDataGridSynchronizer.dataGridNodeForTreeElement(treeElement); >- } >- > callFramePopoverAnchorElement() > { > // Implemented by subclasses. > return null; > } > >- addRowInSortOrder(treeElement, dataGridNode, parentTreeElementOrDataGridNode) >+ addRowInSortOrder(dataGridNode, parentDataGridNode) > { >- let parentDataGridNode; >- let childElement = dataGridNode; >- >- if (treeElement) { >- console.assert(this._treeOutlineDataGridSynchronizer); >- if (!this._treeOutlineDataGridSynchronizer) >- return; >- >- this._treeOutlineDataGridSynchronizer.associate(treeElement, dataGridNode); >- >- console.assert(!parentTreeElementOrDataGridNode || parentTreeElementOrDataGridNode instanceof WI.TreeElement); >- >- let parentTreeElement = parentTreeElementOrDataGridNode || this._treeOutlineDataGridSynchronizer.treeOutline; >- parentDataGridNode = parentTreeElement.root ? this : this._treeOutlineDataGridSynchronizer.dataGridNodeForTreeElement(parentTreeElement); >- >- parentTreeElementOrDataGridNode = parentTreeElement; >- childElement = treeElement; >- } else { >- parentTreeElementOrDataGridNode = parentTreeElementOrDataGridNode || this; >- parentDataGridNode = parentTreeElementOrDataGridNode; >- } >+ parentDataGridNode = parentDataGridNode || this; > > if (this.sortColumnIdentifier) { > let insertionIndex = insertionIndexForObjectInListSortedByFunction(dataGridNode, parentDataGridNode.children, this._sortComparator.bind(this)); >- >- // If parent is a tree element, the synchronizer will insert into the data grid. >- parentTreeElementOrDataGridNode.insertChild(childElement, insertionIndex); >- } else { >- // If parent is a tree element, the synchronizer will append to the data grid. >- parentTreeElementOrDataGridNode.appendChild(childElement); >- } >+ parentDataGridNode.insertChild(dataGridNode, insertionIndex); >+ } else >+ parentDataGridNode.appendChild(dataGridNode); > } > > shouldIgnoreSelectionEvent() >@@ -236,9 +189,6 @@ WI.TimelineDataGrid = class TimelineDataGrid extends WI.DataGrid > let selectedNode = this.selectedNode; > let sortComparator = this._sortComparator.bind(this); > >- if (this._treeOutlineDataGridSynchronizer) >- this._treeOutlineDataGridSynchronizer.enabled = false; >- > for (let dataGridNode of this._dirtyDataGridNodes) { > dataGridNode.refresh(); > >@@ -259,24 +209,8 @@ WI.TimelineDataGrid = class TimelineDataGrid extends WI.DataGrid > selectedNode.revealAndSelect(); > this._ignoreSelectionEvent = false; > } >- >- if (!this._treeOutlineDataGridSynchronizer) >- continue; >- >- let treeOutline = this._treeOutlineDataGridSynchronizer.treeOutline; >- let treeElement = this._treeOutlineDataGridSynchronizer.treeElementForDataGridNode(dataGridNode); >- console.assert(treeElement); >- >- treeOutline.reattachIfIndexChanged(treeElement, insertionIndex); >- >- // Adding the tree element back to the tree outline subjects it to filters. >- // Make sure we keep the hidden state in-sync while the synchronizer is disabled. >- dataGridNode.element.classList.toggle("hidden", treeElement.hidden); > } > >- if (this._treeOutlineDataGridSynchronizer) >- this._treeOutlineDataGridSynchronizer.enabled = true; >- > this._dirtyDataGridNodes = null; > } > >@@ -292,15 +226,6 @@ WI.TimelineDataGrid = class TimelineDataGrid extends WI.DataGrid > let selectedNode = this.selectedNode; > this._ignoreSelectionEvent = true; > >- let treeOutline; >- if (this._treeOutlineDataGridSynchronizer) { >- this._treeOutlineDataGridSynchronizer.enabled = false; >- >- treeOutline = this._treeOutlineDataGridSynchronizer.treeOutline; >- if (treeOutline.selectedTreeElement) >- treeOutline.selectedTreeElement.deselect(true); >- } >- > // Collect parent nodes that need their children sorted. So this in two phases since > // traverseNextNode would get confused if we sort the tree while traversing it. > let parentDataGridNodes = [this]; >@@ -315,37 +240,12 @@ WI.TimelineDataGrid = class TimelineDataGrid extends WI.DataGrid > for (let parentDataGridNode of parentDataGridNodes) { > let childDataGridNodes = parentDataGridNode.children.slice(); > parentDataGridNode.removeChildren(); >- >- let parentTreeElement; >- if (this._treeOutlineDataGridSynchronizer) { >- parentTreeElement = parentDataGridNode === this ? treeOutline : this._treeOutlineDataGridSynchronizer.treeElementForDataGridNode(parentDataGridNode); >- console.assert(parentTreeElement); >- >- parentTreeElement.removeChildren(); >- } >- > childDataGridNodes.sort(this._sortComparator.bind(this)); > >- for (let dataGridNode of childDataGridNodes) { >- if (this._treeOutlineDataGridSynchronizer) { >- let treeElement = this._treeOutlineDataGridSynchronizer.treeElementForDataGridNode(dataGridNode); >- console.assert(treeElement); >- >- if (parentTreeElement) >- parentTreeElement.appendChild(treeElement); >- >- // Adding the tree element back to the tree outline subjects it to filters. >- // Make sure we keep the hidden state in-sync while the synchronizer is disabled. >- dataGridNode.element.classList.toggle("hidden", treeElement.hidden); >- } >- >+ for (let dataGridNode of childDataGridNodes) > parentDataGridNode.appendChild(dataGridNode); >- } > } > >- if (this._treeOutlineDataGridSynchronizer) >- this._treeOutlineDataGridSynchronizer.enabled = true; >- > if (selectedNode) > selectedNode.revealAndSelect(); > >diff --git a/Source/WebInspectorUI/UserInterface/Views/TreeOutlineDataGridSynchronizer.js b/Source/WebInspectorUI/UserInterface/Views/TreeOutlineDataGridSynchronizer.js >deleted file mode 100644 >index 5eec2854cbc3b1d4cb5f7396aee5d3b10c1c4c0d..0000000000000000000000000000000000000000 >--- a/Source/WebInspectorUI/UserInterface/Views/TreeOutlineDataGridSynchronizer.js >+++ /dev/null >@@ -1,284 +0,0 @@ >-/* >- * Copyright (C) 2013, 2015 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-WI.TreeOutlineDataGridSynchronizer = class TreeOutlineDataGridSynchronizer extends WI.Object >-{ >- constructor(treeOutline, dataGrid, delegate) >- { >- super(); >- >- this._treeOutline = treeOutline; >- this._dataGrid = dataGrid; >- this._delegate = delegate || null; >- this._enabled = true; >- >- this._treeOutline.element.parentNode.addEventListener("scroll", this._treeOutlineScrolled.bind(this)); >- this._dataGrid.scrollContainer.addEventListener("scroll", this._dataGridScrolled.bind(this)); >- >- this._treeOutline.__dataGridNode = this._dataGrid; >- >- this._dataGrid.addEventListener(WI.DataGrid.Event.ExpandedNode, this._dataGridNodeExpanded, this); >- this._dataGrid.addEventListener(WI.DataGrid.Event.CollapsedNode, this._dataGridNodeCollapsed, this); >- this._dataGrid.addEventListener(WI.DataGrid.Event.SelectedNodeChanged, this._dataGridNodeSelected, this); >- >- this._dataGrid.element.addEventListener("focus", this._dataGridGainedFocus.bind(this)); >- this._dataGrid.element.addEventListener("blur", this._dataGridLostFocus.bind(this)); >- >- this._treeOutline.element.addEventListener("focus", this._treeOutlineGainedFocus.bind(this)); >- this._treeOutline.element.addEventListener("blur", this._treeOutlineLostFocus.bind(this)); >- >- treeOutline.addEventListener(WI.TreeOutline.Event.ElementAdded, this._treeElementAdded, this); >- treeOutline.addEventListener(WI.TreeOutline.Event.ElementRemoved, this._treeElementRemoved, this); >- treeOutline.addEventListener(WI.TreeOutline.Event.ElementDisclosureDidChanged, this._treeElementDisclosureDidChange, this); >- treeOutline.addEventListener(WI.TreeOutline.Event.ElementVisibilityDidChange, this._treeElementVisibilityDidChange, this); >- treeOutline.addEventListener(WI.TreeOutline.Event.SelectionDidChange, this._treeSelectionDidChange, this); >- } >- >- // Public >- >- get treeOutline() >- { >- return this._treeOutline; >- } >- >- get dataGrid() >- { >- return this._dataGrid; >- } >- >- get delegate() >- { >- return this._delegate; >- } >- >- get enabled() >- { >- return this._enabled; >- } >- >- set enabled(x) >- { >- this._enabled = x || false; >- } >- >- associate(treeElement, dataGridNode) >- { >- console.assert(treeElement); >- console.assert(dataGridNode); >- >- treeElement.__dataGridNode = dataGridNode; >- dataGridNode.__treeElement = treeElement; >- } >- >- synchronize() >- { >- this._dataGrid.scrollContainer.scrollTop = this._treeOutline.element.parentNode.scrollTop; >- if (this._treeOutline.selectedTreeElement) >- this._treeOutline.selectedTreeElement.__dataGridNode.select(true); >- else if (this._dataGrid.selectedNode) >- this._dataGrid.selectedNode.deselect(true); >- } >- >- treeElementForDataGridNode(dataGridNode) >- { >- return dataGridNode.__treeElement || null; >- } >- >- dataGridNodeForTreeElement(treeElement) >- { >- if (treeElement.__dataGridNode) >- return treeElement.__dataGridNode; >- >- if (typeof this._delegate.dataGridNodeForTreeElement === "function") { >- var dataGridNode = this._delegate.dataGridNodeForTreeElement(treeElement); >- if (dataGridNode) >- this.associate(treeElement, dataGridNode); >- return dataGridNode; >- } >- >- return null; >- } >- >- // Private >- >- _treeOutlineScrolled(event) >- { >- if (!this._enabled) >- return; >- >- if (this._ignoreNextTreeOutlineScrollEvent) { >- this._ignoreNextTreeOutlineScrollEvent = false; >- return; >- } >- >- this._ignoreNextDataGridScrollEvent = true; >- this._dataGrid.scrollContainer.scrollTop = this._treeOutline.element.parentNode.scrollTop; >- } >- >- _dataGridGainedFocus(event) >- { >- this._treeOutline.element.classList.add("force-focus"); >- } >- >- _dataGridLostFocus(event) >- { >- this._treeOutline.element.classList.remove("force-focus"); >- } >- >- _dataGridScrolled(event) >- { >- if (!this._enabled) >- return; >- >- if (this._ignoreNextDataGridScrollEvent) { >- this._ignoreNextDataGridScrollEvent = false; >- return; >- } >- >- this._ignoreNextTreeOutlineScrollEvent = true; >- this._treeOutline.element.parentNode.scrollTop = this._dataGrid.scrollContainer.scrollTop; >- } >- >- _dataGridNodeSelected(event) >- { >- if (!this._enabled) >- return; >- >- var dataGridNode = this._dataGrid.selectedNode; >- if (dataGridNode) >- dataGridNode.__treeElement.select(true, true, true, true); >- } >- >- _dataGridNodeExpanded(event) >- { >- if (!this._enabled) >- return; >- >- var dataGridNode = event.data.dataGridNode; >- console.assert(dataGridNode); >- >- if (!dataGridNode.__treeElement.expanded) >- dataGridNode.__treeElement.expand(); >- } >- >- _dataGridNodeCollapsed(event) >- { >- if (!this._enabled) >- return; >- >- var dataGridNode = event.data.dataGridNode; >- console.assert(dataGridNode); >- >- if (dataGridNode.__treeElement.expanded) >- dataGridNode.__treeElement.collapse(); >- } >- >- _treeOutlineGainedFocus(event) >- { >- this._dataGrid.element.classList.add("force-focus"); >- } >- >- _treeOutlineLostFocus(event) >- { >- this._dataGrid.element.classList.remove("force-focus"); >- } >- >- _treeSelectionDidChange(event) >- { >- if (!this._enabled) >- return; >- >- let treeElement = event.data.selectedElement || event.data.deselectedElement; >- console.assert(treeElement); >- if (!treeElement) >- return; >- >- let dataGridNode = treeElement.__dataGridNode; >- console.assert(dataGridNode); >- >- if (event.data.selectedElement) >- dataGridNode.select(); >- else >- dataGridNode.deselect(); >- } >- >- _treeElementAdded(event) >- { >- if (!this._enabled) >- return; >- >- let treeElement = event.data.element; >- let dataGridNode = this.dataGridNodeForTreeElement(treeElement); >- console.assert(dataGridNode); >- >- var parentDataGridNode = treeElement.parent.__dataGridNode; >- console.assert(parentDataGridNode); >- >- var childIndex = treeElement.parent.children.indexOf(treeElement); >- console.assert(childIndex !== -1); >- >- parentDataGridNode.insertChild(dataGridNode, childIndex); >- } >- >- _treeElementRemoved(event) >- { >- if (!this._enabled) >- return; >- >- let treeElement = event.data.element; >- let dataGridNode = treeElement.__dataGridNode; >- console.assert(dataGridNode); >- >- if (dataGridNode.parent) >- dataGridNode.parent.removeChild(dataGridNode); >- } >- >- _treeElementDisclosureDidChange(event) >- { >- if (!this._enabled) >- return; >- >- let treeElement = event.data.element; >- let dataGridNode = treeElement.__dataGridNode; >- console.assert(dataGridNode); >- >- if (treeElement.expanded) >- dataGridNode.expand(); >- else >- dataGridNode.collapse(); >- } >- >- _treeElementVisibilityDidChange(event) >- { >- if (!this._enabled) >- return; >- >- let treeElement = event.data.element; >- let dataGridNode = treeElement.__dataGridNode; >- console.assert(dataGridNode); >- >- dataGridNode.hidden = treeElement.hidden; >- } >-};
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188449
:
346859
| 347732