https://bugs.webkit.org/show_bug.cgi?id=141006
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New "Restart" string.
* UserInterface/Base/Main.js:
(WebInspector.canArchiveMainFrame):
* UserInterface/Views/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype.updateStatusForMainFrame):
(WebInspector.FrameTreeElement.prototype._updateDownloadButton):
Update the tooltip when in a non-Web debuggable, and only show
the Download button when in a Web debuggable.
* UserInterface/Views/TreeElementStatusButton.js:
(WebInspector.TreeElementStatusButton.prototype.set hidden):
Oops! The implementation was backwards. Simplify with classList.toggle.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179322
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-01-28 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Change Main Frame Status Buttons when debugging Augmented JSContext
+ https://bugs.webkit.org/show_bug.cgi?id=141006
+
+ Reviewed by Timothy Hatcher.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ New "Restart" string.
+
+ * UserInterface/Base/Main.js:
+ (WebInspector.canArchiveMainFrame):
+ * UserInterface/Views/FrameTreeElement.js:
+ (WebInspector.FrameTreeElement.prototype.updateStatusForMainFrame):
+ (WebInspector.FrameTreeElement.prototype._updateDownloadButton):
+ Update the tooltip when in a non-Web debuggable, and only show
+ the Download button when in a Web debuggable.
+
+ * UserInterface/Views/TreeElementStatusButton.js:
+ (WebInspector.TreeElementStatusButton.prototype.set hidden):
+ Oops! The implementation was backwards. Simplify with classList.toggle.
+
2015-01-28 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: remove CSS.setPropertyText, CSS.toggleProperty and related dead code
WebInspector.canArchiveMainFrame = function()
{
- if (!PageAgent.archive)
+ if (!PageAgent.archive || this.debuggableType !== WebInspector.DebuggableType.Web)
return false;
return WebInspector.Resource.typeFromMIMEType(WebInspector.frameResourceManager.mainFrame.mainResource.mimeType) === WebInspector.Resource.Type.Document;
if (!this._loadingMainFrameButtons) {
this._loadingMainFrameButtons = true;
- var tooltip = WebInspector.UIString("Reload page (%s)\nReload ignoring cache (%s)").format(WebInspector._reloadPageKeyboardShortcut.displayName, WebInspector._reloadPageIgnoringCacheKeyboardShortcut.displayName);
+ var tooltip;
+ if (WebInspector.debuggableType === WebInspector.DebuggableType.JavaScript)
+ tooltip = WebInspector.UIString("Restart (%s)").format(WebInspector._reloadPageKeyboardShortcut.displayName);
+ else
+ tooltip = WebInspector.UIString("Reload page (%s)\nReload ignoring cache (%s)").format(WebInspector._reloadPageKeyboardShortcut.displayName, WebInspector._reloadPageIgnoringCacheKeyboardShortcut.displayName);
+
wrappedSVGDocument(platformImagePath("Reload.svg"), null, tooltip, function(element) {
this._reloadButton = new WebInspector.TreeElementStatusButton(element);
this._reloadButton.addEventListener(WebInspector.TreeElementStatusButton.Event.Clicked, this._reloadPageClicked, this);
if (!this._downloadButton)
return;
- if (!PageAgent.archive) {
+ if (!PageAgent.archive || WebInspector.debuggableType !== WebInspector.DebuggableType.Web) {
this._downloadButton.hidden = true;
return;
}
set hidden(flag)
{
- if (flag)
- this._element.classList.remove("hidden");
- else
- this._element.classList.add("hidden");
+ this._element.classList.toggle("hidden", flag);
},
get enabled()