Changeset 181452 in webkit
- Timestamp:
- Mar 12, 2015, 1:32:29 PM (11 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 6 edited
-
ChangeLog (modified) (1 diff)
-
Localizations/en.lproj/localizedStrings.js (modified) (1 diff)
-
UserInterface/Main.html (modified) (2 diffs)
-
UserInterface/Views/DebuggerSidebarPanel.js (modified) (6 diffs)
-
UserInterface/Views/FolderTreeElement.js (modified) (2 diffs)
-
UserInterface/Views/ResourceSidebarPanel.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r181437 r181452 1 2015-03-12 Jono Wells <jonowells@apple.com> 2 3 Web Inspector: Debugger sidebar should group global breakpoints together 4 https://bugs.webkit.org/show_bug.cgi?id=142607 5 6 Reviewed by Timothy Hatcher. 7 8 Update the DebuggerSidebarPanel class to hold global breakpoints such as "All Exceptions" in one container. This 9 will be the place future such breakpoints are added. 10 11 * Localizations/en.lproj/localizedStrings.js: Added string. 12 * UserInterface/Main.html: Small rearrangement. 13 14 * UserInterface/Views/DebuggerSidebarPanel.js: Change how exception breaking options are displayed. 15 (WebInspector.DebuggerSidebarPanel): 16 (WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected): 17 (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements): 18 19 * UserInterface/Views/FolderTreeElement.js: Support additional classes for icons. 20 * UserInterface/Views/ResourceSidebarPanel.js: Change call to FolderTreeElement constructor. 21 1 22 2015-03-12 Joseph Pecoraro <pecoraro@apple.com> 2 23 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r181306 r181452 234 234 localizedStrings["Function"] = "Function"; 235 235 localizedStrings["Function Name Variable"] = "Function Name Variable"; 236 localizedStrings["Global Breakpoints"] = "Global Breakpoints"; 236 237 localizedStrings["Global Variables"] = "Global Variables"; 237 238 localizedStrings["Grammar"] = "Grammar"; -
trunk/Source/WebInspectorUI/UserInterface/Main.html
r181306 r181452 319 319 <script src="Views/DOMDetailsSidebarPanel.js"></script> 320 320 <script src="Views/ObjectTreeBaseTreeElement.js"></script> 321 <script src="Views/FolderTreeElement.js"></script> 321 322 <script src="Views/FolderizedTreeElement.js"></script> 322 323 <script src="Views/SourceCodeTreeElement.js"></script> … … 392 393 <script src="Views/FindBanner.js"></script> 393 394 <script src="Views/FlexibleSpaceNavigationItem.js"></script> 394 <script src="Views/FolderTreeElement.js"></script>395 395 <script src="Views/FontResourceContentView.js"></script> 396 396 <script src="Views/FormattedValue.js"></script> -
trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js
r181184 r181452 105 105 this.element.classList.add(WebInspector.DebuggerSidebarPanel.OffsetSectionsStyleClassName); 106 106 107 this._globalBreakpointsFolderTreeElement = new WebInspector.FolderTreeElement(WebInspector.UIString("Global Breakpoints"), null, WebInspector.DebuggerSidebarPanel.GlobalIconStyleClassName); 107 108 this._allExceptionsBreakpointTreeElement = new WebInspector.BreakpointTreeElement(WebInspector.debuggerManager.allExceptionsBreakpoint, WebInspector.DebuggerSidebarPanel.ExceptionIconStyleClassName, WebInspector.UIString("All Exceptions")); 108 109 this._allUncaughtExceptionsBreakpointTreeElement = new WebInspector.BreakpointTreeElement(WebInspector.debuggerManager.allUncaughtExceptionsBreakpoint, WebInspector.DebuggerSidebarPanel.ExceptionIconStyleClassName, WebInspector.UIString("All Uncaught Exceptions")); … … 115 116 this._breakpointsContentTreeOutline.oncontextmenu = this._breakpointTreeOutlineContextMenuTreeElement.bind(this); 116 117 117 this._breakpointsContentTreeOutline.appendChild(this._allExceptionsBreakpointTreeElement); 118 this._breakpointsContentTreeOutline.appendChild(this._allUncaughtExceptionsBreakpointTreeElement); 118 this._breakpointsContentTreeOutline.appendChild(this._globalBreakpointsFolderTreeElement); 119 this._globalBreakpointsFolderTreeElement.appendChild(this._allExceptionsBreakpointTreeElement); 120 this._globalBreakpointsFolderTreeElement.appendChild(this._allUncaughtExceptionsBreakpointTreeElement); 121 this._globalBreakpointsFolderTreeElement.expand(); 119 122 120 123 var breakpointsRow = new WebInspector.DetailsSectionRow; … … 148 151 WebInspector.DebuggerSidebarPanel.ExceptionIconStyleClassName = "breakpoint-exception-icon"; 149 152 WebInspector.DebuggerSidebarPanel.PausedBreakpointIconStyleClassName = "breakpoint-paused-icon"; 153 WebInspector.DebuggerSidebarPanel.GlobalIconStyleClassName = "global-breakpoints-icon"; 150 154 151 155 WebInspector.DebuggerSidebarPanel.SelectedAllExceptionsCookieKey = "debugger-sidebar-panel-all-exceptions-breakpoint"; … … 525 529 _breakpointTreeOutlineContextMenuTreeElement: function(event, treeElement) 526 530 { 527 console.assert(treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement );531 console.assert(treeElement instanceof WebInspector.ResourceTreeElement || treeElement instanceof WebInspector.ScriptTreeElement || treeElement.constructor === WebInspector.FolderTreeElement); 528 532 if (!(treeElement instanceof WebInspector.ResourceTreeElement) && !(treeElement instanceof WebInspector.ScriptTreeElement)) 529 533 return; … … 601 605 } 602 606 603 if (!(treeElement instanceof WebInspector.BreakpointTreeElement) )607 if (!(treeElement instanceof WebInspector.BreakpointTreeElement) || treeElement.parent.constructor === WebInspector.FolderTreeElement) 604 608 return; 605 609 … … 630 634 _compareTopLevelTreeElements: function(a, b) 631 635 { 632 if (a === this._ allExceptionsBreakpointTreeElement)636 if (a === this._globalBreakpointsFolderTreeElement) 633 637 return -1; 634 if (b === this._allExceptionsBreakpointTreeElement) 635 return 1; 636 637 if (a === this._allUncaughtExceptionsBreakpointTreeElement) 638 return -1; 639 if (b === this._allUncaughtExceptionsBreakpointTreeElement) 638 if (b === this._globalBreakpointsFolderTreeElement) 640 639 return 1; 641 640 -
trunk/Source/WebInspectorUI/UserInterface/Views/FolderTreeElement.js
r164543 r181452 24 24 */ 25 25 26 WebInspector.FolderTreeElement = function(title, subtitle, representedObject)26 WebInspector.FolderTreeElement = function(title, subtitle, additionalClassNames, representedObject) 27 27 { 28 WebInspector.GeneralTreeElement.call(this, WebInspector.FolderTreeElement.FolderIconStyleClassName, title, subtitle, representedObject, true); 28 var classNames; 29 if (!additionalClassNames) 30 classNames = []; 31 else if (additionalClassNames.constructor === Array) 32 classNames = additionalClassNames; 33 else if (typeof additionalClassNames === "string") 34 classNames = [additionalClassNames]; 35 36 classNames.unshift(WebInspector.FolderTreeElement.FolderIconStyleClassName); 37 38 WebInspector.GeneralTreeElement.call(this, classNames, title, subtitle, representedObject, true); 29 39 30 40 this.small = true; … … 34 44 35 45 WebInspector.FolderTreeElement.prototype = { 36 constructor: WebInspector.FolderTreeElement ,46 constructor: WebInspector.FolderTreeElement 37 47 38 48 // No Methods or Properties -
trunk/Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.js
r181388 r181452 911 911 this._resourcesContentTreeOutline.removeChild(previousOnlyChild); 912 912 913 var folderElement = new WebInspector.FolderTreeElement(folderName , null, null);913 var folderElement = new WebInspector.FolderTreeElement(folderName); 914 914 this._resourcesContentTreeOutline.insertChild(folderElement, insertionIndexForObjectInListSortedByFunction(folderElement, this._resourcesContentTreeOutline.children, this._compareTreeElements)); 915 915
Note:
See TracChangeset
for help on using the changeset viewer.