Changeset 225568 in webkit
- Timestamp:
- Dec 5, 2017 11:01:29 PM (6 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r225560 r225568 1 2017-12-05 Nikita Vasilyev <nvasilyev@apple.com> 2 3 Web Inspector: Styles Redesign: adding a property before or after the first one appends it to the end 4 https://bugs.webkit.org/show_bug.cgi?id=180321 5 <rdar://problem/35816402> 6 7 Reviewed by Timothy Hatcher. 8 9 * UserInterface/Models/CSSStyleDeclaration.js: 10 (WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex): 11 * UserInterface/Models/TextRange.js: 12 (WI.TextRange.prototype.collapseToStart): 13 1 14 2017-12-05 Joseph Pecoraro <pecoraro@apple.com> 2 15 -
trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js
r224174 r225568 419 419 _rangeAfterPropertyAtIndex(index) 420 420 { 421 if (index > 0) { 422 let property = this.allVisibleProperties[index]; 423 if (property && property.styleSheetTextRange) 424 return property.styleSheetTextRange.collapseToEnd(); 425 } 426 427 return this._styleSheetTextRange.collapseToEnd(); 421 if (index < 0) 422 return this._styleSheetTextRange.collapseToStart(); 423 424 if (index >= this.allVisibleProperties.length) 425 return this._styleSheetTextRange.collapseToEnd(); 426 427 let property = this.allVisibleProperties[index]; 428 return property.styleSheetTextRange.collapseToEnd(); 428 429 } 429 430 }; -
trunk/Source/WebInspectorUI/UserInterface/Models/TextRange.js
r222959 r225568 129 129 } 130 130 131 collapseToStart() 132 { 133 console.assert(!isNaN(this._startLine), "TextRange needs line/column data."); 134 return new WI.TextRange(this._startLine, this._startColumn, this._startLine, this._startColumn); 135 } 136 131 137 collapseToEnd() 132 138 {
Note: See TracChangeset
for help on using the changeset viewer.