Title: [183341] trunk/Source/WebInspectorUI
- Revision
- 183341
- Author
- [email protected]
- Date
- 2015-04-25 18:27:03 -0700 (Sat, 25 Apr 2015)
Log Message
Web Inspector: Make JSContext debugging work with Tabs UI
https://bugs.webkit.org/show_bug.cgi?id=144203
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector._isTabTypeAllowed):
(WebInspector.activateExtraDomains):
(WebInspector._updateReloadToolbarButton):
(WebInspector._updateDownloadToolbarButton):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (183340 => 183341)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-04-26 01:26:41 UTC (rev 183340)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-04-26 01:27:03 UTC (rev 183341)
@@ -1,5 +1,19 @@
2015-04-25 Timothy Hatcher <[email protected]>
+ Web Inspector: Make JSContext debugging work with Tabs UI
+ https://bugs.webkit.org/show_bug.cgi?id=144203
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector.contentLoaded):
+ (WebInspector._isTabTypeAllowed):
+ (WebInspector.activateExtraDomains):
+ (WebInspector._updateReloadToolbarButton):
+ (WebInspector._updateDownloadToolbarButton):
+
+2015-04-25 Timothy Hatcher <[email protected]>
+
Web Inspector: Save and restore tab state on reload and between sessions
https://bugs.webkit.org/show_bug.cgi?id=144202
Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (183340 => 183341)
--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2015-04-26 01:26:41 UTC (rev 183340)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js 2015-04-26 01:27:03 UTC (rev 183341)
@@ -274,6 +274,7 @@
this._downloadToolbarButton = new WebInspector.ButtonToolbarItem("download", WebInspector.UIString("Download Web Archive"), null, "Images/DownloadArrow.svg");
this._downloadToolbarButton.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._downloadWebArchive, this);
+ this._updateReloadToolbarButton();
this._updateDownloadToolbarButton();
// The toolbar button for node inspection.
@@ -325,7 +326,14 @@
this._updateDockNavigationItems();
this._updateToolbarHeight();
+ this._pendingOpenTabTypes = [];
+
for (var tabType of this._openTabsSetting.value) {
+ if (!this._isTabTypeAllowed(tabType)) {
+ this._pendingOpenTabTypes.push(tabType);
+ continue;
+ }
+
var tabContentView = this._tabContentViewForType(tabType);
if (!tabContentView)
continue;
@@ -361,6 +369,18 @@
this.runBootstrapOperations();
};
+WebInspector._isTabTypeAllowed = function(tabType)
+{
+ switch (tabType) {
+ case WebInspector.ElementsTabContentView.Type:
+ return !!window.DOMAgent;
+ case WebInspector.TimelineTabContentView.Type:
+ return !!window.TimelineAgent;
+ }
+
+ return true;
+};
+
WebInspector._tabContentViewForType = function(tabType)
{
switch (tabType) {
@@ -411,6 +431,27 @@
this.notifications.dispatchEventToListeners(WebInspector.Notification.ExtraDomainsActivated, {"domains": domains});
WebInspector.CSSCompletions.requestCSSNameCompletions();
+
+ this._updateReloadToolbarButton();
+ this._updateDownloadToolbarButton();
+
+ var stillPendingOpenTabTypes = [];
+ for (var tabType of this._pendingOpenTabTypes) {
+ if (!this._isTabTypeAllowed(tabType)) {
+ stillPendingOpenTabTypes.push(tabType);
+ continue;
+ }
+
+ var tabContentView = this._tabContentViewForType(tabType);
+ if (!tabContentView)
+ continue;
+
+ this.tabBrowser.addTabForContentView(tabContentView, true);
+
+ tabContentView.restoreStateFromCookie();
+ }
+
+ this._pendingOpenTabTypes = stillPendingOpenTabTypes;
};
WebInspector.contentBrowserTreeElementForRepresentedObject = function(contentBrowser, representedObject)
@@ -1387,9 +1428,19 @@
PageAgent.reload(true);
};
+WebInspector._updateReloadToolbarButton = function()
+{
+ if (!window.PageAgent || !PageAgent.reload) {
+ this._reloadToolbarButton.hidden = true;
+ return;
+ }
+
+ this._reloadToolbarButton.hidden = false;
+};
+
WebInspector._updateDownloadToolbarButton = function()
{
- if (!PageAgent.archive || this.debuggableType !== WebInspector.DebuggableType.Web) {
+ if (!window.PageAgent || !PageAgent.archive || this.debuggableType !== WebInspector.DebuggableType.Web) {
this._downloadToolbarButton.hidden = true;
return;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes