Title: [165012] trunk/Source/WebInspectorUI
- Revision
- 165012
- Author
- [email protected]
- Date
- 2014-03-03 15:04:55 -0800 (Mon, 03 Mar 2014)
Log Message
Remove an innocuous error message and support default views for Resource and Debugger sidebars.
https://bugs.webkit.org/show_bug.cgi?id=129622
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView): Added.
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showDefaultContentView): Added.
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Don't log an error
if the tree element isn't a Script. We try to find any represented object, and it can fail.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (165011 => 165012)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-03-03 22:42:28 UTC (rev 165011)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-03-03 23:04:55 UTC (rev 165012)
@@ -1,5 +1,20 @@
2014-03-03 Timothy Hatcher <[email protected]>
+ Remove an innocuous error message and support default views for Resource and Debugger sidebars.
+
+ https://bugs.webkit.org/show_bug.cgi?id=129622
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Views/DebuggerSidebarPanel.js:
+ (WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView): Added.
+ * UserInterface/Views/ResourceSidebarPanel.js:
+ (WebInspector.ResourceSidebarPanel.prototype.showDefaultContentView): Added.
+ (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Don't log an error
+ if the tree element isn't a Script. We try to find any represented object, and it can fail.
+
+2014-03-03 Timothy Hatcher <[email protected]>
+
Fix an exception caused by trying to access the DOM before it is loaded.
https://bugs.webkit.org/show_bug.cgi?id=129617
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js (165011 => 165012)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js 2014-03-03 22:42:28 UTC (rev 165011)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js 2014-03-03 23:04:55 UTC (rev 165012)
@@ -129,6 +129,11 @@
// Public
+ showDefaultContentView: function()
+ {
+ WebInspector.resourceSidebarPanel.showMainFrameSourceCode();
+ },
+
treeElementForRepresentedObject: function(representedObject)
{
// The main resource is used as the representedObject instead of Frame in our tree.
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js (165011 => 165012)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js 2014-03-03 22:42:28 UTC (rev 165011)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js 2014-03-03 23:04:55 UTC (rev 165012)
@@ -100,6 +100,11 @@
// Public
+ showDefaultContentView: function()
+ {
+ this.showMainFrameDOMTree();
+ },
+
get contentTreeOutlineToAutoPrune()
{
return this._searchContentTreeOutline;
@@ -261,10 +266,8 @@
return treeElement;
// Only special case Script objects.
- if (!(representedObject instanceof WebInspector.Script)) {
- console.error("Didn't find a TreeElement for a representedObject associated with the ResourceSidebarPanel.");
+ if (!(representedObject instanceof WebInspector.Script))
return null;
- }
// If the Script has a URL we should have found it earlier.
if (representedObject.url) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes