Changeset 243271 in webkit
- Timestamp:
- Mar 20, 2019, 7:23:21 PM (7 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Views/CallFrameTreeElement.css (modified) (2 diffs)
-
UserInterface/Views/SourcesNavigationSidebarPanel.css (modified) (3 diffs)
-
UserInterface/Views/SourcesNavigationSidebarPanel.js (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r243269 r243271 1 2019-03-20 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Sources: collapsing a section doesn't shrink the space used by that section 4 https://bugs.webkit.org/show_bug.cgi?id=196045 5 6 Reviewed by Timothy Hatcher. 7 8 * UserInterface/Views/SourcesNavigationSidebarPanel.js: 9 (WI.SourcesNavigationSidebarPanel): 10 (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused): 11 (WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed): 12 * UserInterface/Views/SourcesNavigationSidebarPanel.css: 13 (.sidebar > .panel.navigation.sources > .content > .details-section): 14 (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoins).collapsed > .header > .options,): 15 (.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content): 16 (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint): 17 (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.pause-reason, .call-stack, .breakpoints) > .content,): 18 (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints) > .content): 19 (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content): 20 (.sidebar > .panel.navigation.sources > .content > .details-section.call-stack): 21 (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints): 22 (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .create-breakpoint): 23 (.sidebar > .panel.navigation.sources > .content > .pause-reason): 24 (.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content,): 25 (.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .tree-outline .item.event-target-window .icon): 26 (.sidebar > .panel.navigation.sources > .content .details-section): Deleted. 27 (.sidebar > .panel.navigation.sources > .content .details-section:matches(.paused-reason, .breakpoins).collapsed > .header > .options,): Deleted. 28 (.sidebar > .panel.navigation.sources > .content .details-section.collapsed > .content): Deleted. 29 (.sidebar > .panel.navigation.sources > .content .details-section.breakpoints > .header > .options .create-breakpoint): Deleted. 30 (.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Deleted. 31 (.sidebar > .panel.navigation.sources > .content > .call-stack-container): Deleted. 32 (.sidebar > .panel.navigation.sources > .content > .breakpoints-container): Deleted. 33 (.sidebar > .panel.navigation.sources > .content > .breakpoints-container .create-breakpoint): Deleted. 34 (.sidebar > .panel.navigation.sources > .content > .resources-container): Deleted. 35 (.sidebar > .panel.navigation.sources > .content > .pause-reason-container): Deleted. 36 (.sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container)): Deleted. 37 (.sidebar > .panel.navigation.sources > .content > .breakpoints .tree-outline .item.event-target-window .icon): Deleted. 38 - Apply the overflow scrolling to the content element of each `WI.DetailsSection`. 39 - Ensure that there is a maximum height for each section. 40 - When `.collapsed`, don't try to grow/shrink the section based on its contents. 41 42 * UserInterface/Views/CallFrameTreeElement.css: 43 (.tree-outline .item.call-frame): 44 (.tree-outline .item.call-frame .status): 45 Make the container of the active call frame status indicator relatively positioned so that 46 the active call frame status indicator will follow the container when scrolling. 47 1 48 2019-03-20 Devin Rousso <drousso@apple.com> 2 49 -
trunk/Source/WebInspectorUI/UserInterface/Views/CallFrameTreeElement.css
r242768 r243271 24 24 */ 25 25 26 .tree-outline .item.call-frame { 27 position: relative; 28 } 29 26 30 .tree-outline .item.call-frame .status { 27 31 position: absolute; … … 29 33 -webkit-margin-start: 1px; 30 34 31 --call-frame-status-start: 1 px;35 --call-frame-status-start: 11px; 32 36 } 33 37 -
trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.css
r243244 r243271 67 67 } 68 68 69 .sidebar > .panel.navigation.sources > .content .details-section {69 .sidebar > .panel.navigation.sources > .content > .details-section { 70 70 padding-bottom: 1px; 71 71 font-size: 11px; 72 border-bottom : none;72 border-bottom-width: 1px !important; 73 73 } 74 74 75 .sidebar > .panel.navigation.sources > .content .details-section:matches(.paused-reason, .breakpoins).collapsed > .header > .options,76 .sidebar > .panel.navigation.sources > .content .details-section > .content,77 .sidebar > .panel.navigation.sources > .content .details-section > .content > .group {75 .sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoins).collapsed > .header > .options, 76 .sidebar > .panel.navigation.sources > .content > .details-section > .content, 77 .sidebar > .panel.navigation.sources > .content > .details-section > .content > .group { 78 78 display: block; 79 79 } 80 80 81 .sidebar > .panel.navigation.sources > .content .details-section.collapsed > .content {81 .sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content { 82 82 display: none; 83 83 } 84 84 85 .sidebar > .panel.navigation.sources > .content .details-section.breakpoints > .header > .options .create-breakpoint {85 .sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint { 86 86 width: 15px; 87 87 } 88 88 89 .sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container) {90 border-bottom: 1px solid var(--border-color); 89 .sidebar > .panel.navigation.sources > .content > .details-section:matches(.pause-reason, .call-stack, .breakpoints) > .content, 90 .sidebar > .panel.navigation.sources > .content > .tree-outline.resources { 91 91 overflow-y: auto; 92 92 } 93 93 94 .sidebar > .panel.navigation.sources > .content > .call-stack-container { 95 /* 24px from .details-section > .header (23px height and -1px top) */ 96 /* 1px from .sidebar > .panel.navigation.sources > .content > .call-stack-container (border-bottom) */ 97 /* 5.5 to ensure that half of the next item is shown when overflowing */ 98 min-height: calc(25px + calc(min(var(--call-stack-count), 5.5) * 20px)); 94 .sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints) > .content { 95 /* Same calculation as below, but without var(--item-count) */ 96 max-height: 110px; 99 97 } 100 98 101 .sidebar > .panel.navigation.sources > .content > .breakpoints-container { 102 /* 24px from `.details-section > .header` (23px height and -1px top) */ 103 /* 1px from .sidebar > .panel.navigation.sources > .content > .breakpoints-container (border-bottom) */ 99 .sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content { 100 /* 1px from .sidebar > .panel.navigation.sources > .content > .details-section (border-bottom) */ 104 101 /* 5.5 to ensure that half of the next item is shown when overflowing */ 105 min-height: calc( 25px + calc(min(var(--breakpoints-count), 5.5) * 20px));102 min-height: calc(min(var(--item-count), 5.5) * 20px); 106 103 } 107 104 108 .sidebar > .panel.navigation.sources > .content > .breakpoints-container .create-breakpoint { 105 .sidebar > .panel.navigation.sources > .content > .details-section.call-stack { 106 --item-count: var(--call-stack-count); 107 } 108 109 .sidebar > .panel.navigation.sources > .content > .details-section.breakpoints { 110 --item-count: var(--breakpoints-count); 111 } 112 113 .sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .create-breakpoint { 109 114 width: 15px; 110 115 } … … 112 117 .sidebar > .panel.navigation.sources > .content > .navigation-bar { 113 118 margin-bottom: 1px; 114 }115 116 .sidebar > .panel.navigation.sources > .content > .resources-container {117 overflow-y: auto;118 119 } 119 120 … … 133 134 } 134 135 135 .sidebar > .panel.navigation.sources > .content > .pause-reason -container{136 .sidebar > .panel.navigation.sources > .content > .pause-reason { 136 137 flex-shrink: 0; 137 138 } 138 139 139 .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container) { 140 .sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content, 141 .sidebar > .panel.navigation.sources > .content > .tree-outline.resources { 140 142 height: 100%; 141 143 } 142 144 } 143 145 144 .sidebar > .panel.navigation.sources > .content > . breakpoints .tree-outline .item.event-target-window .icon {146 .sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .tree-outline .item.event-target-window .icon { 145 147 content: url(../Images/TypeObject.svg); 146 148 } -
trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js
r243244 r243271 112 112 this._pauseReasonTextRow = new WI.DetailsSectionTextRow; 113 113 this._pauseReasonGroup = new WI.DetailsSectionGroup([this._pauseReasonTextRow]); 114 let pauseReasonSection = new WI.DetailsSection("paused-reason", WI.UIString("Pause Reason"), [this._pauseReasonGroup], this._pauseReasonLinkContainerElement); 115 116 this._pauseReasonContainer = document.createElement("div"); 117 this._pauseReasonContainer.className = "pause-reason-container"; 118 this._pauseReasonContainer.appendChild(pauseReasonSection.element); 114 this._pauseReasonSection = new WI.DetailsSection("paused-reason", WI.UIString("Pause Reason"), [this._pauseReasonGroup], this._pauseReasonLinkContainerElement); 119 115 120 116 this._callStackTreeOutline = this.createContentTreeOutline({suppressFiltering: true}); … … 127 123 128 124 let callStackGroup = new WI.DetailsSectionGroup([callStackRow]); 129 let callStackSection = new WI.DetailsSection("call-stack", WI.UIString("Call Stack"), [callStackGroup]); 130 131 this._callStackContainer = document.createElement("div"); 132 this._callStackContainer.className = "call-stack-container"; 133 this._callStackContainer.appendChild(callStackSection.element); 125 this._callStackSection = new WI.DetailsSection("call-stack", WI.UIString("Call Stack"), [callStackGroup]); 134 126 135 127 this._mainTargetTreeElement = null; … … 201 193 202 194 let breakpointsGroup = new WI.DetailsSectionGroup([breakpointsRow]); 203 let breakpointsSection = new WI.DetailsSection("breakpoints", WI.UIString("Breakpoints"), [breakpointsGroup], breakpointNavigationBarWrapper); 204 205 let breakpointsContainer = this.contentView.element.insertBefore(document.createElement("div"), this.contentView.element.firstChild); 206 breakpointsContainer.classList.add("breakpoints-container"); 207 breakpointsContainer.appendChild(breakpointsSection.element); 195 this._breakpointsSection = new WI.DetailsSection("breakpoints", WI.UIString("Breakpoints"), [breakpointsGroup], breakpointNavigationBarWrapper); 196 this.contentView.element.insertBefore(this._breakpointsSection.element, this.contentView.element.firstChild); 208 197 209 198 this._resourcesNavigationBar = new WI.NavigationBar; 210 199 this.contentView.addSubview(this._resourcesNavigationBar); 211 this.contentView.element.insertBefore(this._resourcesNavigationBar.element, breakpointsSection.nextSibling);200 this.contentView.element.insertBefore(this._resourcesNavigationBar.element, this._breakpointsSection.element.nextSibling); 212 201 213 202 this._resourcesNavigationBar.addNavigationItem(new WI.FlexibleSpaceNavigationItem); … … 234 223 this._resourcesNavigationBar.addNavigationItem(resourceGroupingModeNavigationItem); 235 224 236 let resourcesContainer = this.contentView.element.insertBefore(document.createElement("div"), this._resourcesNavigationBar.element.nextSibling);237 resourcesContainer.classList.add("resources-container");238 239 225 this._resourcesTreeOutline = this.contentTreeOutline; 226 this._resourcesTreeOutline.element.classList.add("resources"); 240 227 this._resourcesTreeOutline.addEventListener(WI.TreeOutline.Event.SelectionDidChange, this._handleTreeSelectionDidChange, this); 241 228 this._resourcesTreeOutline.includeSourceMapResourceChildren = true; 242 resourcesContainer.appendChild(this._resourcesTreeOutline.element);229 this.contentView.element.insertBefore(this._resourcesTreeOutline.element, this._resourcesNavigationBar.element.nextSibling); 243 230 244 231 let onlyShowResourcesWithIssuesFilterFunction = (treeElement) => { … … 1698 1685 _handleDebuggerPaused(event) 1699 1686 { 1700 this.contentView.element.insertBefore(this._callStack Container, this.contentView.element.firstChild);1687 this.contentView.element.insertBefore(this._callStackSection.element, this.contentView.element.firstChild); 1701 1688 1702 1689 if (this._updatePauseReason()) 1703 this.contentView.element.insertBefore(this._pauseReason Container, this.contentView.element.firstChild);1690 this.contentView.element.insertBefore(this._pauseReasonSection.element, this.contentView.element.firstChild); 1704 1691 1705 1692 this._debuggerPauseResumeButtonItem.enabled = true; … … 1714 1701 _handleDebuggerResumed(event) 1715 1702 { 1716 this._callStack Container.remove();1717 1718 this._pauseReason Container.remove();1703 this._callStackSection.element.remove(); 1704 1705 this._pauseReasonSection.element.remove(); 1719 1706 1720 1707 this._debuggerPauseResumeButtonItem.enabled = true;
Note:
See TracChangeset
for help on using the changeset viewer.