Changeset 112413 in webkit
- Timestamp:
- Mar 28, 2012, 11:08:04 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112409 r112413 1 2012-03-28 Vsevolod Vlasov <vsevik@chromium.org> 2 3 Web Inspector: ScriptsNavigator should save scroll position when switching tabs. 4 https://bugs.webkit.org/show_bug.cgi?id=82472 5 6 Reviewed by Pavel Feldman. 7 8 WebInspector.View provides save/restore scroll position capabilities. 9 This patch makes them used in ScriptsNavigator. 10 11 * inspector/front-end/ScriptsNavigator.js: 12 (WebInspector.ScriptsNavigator): 13 (WebInspector.ScriptsNavigator.prototype._createSnippetsTree): 14 * inspector/front-end/scriptsPanel.css: 15 (#scripts-navigator-tabbed-pane .tabbed-pane-content): 16 (#scripts-navigator-tabbed-pane .navigator-container): 17 1 18 2012-03-28 Andrey Kosyakov <caseq@chromium.org> 2 19 -
trunk/Source/WebCore/inspector/front-end/ScriptsNavigator.js
r110694 r112413 50 50 var scriptsTreeElement = document.createElement("ol"); 51 51 var scriptsView = new WebInspector.View(); 52 scriptsView.element.addStyleClass("outline-disclosure"); 53 scriptsView.element.addStyleClass("navigator"); 54 scriptsView.element.appendChild(scriptsTreeElement); 52 scriptsView.element.addStyleClass("fill"); 53 scriptsView.element.addStyleClass("navigator-container"); 54 var scriptsOutlineElement = document.createElement("div"); 55 scriptsOutlineElement.addStyleClass("outline-disclosure"); 56 scriptsOutlineElement.addStyleClass("navigator"); 57 scriptsOutlineElement.appendChild(scriptsTreeElement); 58 scriptsView.element.appendChild(scriptsOutlineElement); 55 59 this._scriptsTree = new WebInspector.NavigatorTreeOutline(this, scriptsTreeElement); 56 60 this._tabbedPane.appendTab(WebInspector.ScriptsNavigator.ScriptsTab, WebInspector.UIString("Scripts"), scriptsView); … … 59 63 var contentScriptsTreeElement = document.createElement("ol"); 60 64 var contentScriptsView = new WebInspector.View(); 61 contentScriptsView.element.addStyleClass("outline-disclosure"); 62 contentScriptsView.element.addStyleClass("navigator"); 63 contentScriptsView.element.appendChild(contentScriptsTreeElement); 65 contentScriptsView.element.addStyleClass("fill"); 66 contentScriptsView.element.addStyleClass("navigator-container"); 67 var contentScriptsOutlineElement = document.createElement("div"); 68 contentScriptsOutlineElement.addStyleClass("outline-disclosure"); 69 contentScriptsOutlineElement.addStyleClass("navigator"); 70 contentScriptsOutlineElement.appendChild(contentScriptsTreeElement); 64 71 this._contentScriptsTree = new WebInspector.NavigatorTreeOutline(this, contentScriptsTreeElement); 65 72 this._tabbedPane.appendTab(WebInspector.ScriptsNavigator.ContentScriptsTab, WebInspector.UIString("Content scripts"), contentScriptsView); 66 73 67 var snippetsTreeElement = document.createElement("ol"); 68 var snippetsView = new WebInspector.View(); 69 snippetsView.element.addStyleClass("outline-disclosure"); 70 snippetsView.element.addStyleClass("navigator"); 71 snippetsView.element.appendChild(snippetsTreeElement); 72 this._snippetsTree = new WebInspector.NavigatorTreeOutline(this, snippetsTreeElement); 73 if (WebInspector.experimentsSettings.snippetsSupport.isEnabled()) 74 this._tabbedPane.appendTab(WebInspector.ScriptsNavigator.SnippetsTab, WebInspector.UIString("Snippets"), snippetsView); 74 this._snippetsTree = this._createSnippetsTree(); 75 75 76 76 this._folderTreeElements = {}; … … 260 260 }, 261 261 262 _createSnippetsTree: function() 263 { 264 var snippetsTreeElement = document.createElement("ol"); 265 var snippetsView = new WebInspector.View(); 266 snippetsView.element.addStyleClass("fill"); 267 snippetsView.element.addStyleClass("navigator-container"); 268 var snippetsOutlineElement = document.createElement("div"); 269 snippetsOutlineElement.addStyleClass("outline-disclosure"); 270 snippetsOutlineElement.addStyleClass("navigator"); 271 snippetsOutlineElement.appendChild(snippetsTreeElement); 272 snippetsView.element.appendChild(snippetsOutlineElement); 273 var snippetsTree = new WebInspector.NavigatorTreeOutline(this, snippetsTreeElement); 274 if (WebInspector.experimentsSettings.snippetsSupport.isEnabled()) 275 this._tabbedPane.appendTab(WebInspector.ScriptsNavigator.SnippetsTab, WebInspector.UIString("Snippets"), snippetsView); 276 return snippetsTree; 277 }, 278 279 262 280 reset: function() 263 281 { … … 316 334 return contentScriptPrefix + ":" + domain + folderName; 317 335 }, 318 336 319 337 /** 320 338 * @param {boolean} isContentScript … … 349 367 * @constructor 350 368 * @extends {TreeOutline} 369 * @param {WebInspector.ScriptsNavigator} navigator 351 370 * @param {Element} element 352 371 */ -
trunk/Source/WebCore/inspector/front-end/scriptsPanel.css
r109006 r112413 248 248 } 249 249 250 #scripts-navigator-tabbed-pane .tabbed-pane-content { 251 overflow: hidden; 252 } 253 254 #scripts-navigator-tabbed-pane .navigator-container { 255 overflow-y: auto; 256 overflow-x: hidden; 257 } 258 250 259 #scripts-navigator-tabbed-pane .navigator { 251 260 padding-left: 0;
Note:
See TracChangeset
for help on using the changeset viewer.