Skip to content
Permalink
Browse files
Web Inspector: Convert DataGrid and DataGridNode classes to ES6 classes
https://bugs.webkit.org/show_bug.cgi?id=147439

Reviewed by Joseph Pecoraro.

Along the way, inline a few style class names.

Elided mechanical changes from the Changelog.

* UserInterface/Views/DOMTreeDataGrid.js:
* UserInterface/Views/DataGrid.js:
* UserInterface/Views/DatabaseTableContentView.js:
* UserInterface/Views/IndexedDatabaseEntryDataGridNode.js:
* UserInterface/Views/LayerTreeDataGridNode.js:
* UserInterface/Views/LayoutTimelineDataGrid.js:
* UserInterface/Views/LayoutTimelineDataGridNode.js:
* UserInterface/Views/ProbeSetDataGrid.js:
* UserInterface/Views/ProfileNodeDataGridNode.js:
* UserInterface/Views/RenderingFrameTimelineDataGridNode.js:
* UserInterface/Views/ResourceTimelineDataGridNode.js:
* UserInterface/Views/ScriptTimelineDataGrid.js:
* UserInterface/Views/ScriptTimelineDataGridNode.js:
* UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
* UserInterface/Views/TimelineDataGrid.js:
* UserInterface/Views/TimelineDataGridNode.js: Move a function definition out
of an else branch, since this is not allowed in ES6 strict mode.

Canonical link: https://commits.webkit.org/165693@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Brian Burg committed Aug 4, 2015
1 parent c1e6c2d commit 8b9d76f4e1794cf6b39e44d88c2af6669e108e1d
Showing 17 changed files with 770 additions and 806 deletions.
@@ -1,3 +1,32 @@
2015-08-04 Brian J. Burg <bburg@apple.com>

Web Inspector: Convert DataGrid and DataGridNode classes to ES6 classes
https://bugs.webkit.org/show_bug.cgi?id=147439

Reviewed by Joseph Pecoraro.

Along the way, inline a few style class names.

Elided mechanical changes from the Changelog.

* UserInterface/Views/DOMTreeDataGrid.js:
* UserInterface/Views/DataGrid.js:
* UserInterface/Views/DatabaseTableContentView.js:
* UserInterface/Views/IndexedDatabaseEntryDataGridNode.js:
* UserInterface/Views/LayerTreeDataGridNode.js:
* UserInterface/Views/LayoutTimelineDataGrid.js:
* UserInterface/Views/LayoutTimelineDataGridNode.js:
* UserInterface/Views/ProbeSetDataGrid.js:
* UserInterface/Views/ProfileNodeDataGridNode.js:
* UserInterface/Views/RenderingFrameTimelineDataGridNode.js:
* UserInterface/Views/ResourceTimelineDataGridNode.js:
* UserInterface/Views/ScriptTimelineDataGrid.js:
* UserInterface/Views/ScriptTimelineDataGridNode.js:
* UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
* UserInterface/Views/TimelineDataGrid.js:
* UserInterface/Views/TimelineDataGridNode.js: Move a function definition out
of an else branch, since this is not allowed in ES6 strict mode.

2015-08-04 Brian J. Burg <burg@cs.washington.edu>

Web Inspector: console error when clicking AppCache folder tree element
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2013 Adobe Systems Inc. All rights reserved.
* Copyright (C) 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
@@ -23,33 +24,34 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/

WebInspector.DOMTreeDataGrid = function() {
WebInspector.DataGrid.call(this, {
name: { title: WebInspector.UIString("Node"), sortable: false }
});
WebInspector.DOMTreeDataGrid = class DOMTreeDataGrid extends WebInspector.DataGrid
{
constructor()
{
super({
name: {title: WebInspector.UIString("Node"), sortable: false}
});

this._previousHoveredElement = null;
this._previousHoveredElement = null;

this.element.classList.add("inline", "dom-tree-data-grid");
this.element.classList.add("inline", "dom-tree-data-grid");

this.element.addEventListener("mousemove", this._onmousemove.bind(this), false);
this.element.addEventListener("mouseout", this._onmouseout.bind(this), false);
};
this.element.addEventListener("mousemove", this._onmousemove.bind(this), false);
this.element.addEventListener("mouseout", this._onmouseout.bind(this), false);
}

WebInspector.DOMTreeDataGrid.prototype = {
constructor: WebInspector.DOMTreeDataGrid,
__proto__: WebInspector.DataGrid.prototype,
// Private

_onmousemove: function(event)
_onmousemove(event)
{
var gridNode = this.dataGridNodeFromNode(event.target);
if (!gridNode || this._previousHoveredElement === gridNode.domNode)
return;
this._previousHoveredElement = gridNode.domNode;
WebInspector.domTreeManager.highlightDOMNode(gridNode.domNode.id);
},
}

_onmouseout: function(event) {
_onmouseout(event) {
if (!this._previousHoveredElement)
return;
WebInspector.domTreeManager.hideDOMNodeHighlight();

0 comments on commit 8b9d76f

Please sign in to comment.