Changeset 185709 in webkit
- Timestamp:
- Jun 18, 2015, 10:58:33 AM (10 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r185703 r185709 1 2015-06-18 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: New Rule button doesn't reveal the newly added rule if not visible upon creation 4 https://bugs.webkit.org/show_bug.cgi?id=117600 5 6 Reviewed by Timothy Hatcher. 7 8 * UserInterface/Views/RulesStyleDetailsPanel.js: Made previousFocusedSection into a member variable of the RulesStyleDetailsPanel. This way, when the nodeStyles is refreshed (when a new rule is added), the previousFocusedSection will be scrolled into view. 9 (WebInspector.RulesStyleDetailsPanel): 10 (WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection): 11 (WebInspector.RulesStyleDetailsPanel.prototype.nodeStylesRefreshed): 12 (WebInspector.RulesStyleDetailsPanel.prototype.refresh): Deleted. 13 1 14 2015-06-18 Commit Queue <commit-queue@webkit.org> 2 15 -
trunk/Source/WebInspectorUI/UserInterface/Views/RulesStyleDetailsPanel.js
r185279 r185709 31 31 32 32 this._sections = []; 33 this._previousFocusedSection = null; 33 34 this._propertyToSelectAndHighlight = null; 34 35 } … … 48 49 var previousMediaList = []; 49 50 var previousSection = null; 50 var previousFocusedSection = null;51 51 52 52 function mediaListsEqual(a, b) … … 117 117 { 118 118 var section = style.__rulesSection; 119 if (section && section.focused && ! previousFocusedSection)120 previousFocusedSection = section;119 if (section && section.focused && !this._previousFocusedSection) 120 this._previousFocusedSection = section; 121 121 122 122 if (!section) { … … 127 127 128 128 if (this._focusNextNewInspectorRule && style.ownerRule && style.ownerRule.type === WebInspector.CSSRule.Type.Inspector) { 129 previousFocusedSection = section;129 this._previousFocusedSection = section; 130 130 delete this._focusNextNewInspectorRule; 131 131 } … … 238 238 for (var i = 0; i < this._sections.length; ++i) 239 239 this._sections[i].updateLayout(); 240 241 if (previousFocusedSection)242 previousFocusedSection.focus();243 240 } 244 241 … … 305 302 this._propertyToSelectAndHighlight = null; 306 303 } 304 305 if (this._previousFocusedSection && this._visible) { 306 this._previousFocusedSection.focus(); 307 this._previousFocusedSection = null; 308 } 307 309 } 308 310
Note:
See TracChangeset
for help on using the changeset viewer.