Changeset 31024 in webkit
- Timestamp:
- Mar 12, 2008 11:13:02 PM (16 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r31021 r31024 1 2008-03-12 Adam Roben <aroben@apple.com> 2 3 Update the styles/metrics panes and breadcrumb after editing DOM 4 attributes 5 6 Reviewed by Tim. 7 8 * page/inspector/DocumentPanel.js: 9 (WebInspector.DocumentPanel.set focusedDOMNode): Moved code to update 10 the parts of the DocumentPanel other than the DOM tree into a new 11 function, _focusedNodeChanged. 12 (WebInspector.DocumentPanel._focusedNodeChanged): Added. The 13 forceUpdate parameter specifies whether the update should occur even 14 if the focused node hasn't changed since the last update. 15 (WebInspector.DocumentPanel.updateBreadcrumb): Added a forceUpdate 16 parameter. If forceUpdate is true, we always rebuild the breadcrumbs. 17 (WebInspector.DocumentPanel.updateStyles): Added a forceUpdate 18 parameter. If forceUpdate is true, we always rebuild the styles pane. 19 (WebInspector.DOMNodeTreeElement._attributeEditingCommitted): Added a 20 call to DocumentPanel._focusedNodeChanged. We have to force the update 21 because we haven't changed the focused node (the attributes of the 22 node have changed). 23 * page/inspector/StylesSidebarPane.js: 24 (WebInspector.StylesSidebarPane.update): Added a forceUpdate 25 parameter. If forceUpdate is true we always rebuild the styles. 26 1 27 2008-03-12 Mark Rowe <mrowe@apple.com> 2 28 -
trunk/WebCore/page/inspector/DocumentPanel.js
r31009 r31024 140 140 this._focusedDOMNode = x; 141 141 142 this.updateBreadcrumb(); 143 144 for (var pane in this.views.dom.sidebarPanes) 145 this.views.dom.sidebarPanes[pane].needsUpdate = true; 146 147 this.updateStyles(); 148 this.updateMetrics(); 149 this.updateProperties(); 142 this._focusedNodeChanged(); 150 143 151 144 InspectorController.highlightDOMNode(x); … … 154 147 if (nodeItem) 155 148 nodeItem.select(); 149 }, 150 151 _focusedNodeChanged: function(forceUpdate) 152 { 153 this.updateBreadcrumb(forceUpdate); 154 155 for (var pane in this.views.dom.sidebarPanes) 156 this.views.dom.sidebarPanes[pane].needsUpdate = true; 157 158 this.updateStyles(forceUpdate); 159 this.updateMetrics(); 160 this.updateProperties(); 156 161 }, 157 162 … … 183 188 }, 184 189 185 updateBreadcrumb: function( )190 updateBreadcrumb: function(forceUpdate) 186 191 { 187 192 if (!this.visible) … … 212 217 } 213 218 214 if (handled ) {219 if (handled && !forceUpdate) { 215 220 // We don't need to rebuild the crumbs, but we need to adjust sizes 216 221 // to reflect the new focused or root node. … … 631 636 }, 632 637 633 updateStyles: function( )638 updateStyles: function(forceUpdate) 634 639 { 635 640 var stylesSidebarPane = this.views.dom.sidebarPanes.styles; … … 637 642 return; 638 643 639 stylesSidebarPane.update(this.focusedDOMNode );644 stylesSidebarPane.update(this.focusedDOMNode, undefined, forceUpdate); 640 645 stylesSidebarPane.needsUpdate = false; 641 646 }, … … 973 978 974 979 this._updateTitle(); 980 this.treeOutline.panel._focusedNodeChanged(true); 975 981 }, 976 982 -
trunk/WebCore/page/inspector/StylesSidebarPane.js
r30931 r31024 33 33 34 34 WebInspector.StylesSidebarPane.prototype = { 35 update: function(node, editedSection )35 update: function(node, editedSection, forceUpdate) 36 36 { 37 37 var refresh = false; 38 38 39 if (! node || node === this.node)39 if (!forceUpdate && (!node || node === this.node)) 40 40 refresh = true; 41 41
Note: See TracChangeset
for help on using the changeset viewer.