Changeset 225250 in webkit
- Timestamp:
- Nov 28, 2017 5:47:01 PM (6 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r225246 r225250 1 2017-11-28 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Network Tab - Add a toggle in the network tab to control automatically clearing or preserving log across loads 4 https://bugs.webkit.org/show_bug.cgi?id=180110 5 <rdar://problem/34071789> 6 7 Reviewed by Timothy Hatcher. 8 9 * Localizations/en.lproj/localizedStrings.js: 10 New strings. 11 12 * UserInterface/Views/CheckboxNavigationItem.css: 13 (.navigation-bar .item.checkbox input[type=checkbox]): 14 Tweak style to more center the checkbox vertically. 15 16 * UserInterface/Views/CheckboxNavigationItem.js: 17 (WI.CheckboxNavigationItem): 18 Fix setting the initial value of a checkbox navigation item. 19 20 * UserInterface/Views/NetworkTableContentView.js: 21 (WI.NetworkTableContentView): 22 (WI.NetworkTableContentView.prototype.get navigationItems): 23 (WI.NetworkTableContentView.prototype.closed): 24 (WI.NetworkTableContentView.prototype._clearNetworkOnNavigateSettingChanged): 25 Add a new checkbox for the clear on navigation setting. 26 27 * UserInterface/Views/SettingEditor.js: 28 (WI.SettingEditor.createForSetting): 29 Update the editor checkbox if the setting changes outside of the setting editor. 30 31 * UserInterface/Views/NavigationItem.js: 32 (WI.NavigationItem.prototype.get tooltip): 33 (WI.NavigationItem.prototype.set tooltip): 34 * UserInterface/Views/ActivateButtonNavigationItem.js: 35 (WI.ActivateButtonNavigationItem.prototype.set activated): 36 * UserInterface/Views/ButtonNavigationItem.js: 37 (WI.ButtonNavigationItem): 38 (WI.ButtonNavigationItem.prototype.get toolTip): Deleted. 39 (WI.ButtonNavigationItem.prototype.set toolTip): Deleted. 40 * UserInterface/Views/ToggleButtonNavigationItem.js: 41 (WI.ToggleButtonNavigationItem.prototype.set alternateToolTip): 42 (WI.ToggleButtonNavigationItem.prototype.set toggled): 43 Move tooltip to the base class and rename it from `toolTip` to `tooltip` to 44 match existing generic places like TreeElement. 45 1 46 2017-11-28 Joseph Pecoraro <pecoraro@apple.com> 2 47 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r225244 r225250 308 308 localizedStrings["Display"] = "Display"; 309 309 localizedStrings["Displayed Columns"] = "Displayed Columns"; 310 localizedStrings["Do not clear network items on new page loads"] = "Do not clear network items on new page loads"; 310 311 localizedStrings["Do not fade unexecuted code"] = "Do not fade unexecuted code"; 311 312 localizedStrings["Dock to bottom of window"] = "Dock to bottom of window"; … … 701 702 localizedStrings["Position Y"] = "Position Y"; 702 703 localizedStrings["Prefer indent using:"] = "Prefer indent using:"; 704 localizedStrings["Preserve Log"] = "Preserve Log"; 703 705 localizedStrings["Pressed"] = "Pressed"; 704 706 localizedStrings["Pretty print"] = "Pretty print"; -
trunk/Source/WebInspectorUI/UserInterface/Views/ActivateButtonNavigationItem.js
r220119 r225250 57 57 58 58 if (flag) { 59 this.tool Tip = this._activatedToolTip;59 this.tooltip = this._activatedToolTip; 60 60 if (this._role === "tab") 61 61 this.element.setAttribute("aria-selected", "true"); 62 62 } else { 63 this.tool Tip = this._defaultToolTip;63 this.tooltip = this._defaultToolTip; 64 64 if (this._role === "tab") 65 65 this.element.removeAttribute("aria-selected"); -
trunk/Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.js
r224978 r225250 35 35 this._enabled = true; 36 36 37 this.tool Tip = toolTipOrLabel;37 this.tooltip = toolTipOrLabel; 38 38 39 39 this.element.addEventListener("click", this._mouseClicked.bind(this)); … … 53 53 54 54 // Public 55 56 get toolTip()57 {58 return this.element.title;59 }60 61 set toolTip(newToolTip)62 {63 console.assert(newToolTip);64 if (!newToolTip)65 return;66 67 this.element.title = newToolTip;68 }69 55 70 56 get label() -
trunk/Source/WebInspectorUI/UserInterface/Views/CheckboxNavigationItem.css
r224978 r225250 32 32 -webkit-padding-start: 3px; 33 33 } 34 35 .navigation-bar .item.checkbox input[type=checkbox] { 36 position: relative; 37 top: 1px; 38 } -
trunk/Source/WebInspectorUI/UserInterface/Views/CheckboxNavigationItem.js
r224978 r225250 31 31 32 32 this._checkboxElement = this.element.appendChild(document.createElement("input")); 33 this._checkboxElement.checked = !checked;33 this._checkboxElement.checked = checked; 34 34 this._checkboxElement.id = "checkbox-navigation-item-" + identifier; 35 35 this._checkboxElement.type = "checkbox"; -
trunk/Source/WebInspectorUI/UserInterface/Views/NavigationItem.js
r221338 r225250 89 89 } 90 90 91 get tooltip() 92 { 93 return this.element.title; 94 } 95 96 set tooltip(x) 97 { 98 this.element.title = x; 99 } 100 91 101 // Protected 92 102 -
trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js
r225246 r225250 97 97 this._emptyFilterResultsMessageElement = null; 98 98 99 this._clearOnLoadNavigationItem = new WI.CheckboxNavigationItem("perserve-log", WI.UIString("Preserve Log"), !WI.settings.clearNetworkOnNavigate.value); 100 this._clearOnLoadNavigationItem.tooltip = WI.UIString("Do not clear network items on new page loads"); 101 this._clearOnLoadNavigationItem.addEventListener(WI.CheckboxNavigationItem.Event.CheckedDidChange, () => { WI.settings.clearNetworkOnNavigate.value = !WI.settings.clearNetworkOnNavigate.value; }); 102 WI.settings.clearNetworkOnNavigate.addEventListener(WI.Setting.Event.Changed, this._clearNetworkOnNavigateSettingChanged, this); 103 99 104 this._harExportNavigationItem = new WI.ButtonNavigationItem("har-export", WI.UIString("Export"), "Images/Export.svg", 15, 15); 100 105 this._harExportNavigationItem.buttonStyle = WI.ButtonNavigationItem.Style.ImageAndText; 101 this._harExportNavigationItem.tool Tip = WI.UIString("HAR Export (%s)").format(WI.saveKeyboardShortcut.displayName);106 this._harExportNavigationItem.tooltip = WI.UIString("HAR Export (%s)").format(WI.saveKeyboardShortcut.displayName); 102 107 this._harExportNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, () => { this._exportHAR(); }); 108 109 this._checkboxsNavigationItemGroup = new WI.GroupNavigationItem([this._clearOnLoadNavigationItem, new WI.DividerNavigationItem]); 110 this._checkboxsNavigationItemGroup.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low; 111 112 this._buttonsNavigationItemGroup = new WI.GroupNavigationItem([this._harExportNavigationItem, new WI.DividerNavigationItem]); 113 this._buttonsNavigationItemGroup.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low; 103 114 104 115 // COMPATIBILITY (iOS 10.3): Network.setDisableResourceCaching did not exist. … … 182 193 get navigationItems() 183 194 { 184 let items = [this._ harExportNavigationItem, new WI.DividerNavigationItem];195 let items = [this._checkboxsNavigationItemGroup, this._buttonsNavigationItemGroup]; 185 196 if (this._disableResourceCacheNavigationItem) 186 197 items.push(this._disableResourceCacheNavigationItem); … … 241 252 WI.Resource.removeEventListener(null, null, this); 242 253 WI.resourceCachingDisabledSetting.removeEventListener(null, null, this); 254 WI.settings.clearNetworkOnNavigate.removeEventListener(null, null, this); 243 255 WI.frameResourceManager.removeEventListener(WI.FrameResourceManager.Event.MainFrameDidChange, this._mainFrameDidChange, this); 244 256 WI.timelineManager.persistentNetworkTimeline.removeEventListener(WI.Timeline.Event.RecordAdded, this._networkTimelineRecordAdded, this); … … 1063 1075 let width = this._nameColumn.width - 1; // For the 1px border. 1064 1076 this._emptyFilterResultsMessageElement.style.width = width + "px"; 1077 } 1078 1079 _clearNetworkOnNavigateSettingChanged() 1080 { 1081 this._clearOnLoadNavigationItem.checked = !WI.settings.clearNetworkOnNavigate.value; 1065 1082 } 1066 1083 -
trunk/Source/WebInspectorUI/UserInterface/Views/SettingEditor.js
r223308 r225250 66 66 editor.value = setting.value; 67 67 editor.addEventListener(WI.SettingEditor.Event.ValueDidChange, () => { setting.value = editor.value; }); 68 setting.addEventListener(WI.Setting.Event.Changed, () => { editor.value = setting.value; }); 68 69 69 70 return editor; -
trunk/Source/WebInspectorUI/UserInterface/Views/ToggleButtonNavigationItem.js
r220119 r225250 54 54 55 55 if (this._toggled) 56 this.tool Tip = this._alternateToolTip;56 this.tooltip = this._alternateToolTip; 57 57 } 58 58 … … 90 90 91 91 if (this._toggled) { 92 this.tool Tip = this._alternateToolTip;92 this.tooltip = this._alternateToolTip; 93 93 this.image = this._alternateImage; 94 94 } else { 95 this.tool Tip = this._defaultToolTip;95 this.tooltip = this._defaultToolTip; 96 96 this.image = this._defaultImage; 97 97 }
Note: See TracChangeset
for help on using the changeset viewer.