Title: [235997] trunk/Source/WebInspectorUI
- Revision
- 235997
- Author
- [email protected]
- Date
- 2018-09-13 17:03:05 -0700 (Thu, 13 Sep 2018)
Log Message
Web Inspector: Timelines: clicking a row in Script > Events grid triggers Location popover when column is hidden
https://bugs.webkit.org/show_bug.cgi?id=189603
<rdar://problem/44431403>
Reviewed by Joseph Pecoraro.
TimelineDataGrid controls showing/hiding the call frame popover, with subclasses
overriding callFramePopoverAnchorElement to position it. This patch adds
another overridable base class method, shouldShowCallFramePopover, which subclasses
can use to block the popover when the Location column is hidden.
* UserInterface/Views/DataGrid.js:
(WI.DataGrid.prototype.layout):
(WI.DataGrid.prototype._positionResizerElements):
(WI.DataGrid.prototype._isColumnVisible): Deleted.
* UserInterface/Views/LayoutTimelineDataGrid.js:
(WI.LayoutTimelineDataGrid.prototype.shouldShowCallFramePopover):
(WI.LayoutTimelineDataGrid):
* UserInterface/Views/ScriptTimelineDataGrid.js:
(WI.ScriptTimelineDataGrid.prototype.shouldShowCallFramePopover):
(WI.ScriptTimelineDataGrid):
* UserInterface/Views/TimelineDataGrid.js:
(WI.TimelineDataGrid.prototype.shouldShowCallFramePopover):
(WI.TimelineDataGrid.prototype._dataGridSelectedNodeChanged):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (235996 => 235997)
--- trunk/Source/WebInspectorUI/ChangeLog 2018-09-13 23:58:41 UTC (rev 235996)
+++ trunk/Source/WebInspectorUI/ChangeLog 2018-09-14 00:03:05 UTC (rev 235997)
@@ -1,3 +1,33 @@
+2018-09-13 Matt Baker <[email protected]>
+
+ Web Inspector: Timelines: clicking a row in Script > Events grid triggers Location popover when column is hidden
+ https://bugs.webkit.org/show_bug.cgi?id=189603
+ <rdar://problem/44431403>
+
+ Reviewed by Joseph Pecoraro.
+
+ TimelineDataGrid controls showing/hiding the call frame popover, with subclasses
+ overriding callFramePopoverAnchorElement to position it. This patch adds
+ another overridable base class method, shouldShowCallFramePopover, which subclasses
+ can use to block the popover when the Location column is hidden.
+
+ * UserInterface/Views/DataGrid.js:
+ (WI.DataGrid.prototype.layout):
+ (WI.DataGrid.prototype._positionResizerElements):
+ (WI.DataGrid.prototype._isColumnVisible): Deleted.
+
+ * UserInterface/Views/LayoutTimelineDataGrid.js:
+ (WI.LayoutTimelineDataGrid.prototype.shouldShowCallFramePopover):
+ (WI.LayoutTimelineDataGrid):
+
+ * UserInterface/Views/ScriptTimelineDataGrid.js:
+ (WI.ScriptTimelineDataGrid.prototype.shouldShowCallFramePopover):
+ (WI.ScriptTimelineDataGrid):
+
+ * UserInterface/Views/TimelineDataGrid.js:
+ (WI.TimelineDataGrid.prototype.shouldShowCallFramePopover):
+ (WI.TimelineDataGrid.prototype._dataGridSelectedNodeChanged):
+
2018-09-13 Joseph Pecoraro <[email protected]>
Web Inspector: Opening inspector with a selected element might immediately scroll that element off screen in the DOM Tree outline
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (235996 => 235997)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2018-09-13 23:58:41 UTC (rev 235996)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js 2018-09-14 00:03:05 UTC (rev 235997)
@@ -857,7 +857,7 @@
let columnWidths = [];
for (let i = 0; i < numColumns; ++i) {
let headerCellElement = cells[i];
- if (this._isColumnVisible(headerCellElement.columnIdentifier)) {
+ if (this.isColumnVisible(headerCellElement.columnIdentifier)) {
let columnWidth = headerCellElement.offsetWidth;
let percentWidth = ((columnWidth / tableWidth) * 100) + "%";
columnWidths.push(percentWidth);
@@ -894,7 +894,7 @@
this._cachedScrollableOffsetHeight = NaN;
}
- _isColumnVisible(columnIdentifier)
+ isColumnVisible(columnIdentifier)
{
return !this.columns.get(columnIdentifier)["hidden"];
}
@@ -969,7 +969,7 @@
leadingOffset = columnWidths[i];
- if (this._isColumnVisible(this.orderedColumns[i])) {
+ if (this.isColumnVisible(this.orderedColumns[i])) {
resizer.element.style.removeProperty("display");
resizer.element.style.setProperty(WI.resolvedLayoutDirection() === WI.LayoutDirection.RTL ? "right" : "left", `${leadingOffset}px`);
resizer[WI.DataGrid.PreviousColumnOrdinalSymbol] = i;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineDataGrid.js (235996 => 235997)
--- trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineDataGrid.js 2018-09-13 23:58:41 UTC (rev 235996)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LayoutTimelineDataGrid.js 2018-09-14 00:03:05 UTC (rev 235997)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -31,4 +31,9 @@
{
return this.selectedNode.elementWithColumnIdentifier("location");
}
+
+ shouldShowCallFramePopover()
+ {
+ return this.isColumnVisible("location");
+ }
};
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineDataGrid.js (235996 => 235997)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineDataGrid.js 2018-09-13 23:58:41 UTC (rev 235996)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptTimelineDataGrid.js 2018-09-14 00:03:05 UTC (rev 235997)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -31,4 +31,9 @@
{
return this.selectedNode.elementWithColumnIdentifier("location");
}
+
+ shouldShowCallFramePopover()
+ {
+ return this.isColumnVisible("location");
+ }
};
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js (235996 => 235997)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js 2018-09-13 23:58:41 UTC (rev 235996)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineDataGrid.js 2018-09-14 00:03:05 UTC (rev 235997)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2018 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -121,6 +121,12 @@
return null;
}
+ shouldShowCallFramePopover()
+ {
+ // Implemented by subclasses.
+ return false;
+ }
+
addRowInSortOrder(dataGridNode, parentDataGridNode)
{
parentDataGridNode = parentDataGridNode || this;
@@ -320,7 +326,8 @@
return;
}
- this._showPopoverForSelectedNodeSoon();
+ if (this.shouldShowCallFramePopover())
+ this._showPopoverForSelectedNodeSoon();
}
_showPopoverForSelectedNodeSoon()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes