Changeset 223991 in webkit
- Timestamp:
- Oct 25, 2017 4:13:19 PM (6 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r223983 r223991 1 2017-10-25 Devin Rousso <webkit@devinrousso.com> 2 3 Web Inspector: Canvas Tab: clicking on a canvas card causes details sidebar to show and mess up card arrangement 4 https://bugs.webkit.org/show_bug.cgi?id=178803 5 <rdar://problem/35176082> 6 7 Reviewed by Brian Burg. 8 9 * Localizations/en.lproj/localizedStrings.js: 10 * UserInterface/Views/CanvasDetailsSidebarPanel.css: 11 (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder): 12 (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder > .message): 13 * UserInterface/Views/CanvasDetailsSidebarPanel.js: 14 (WI.CanvasDetailsSidebarPanel): 15 (WI.CanvasDetailsSidebarPanel.prototype.inspect): 16 (WI.CanvasDetailsSidebarPanel.prototype.initialLayout): 17 (WI.CanvasDetailsSidebarPanel.prototype.layout): 18 19 * UserInterface/Views/RecordingNavigationSidebarPanel.js: 20 (WI.RecordingNavigationSidebarPanel.disallowInstanceForClass): Deleted. 21 * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: 22 (WI.RecordingStateDetailsSidebarPanel.disallowInstanceForClass): Deleted. 23 * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js: 24 (WI.RecordingTraceDetailsSidebarPanel.disallowInstanceForClass): Deleted. 25 Drive-by: these sidebar panels are now only used by the Canvas tab, so we no longer need to 26 provide support for multiple instances of them. 27 1 28 2017-10-25 Joseph Pecoraro <pecoraro@apple.com> 2 29 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r223929 r223991 166 166 localizedStrings["Canvas %s"] = "Canvas %s"; 167 167 localizedStrings["Canvas Overview"] = "Canvas Overview"; 168 localizedStrings["Canvas:"] = "Canvas:";169 168 localizedStrings["Canvases"] = "Canvases"; 170 169 localizedStrings["Cap"] = "Cap"; … … 364 363 localizedStrings["Enable Breakpoint"] = "Enable Breakpoint"; 365 364 localizedStrings["Enable Breakpoints"] = "Enable Breakpoints"; 366 localizedStrings["Enable Canvas Tab"] = "Enable Canvas Tab";367 365 localizedStrings["Enable Layers Tab"] = "Enable Layers Tab"; 368 366 localizedStrings["Enable Program"] = "Enable Program"; … … 607 605 localizedStrings["No Box Model Information"] = "No Box Model Information"; 608 606 localizedStrings["No Breakpoints"] = "No Breakpoints"; 607 localizedStrings["No Canvas Selected"] = "No Canvas Selected"; 609 608 localizedStrings["No Chart Available"] = "No Chart Available"; 610 609 localizedStrings["No Child Layers"] = "No Child Layers"; … … 835 834 localizedStrings["Show Console"] = "Show Console"; 836 835 localizedStrings["Show Console tab"] = "Show Console tab"; 837 localizedStrings["Show Contexts in Resources Tab"] = "Show Contexts in Resources Tab";838 836 localizedStrings["Show Grid"] = "Show Grid"; 839 837 localizedStrings["Show Path"] = "Show Path"; -
trunk/Source/WebInspectorUI/UserInterface/Views/CanvasDetailsSidebarPanel.css
r219268 r223991 27 27 display: block; 28 28 } 29 30 .sidebar > .panel.details.canvas > .content > .empty-content-placeholder { 31 position: absolute; 32 top: 0; 33 right: 0; 34 bottom: 0; 35 left: 0; 36 padding: 15px 0; 37 display: flex; 38 justify-content: center; 39 align-items: center; 40 overflow: hidden; 41 } 42 43 .sidebar > .panel.details.canvas > .content > .empty-content-placeholder > .message { 44 display: inline-block; 45 padding: 5px 15px 6px; 46 font-size: var(--sidebar-no-results-message-font-size); 47 white-space: nowrap; 48 color: var(--text-color-gray-medium); 49 } -
trunk/Source/WebInspectorUI/UserInterface/Views/CanvasDetailsSidebarPanel.js
r223921 r223991 34 34 this._canvas = null; 35 35 this._node = null; 36 37 this._sections = []; 38 this._emptyContentPlaceholder = null; 36 39 } 37 40 … … 53 56 this.canvas = objects.find((object) => object instanceof WI.Canvas); 54 57 55 return !!this._canvas;58 return true; 56 59 } 57 60 … … 101 104 let identitySection = new WI.DetailsSection("canvas-details", WI.UIString("Identity")); 102 105 identitySection.groups = [new WI.DetailsSectionGroup([this._nameRow, this._typeRow, this._memoryRow])]; 103 this. contentView.element.appendChild(identitySection.element);106 this._sections.push(identitySection); 104 107 105 108 this._nodeRow = new WI.DetailsSectionSimpleRow(WI.UIString("Node")); … … 111 114 let sourceSection = new WI.DetailsSection("canvas-source", WI.UIString("Source")); 112 115 sourceSection.groups = [new WI.DetailsSectionGroup([this._nodeRow, this._cssCanvasRow, this._widthRow, this._heightRow, this._datachedRow])]; 113 this. contentView.element.appendChild(sourceSection.element);116 this._sections.push(sourceSection); 114 117 115 118 this._attributesDataGridRow = new WI.DetailsSectionDataGridRow(null, WI.UIString("No Attributes")); … … 117 120 let attributesSection = new WI.DetailsSection("canvas-attributes", WI.UIString("Attributes")); 118 121 attributesSection.groups = [new WI.DetailsSectionGroup([this._attributesDataGridRow])]; 119 this. contentView.element.appendChild(attributesSection.element);122 this._sections.push(attributesSection); 120 123 121 124 this._cssCanvasClientsRow = new WI.DetailsSectionSimpleRow(WI.UIString("Nodes")); … … 124 127 this._cssCanvasSection.groups = [new WI.DetailsSectionGroup([this._cssCanvasClientsRow])]; 125 128 this._cssCanvasSection.element.hidden = true; 126 this.contentView.element.appendChild(this._cssCanvasSection.element); 129 this._sections.push(this._cssCanvasSection); 130 131 this._emptyContentPlaceholder = document.createElement("div"); 132 this._emptyContentPlaceholder.className = "empty-content-placeholder"; 133 134 let emptyContentPlaceholderMessage = this._emptyContentPlaceholder.appendChild(document.createElement("div")); 135 emptyContentPlaceholderMessage.className = "message"; 136 emptyContentPlaceholderMessage.textContent = WI.UIString("No Canvas Selected"); 127 137 } 128 138 … … 131 141 super.layout(); 132 142 133 if (!this._canvas) 134 return; 143 this.contentView.element.removeChildren(); 144 145 if (!this._canvas) { 146 this.contentView.element.appendChild(this._emptyContentPlaceholder); 147 return; 148 } 149 150 this.contentView.element.append(...this._sections.map(section => section.element)); 135 151 136 152 this._refreshIdentitySection(); -
trunk/Source/WebInspectorUI/UserInterface/Views/RecordingNavigationSidebarPanel.js
r223918 r223991 37 37 this._importButton = null; 38 38 this._exportButton = null; 39 }40 41 // Static42 43 static disallowInstanceForClass()44 {45 return true;46 39 } 47 40 -
trunk/Source/WebInspectorUI/UserInterface/Views/RecordingStateDetailsSidebarPanel.js
r222124 r223991 34 34 35 35 this._dataGrid = null; 36 }37 38 // Static39 40 static disallowInstanceForClass()41 {42 return true;43 36 } 44 37 -
trunk/Source/WebInspectorUI/UserInterface/Views/RecordingTraceDetailsSidebarPanel.js
r222124 r223991 32 32 this._recording = null; 33 33 this._action = null; 34 }35 36 // Static37 38 static disallowInstanceForClass()39 {40 return true;41 34 } 42 35
Note: See TracChangeset
for help on using the changeset viewer.