- Revision
- 197625
- Author
- [email protected]
- Date
- 2016-03-05 17:52:38 -0800 (Sat, 05 Mar 2016)
Log Message
Web Inspector: Have separate path component for Script Timeline content views
https://bugs.webkit.org/show_bug.cgi?id=155075
<rdar://problem/24996564>
Patch by Joseph Pecoraro <[email protected]> on 2016-03-05
Reviewed by Timothy Hatcher.
* UserInterface/Images/CallTrees.svg: Added.
* UserInterface/Images/Events.svg: Added.
New icons based off of ResultLine.svg.
* UserInterface/Views/PathComponentIcons.css:
(.events-icon .icon):
(.call-trees-icon .icon):
(body:not(.mac-platform, .windows-platform) .call-trees-icon .icon):
Use the new icons and fallback to ResultLine.svg for other ports.
* UserInterface/Views/ScriptClusterTimelineView.js:
(WebInspector.ScriptClusterTimelineView):
(WebInspector.ScriptClusterTimelineView.prototype.get eventsContentView):
(WebInspector.ScriptClusterTimelineView.prototype.showEvents):
(WebInspector.ScriptClusterTimelineView.prototype.showProfile):
(WebInspector.ScriptClusterTimelineView.prototype._pathComponentForContentView):
(WebInspector.ScriptClusterTimelineView.prototype._identifierForContentView):
(WebInspector.ScriptClusterTimelineView.prototype._showContentViewForIdentifier):
(WebInspector.ScriptClusterTimelineView.prototype._scriptClusterViewCurrentContentViewDidChange):
(WebInspector.ScriptClusterTimelineView.prototype.get detailsContentView): Deleted.
(WebInspector.ScriptClusterTimelineView.prototype.showDetails): Deleted.
Rename "Details" to "Events".
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject): Deleted.
Always include the top level "Details" component.
Modified Paths
Added Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (197624 => 197625)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-03-06 01:23:49 UTC (rev 197624)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-03-06 01:52:38 UTC (rev 197625)
@@ -1,5 +1,40 @@
2016-03-05 Joseph Pecoraro <[email protected]>
+ Web Inspector: Have separate path component for Script Timeline content views
+ https://bugs.webkit.org/show_bug.cgi?id=155075
+ <rdar://problem/24996564>
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Images/CallTrees.svg: Added.
+ * UserInterface/Images/Events.svg: Added.
+ New icons based off of ResultLine.svg.
+
+ * UserInterface/Views/PathComponentIcons.css:
+ (.events-icon .icon):
+ (.call-trees-icon .icon):
+ (body:not(.mac-platform, .windows-platform) .call-trees-icon .icon):
+ Use the new icons and fallback to ResultLine.svg for other ports.
+
+ * UserInterface/Views/ScriptClusterTimelineView.js:
+ (WebInspector.ScriptClusterTimelineView):
+ (WebInspector.ScriptClusterTimelineView.prototype.get eventsContentView):
+ (WebInspector.ScriptClusterTimelineView.prototype.showEvents):
+ (WebInspector.ScriptClusterTimelineView.prototype.showProfile):
+ (WebInspector.ScriptClusterTimelineView.prototype._pathComponentForContentView):
+ (WebInspector.ScriptClusterTimelineView.prototype._identifierForContentView):
+ (WebInspector.ScriptClusterTimelineView.prototype._showContentViewForIdentifier):
+ (WebInspector.ScriptClusterTimelineView.prototype._scriptClusterViewCurrentContentViewDidChange):
+ (WebInspector.ScriptClusterTimelineView.prototype.get detailsContentView): Deleted.
+ (WebInspector.ScriptClusterTimelineView.prototype.showDetails): Deleted.
+ Rename "Details" to "Events".
+
+ * UserInterface/Views/TimelineRecordingContentView.js:
+ (WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject): Deleted.
+ Always include the top level "Details" component.
+
+2016-03-05 Joseph Pecoraro <[email protected]>
+
Web Inspector: Add back support for a heavy / bottom up profile view
https://bugs.webkit.org/show_bug.cgi?id=140578
<rdar://problem/19506794>
Added: trunk/Source/WebInspectorUI/UserInterface/Images/CallTrees.svg (0 => 197625)
--- trunk/Source/WebInspectorUI/UserInterface/Images/CallTrees.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/CallTrees.svg 2016-03-06 01:52:38 UTC (rev 197625)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2016 Apple Inc. All rights reserved. -->
+<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 16 16">
+ <path fill="rgb(245, 245, 245)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z"/>
+ <path fill="rgb(191, 191, 191)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
+ <path fill="rgb(203, 203, 203)" d="M 9 6 L 4 6 L 4 4 L 9 4 Z"/>
+ <path fill="rgb(203, 203, 203)" d="M 12 9 L 7 9 L 7 7 L 12 7 Z"/>
+ <path fill="rgb(203, 203, 203)" d="M 12 12 L 7 12 L 7 10 L 12 10 Z"/>
+ <path fill="rgb(222, 222, 222)" d="M 6 12 L 4 12 L 4 7 L 6 7 Z"/>
+</svg>
Added: trunk/Source/WebInspectorUI/UserInterface/Images/Events.svg (0 => 197625)
--- trunk/Source/WebInspectorUI/UserInterface/Images/Events.svg (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Events.svg 2016-03-06 01:52:38 UTC (rev 197625)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright © 2016 Apple Inc. All rights reserved. -->
+<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 16 16">
+ <path fill="rgb(245, 245, 245)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 Z"/>
+ <path fill="rgb(191, 191, 191)" d="M 13 1 L 3 1 C 1.898438 1 1 1.898438 1 3 L 1 13 C 1 14.101562 1.898438 15 3 15 L 13 15 C 14.101562 15 15 14.101562 15 13 L 15 3 C 15 1.898438 14.101562 1 13 1 M 13 2 C 13.550781 2 14 2.449219 14 3 L 14 13 C 14 13.550781 13.550781 14 13 14 L 3 14 C 2.449219 14 2 13.550781 2 13 L 2 3 C 2 2.449219 2.449219 2 3 2 L 13 2"/>
+ <path fill="rgb(203, 203, 203)" d="M 12 6 L 4 6 L 4 4 L 12 4 Z"/>
+ <path fill="rgb(203, 203, 203)" d="M 12 9 L 4 9 L 4 7 L 12 7 Z"/>
+ <path fill="rgb(203, 203, 203)" d="M 12 12 L 4 12 L 4 10 L 12 10 Z"/>
+</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/PathComponentIcons.css (197624 => 197625)
--- trunk/Source/WebInspectorUI/UserInterface/Views/PathComponentIcons.css 2016-03-06 01:23:49 UTC (rev 197624)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/PathComponentIcons.css 2016-03-06 01:52:38 UTC (rev 197625)
@@ -74,3 +74,17 @@
.program-icon .icon {
content: url(../Images/Program.svg);
}
+
+.events-icon .icon {
+ content: url(../Images/Events.svg);
+}
+
+.call-trees-icon .icon {
+ content: url(../Images/CallTrees.svg);
+}
+
+/* FIXME: <https://webkit.org/b/155077> [GTK] Web Inspector: Add new GTK+ icons for different Script Timeline Views */
+body:not(.mac-platform, .windows-platform) .events-icon .icon,
+body:not(.mac-platform, .windows-platform) .call-trees-icon .icon {
+ content: url(../Images/ResultLine.svg);
+}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js (197624 => 197625)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js 2016-03-06 01:23:49 UTC (rev 197624)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ScriptClusterTimelineView.js 2016-03-06 01:52:38 UTC (rev 197625)
@@ -33,7 +33,7 @@
this._extraArguments = extraArguments;
- this._currentContentViewSetting = new WebInspector.Setting("script-cluster-timeline-view-current-view", WebInspector.ScriptClusterTimelineView.DetailsIdentifier);
+ this._currentContentViewSetting = new WebInspector.Setting("script-cluster-timeline-view-current-view", WebInspector.ScriptClusterTimelineView.EventsIdentifier);
let showSelectorArrows = this._canShowProfileView();
function createPathComponent(displayName, className, identifier)
@@ -43,17 +43,16 @@
return pathComponent;
}
- let iconClassName = WebInspector.TimelineTabContentView.iconClassNameForTimeline(timeline);
- this._detailsPathComponent = createPathComponent.call(this, WebInspector.UIString("Details"), iconClassName, WebInspector.ScriptClusterTimelineView.DetailsIdentifier);
- this._profilePathComponent = createPathComponent.call(this, WebInspector.UIString("Call Trees"), iconClassName, WebInspector.ScriptClusterTimelineView.ProfileIdentifier);
+ this._eventsPathComponent = createPathComponent.call(this, WebInspector.UIString("Events"), "events-icon", WebInspector.ScriptClusterTimelineView.EventsIdentifier);
+ this._profilePathComponent = createPathComponent.call(this, WebInspector.UIString("Call Trees"), "call-trees-icon", WebInspector.ScriptClusterTimelineView.ProfileIdentifier);
if (this._canShowProfileView()) {
- this._detailsPathComponent.nextSibling = this._profilePathComponent;
- this._profilePathComponent.previousSibling = this._detailsPathComponent;
+ this._eventsPathComponent.nextSibling = this._profilePathComponent;
+ this._profilePathComponent.previousSibling = this._eventsPathComponent;
}
// FIXME: We should be able to create these lazily.
- this._detailsContentView = new WebInspector.ScriptDetailsTimelineView(this.representedObject, this._extraArguments);
+ this._eventsContentView = new WebInspector.ScriptDetailsTimelineView(this.representedObject, this._extraArguments);
this._profileContentView = this._canShowProfileView() ? new WebInspector.ScriptProfileTimelineView(this.representedObject, this._extraArguments) : null;
this._showContentViewForIdentifier(this._currentContentViewSetting.value);
@@ -79,9 +78,9 @@
// Public
- get detailsContentView()
+ get eventsContentView()
{
- return this._detailsContentView;
+ return this._eventsContentView;
}
get profileContentView()
@@ -112,15 +111,15 @@
this._showContentViewForIdentifier(cookie[WebInspector.ScriptClusterTimelineView.ContentViewIdentifierCookieKey]);
}
- showDetails()
+ showEvents()
{
- return this._showContentViewForIdentifier(WebInspector.ScriptClusterTimelineView.DetailsIdentifier);
+ return this._showContentViewForIdentifier(WebInspector.ScriptClusterTimelineView.EventsIdentifier);
}
showProfile()
{
if (!this._canShowProfileView())
- return showDetails();
+ return this.showEvents();
return this._showContentViewForIdentifier(WebInspector.ScriptClusterTimelineView.ProfileIdentifier);
}
@@ -138,8 +137,8 @@
console.assert(contentView);
if (!contentView)
return null;
- if (contentView === this._detailsContentView)
- return this._detailsPathComponent;
+ if (contentView === this._eventsContentView)
+ return this._eventsPathComponent;
if (contentView === this._profileContentView)
return this._profilePathComponent;
console.error("Unknown contentView.");
@@ -151,8 +150,8 @@
console.assert(contentView);
if (!contentView)
return null;
- if (contentView === this._detailsContentView)
- return WebInspector.ScriptClusterTimelineView.DetailsIdentifier;
+ if (contentView === this._eventsContentView)
+ return WebInspector.ScriptClusterTimelineView.EventsIdentifier;
if (contentView === this._profileContentView)
return WebInspector.ScriptClusterTimelineView.ProfileIdentifier;
console.error("Unknown contentView.");
@@ -164,8 +163,8 @@
let contentViewToShow = null;
switch (identifier) {
- case WebInspector.ScriptClusterTimelineView.DetailsIdentifier:
- contentViewToShow = this.detailsContentView;
+ case WebInspector.ScriptClusterTimelineView.EventsIdentifier:
+ contentViewToShow = this.eventsContentView;
break;
case WebInspector.ScriptClusterTimelineView.ProfileIdentifier:
contentViewToShow = this.profileContentView;
@@ -173,7 +172,7 @@
}
if (!contentViewToShow)
- contentViewToShow = this.detailsContentView;
+ contentViewToShow = this.eventsContentView;
console.assert(contentViewToShow);
@@ -190,7 +189,7 @@
_scriptClusterViewCurrentContentViewDidChange(event)
{
let currentContentView = this._contentViewContainer.currentContentView;
- let previousContentView = currentContentView === this._detailsContentView ? this._profileContentView : this._detailsContentView;
+ let previousContentView = currentContentView === this._eventsContentView ? this._profileContentView : this._eventsContentView;
currentContentView.zeroTime = previousContentView.zeroTime;
currentContentView.startTime = previousContentView.startTime;
@@ -203,5 +202,5 @@
WebInspector.ScriptClusterTimelineView.ContentViewIdentifierCookieKey = "script-cluster-timeline-view-identifier";
-WebInspector.ScriptClusterTimelineView.DetailsIdentifier = "details";
+WebInspector.ScriptClusterTimelineView.EventsIdentifier = "events";
WebInspector.ScriptClusterTimelineView.ProfileIdentifier = "profile";
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (197624 => 197625)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2016-03-06 01:23:49 UTC (rev 197624)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2016-03-06 01:52:38 UTC (rev 197625)
@@ -337,9 +337,6 @@
if (!(representedObject instanceof WebInspector.Timeline) && !(representedObject instanceof WebInspector.TimelineRecording))
return null;
- if (this.currentTimelineView instanceof WebInspector.ClusterContentView)
- return null;
-
let iconClassName;
let title;
if (representedObject instanceof WebInspector.Timeline) {