WebCore:
2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
Added a preference to disable some Inspector's panels (rdar://
6419624, rdar://
6419645).
This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
Reviewed by Timothy Hatcher.
* inspector/InspectorClient.h:
* inspector/InspectorController.cpp:
(WebCore::hiddenPanels):
(WebCore::InspectorController::hiddenPanels):
(WebCore::InspectorController::windowScriptObjectAvailable):
* inspector/InspectorController.h:
* inspector/front-end/inspector.js:
(WebInspector.loaded):
* loader/EmptyClients.h:
(WebCore::EmptyInspectorClient::hiddenPanels):
WebKit/gtk:
2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
Stub out InspectorClient::hiddenPanels.
Reviewed by Timothy Hatcher.
* WebCoreSupport/InspectorClientGtk.cpp:
(WebKit::InspectorClient::hiddenPanels):
* WebCoreSupport/InspectorClientGtk.h:
WebKit/mac:
2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
Added a preference to disable some Inspector's panels (rdar://
6419624, rdar://
6419645).
This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
Reviewed by Timothy Hatcher.
* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorClient::hiddenPanels):
WebKit/qt:
2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
Stub out InspectorClientQt::hiddenPanels.
Reviewed by Timothy Hatcher.
* WebCoreSupport/InspectorClientQt.cpp:
(WebCore::InspectorClientQt::hiddenPanels):
* WebCoreSupport/InspectorClientQt.h:
WebKit/win:
2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
Stub out WebInspectorClient::hiddenPanels.
Reviewed by Timothy Hatcher.
* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorClient::hiddenPanels):
* WebCoreSupport/WebInspectorClient.h:
WebKit/wx:
2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
Stub out InspectorClientWx::hiddenPanels.
Reviewed by Timothy Hatcher.
* WebKitSupport/InspectorClientWx.cpp:
(WebCore::InspectorClientWx::hiddenPanels):
* WebKitSupport/InspectorClientWx.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@40872
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
+
+ Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645).
+ This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/InspectorClient.h:
+ * inspector/InspectorController.cpp:
+ (WebCore::hiddenPanels):
+ (WebCore::InspectorController::hiddenPanels):
+ (WebCore::InspectorController::windowScriptObjectAvailable):
+ * inspector/InspectorController.h:
+ * inspector/front-end/inspector.js:
+ (WebInspector.loaded):
+ * loader/EmptyClients.h:
+ (WebCore::EmptyInspectorClient::hiddenPanels):
+
2009-02-11 David Hyatt <hyatt@apple.com>
Combine RenderObject::element() and RenderObject::node() into a single function.
virtual String localizedStringsURL() = 0;
+ virtual String hiddenPanels() = 0;
+
virtual void showWindow() = 0;
virtual void closeWindow() = 0;
return JSValueMakeString(ctx, jsStringRef(url).get());
}
+static JSValueRef hiddenPanels(JSContextRef ctx, JSObjectRef /*function*/, JSObjectRef thisObject, size_t /*argumentCount*/, const JSValueRef[] /*arguments[]*/, JSValueRef* /*exception*/)
+{
+ InspectorController* controller = reinterpret_cast<InspectorController*>(JSObjectGetPrivate(thisObject));
+ if (!controller)
+ return JSValueMakeUndefined(ctx);
+
+ String hiddenPanels = controller->hiddenPanels();
+ if (hiddenPanels.isNull())
+ return JSValueMakeNull(ctx);
+
+ return JSValueMakeString(ctx, jsStringRef(hiddenPanels).get());
+}
+
static JSValueRef platform(JSContextRef ctx, JSObjectRef /*function*/, JSObjectRef /*thisObject*/, size_t /*argumentCount*/, const JSValueRef[] /*arguments[]*/, JSValueRef* /*exception*/)
{
#if PLATFORM(MAC)
return m_client->localizedStringsURL();
}
+String InspectorController::hiddenPanels()
+{
+ if (!enabled())
+ return String();
+ return m_client->hiddenPanels();
+}
+
// Trying to inspect something in a frame with JavaScript disabled would later lead to
// crashes trying to create JavaScript wrappers. Some day we could fix this issue, but
// for now prevent crashes here by never targeting a node in such a frame.
{ "setSetting", WebCore::setSetting, kJSPropertyAttributeNone },
{ "inspectedWindow", WebCore::inspectedWindow, kJSPropertyAttributeNone },
{ "localizedStringsURL", WebCore::localizedStrings, kJSPropertyAttributeNone },
+ { "hiddenPanels", WebCore::hiddenPanels, kJSPropertyAttributeNone },
{ "platform", WebCore::platform, kJSPropertyAttributeNone },
{ "moveByUnrestricted", WebCore::moveByUnrestricted, kJSPropertyAttributeNone },
{ "setAttachedWindowHeight", WebCore::setAttachedWindowHeight, kJSPropertyAttributeNone },
void setSetting(const String& key, const Setting&);
String localizedStringsURL();
+ String hiddenPanels();
void inspect(Node*);
void highlight(Node*);
databases: new WebInspector.DatabasesPanel()
};
+ var hiddenPanels = (InspectorController.hiddenPanels() || "").split(',');
+
var toolbarElement = document.getElementById("toolbar");
var previousToolbarItem = toolbarElement.children[0];
for (var panelName in this.panels) {
+ if (hiddenPanels.indexOf(panelName) !== -1)
+ continue;
var panel = this.panels[panelName];
var panelToolbarItem = panel.toolbarItem;
panelToolbarItem.addEventListener("click", this._toolbarItemClicked.bind(this));
virtual String localizedStringsURL() { return String(); }
+ virtual String hiddenPanels() { return String(); }
+
virtual void showWindow() { }
virtual void closeWindow() { }
+2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
+
+ Stub out InspectorClient::hiddenPanels.
+
+ Reviewed by Timothy Hatcher.
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::InspectorClient::hiddenPanels):
+ * WebCoreSupport/InspectorClientGtk.h:
+
2009-02-07 Holger Hans Peter Freyther <zecke@selfish.org>
Unreviewed build fix Use toNormalizedRange().
return String();
}
+String InspectorClient::hiddenPanels()
+{
+ notImplemented();
+ return String();
+}
+
void InspectorClient::showWindow()
{
if (!m_webView)
virtual WebCore::String localizedStringsURL();
+ virtual WebCore::String hiddenPanels();
+
virtual void showWindow();
virtual void closeWindow();
+2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
+
+ Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645).
+ This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
+
+ Reviewed by Timothy Hatcher.
+
+ * WebCoreSupport/WebInspectorClient.h:
+ * WebCoreSupport/WebInspectorClient.mm:
+ (WebInspectorClient::hiddenPanels):
+
2009-02-11 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Darin Adler.
virtual WebCore::Page* createPage();
virtual WebCore::String localizedStringsURL();
+ virtual WebCore::String hiddenPanels();
+
virtual void showWindow();
virtual void closeWindow();
return String();
}
+String WebInspectorClient::hiddenPanels()
+{
+ NSString *hiddenPanels = [[NSUserDefaults standardUserDefaults] stringForKey:@"WebKitInspectorHiddenPanels"];
+ if (hiddenPanels)
+ return hiddenPanels;
+ return String();
+}
+
void WebInspectorClient::showWindow()
{
updateWindowTitle();
+2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
+
+ Stub out InspectorClientQt::hiddenPanels.
+
+ Reviewed by Timothy Hatcher.
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::hiddenPanels):
+ * WebCoreSupport/InspectorClientQt.h:
+
2009-02-10 Karsten Heimrich <kheimric@trolltech.com>
Reviewed by Simon Hausmann.
return String();
}
+String InspectorClientQt::hiddenPanels()
+{
+ notImplemented();
+ return String();
+}
+
void InspectorClientQt::showWindow()
{
if (!m_webPage)
virtual String localizedStringsURL();
+ virtual String hiddenPanels();
+
virtual void showWindow();
virtual void closeWindow();
virtual bool windowVisible();
+2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
+
+ Stub out WebInspectorClient::hiddenPanels.
+
+ Reviewed by Timothy Hatcher.
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorClient::hiddenPanels):
+ * WebCoreSupport/WebInspectorClient.h:
+
2009-02-11 Adam Roben <aroben@apple.com>
Don't release the shared WebHistory instance on quit
return CFURLGetString(url.get());
}
+
+String WebInspectorClient::hiddenPanels()
+{
+ // FIXME: implement this
+ return String();
+}
+
void WebInspectorClient::showWindow()
{
showWindowWithoutNotifications();
virtual WebCore::String localizedStringsURL();
+ virtual WebCore::String hiddenPanels();
+
virtual void showWindow();
virtual void closeWindow();
virtual bool windowVisible();
+2009-02-11 Dimitri Dupuis-latour <dupuislatour@apple.com>
+
+ Stub out InspectorClientWx::hiddenPanels.
+
+ Reviewed by Timothy Hatcher.
+
+ * WebKitSupport/InspectorClientWx.cpp:
+ (WebCore::InspectorClientWx::hiddenPanels):
+ * WebKitSupport/InspectorClientWx.h:
+
2009-02-06 Geoffrey Garen <ggaren@apple.com>
Build fix.
return String();
}
+String InspectorClientWx::hiddenPanels()
+{
+ notImplemented();
+ return String();
+}
+
void InspectorClientWx::showWindow()
{
notImplemented();
virtual String localizedStringsURL();
+ virtual String hiddenPanels();
+
virtual void showWindow();
virtual void closeWindow();