Changeset 224210 in webkit
- Timestamp:
- Oct 30, 2017 4:11:06 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r224209 r224210 1 2017-10-30 Nikita Vasilyev <nvasilyev@apple.com> 2 3 Web Inspector: [PARITY] Styles Redesign: Ability to modify style attributes 4 https://bugs.webkit.org/show_bug.cgi?id=178328 5 <rdar://problem/35000990> 6 7 Reviewed by Joseph Pecoraro. 8 9 Add tests for WI.TextRange.protopyte.resolveOffsets. 10 11 * inspector/unit-tests/text-range-expected.txt: Added. 12 * inspector/unit-tests/text-range.html: Added. 13 1 14 2017-10-30 Matt Lewis <jlewis3@apple.com> 2 15 -
trunk/Source/WebInspectorUI/ChangeLog
r224203 r224210 1 2017-10-30 Nikita Vasilyev <nvasilyev@apple.com> 2 3 Web Inspector: [PARITY] Styles Redesign: Ability to modify style attributes 4 https://bugs.webkit.org/show_bug.cgi?id=178328 5 <rdar://problem/35000990> 6 7 Reviewed by Joseph Pecoraro. 8 9 Before this patch, modifying a property of a style attribute duplicated the old property 10 and appended the new one. This happened because WI.TextRange.prototype.resolveOffsets 11 didn't resolve offsets correctly when text didn't end with a trailing new line. 12 13 Since WI.TextRange.prototype.resolveOffsets is used elsewhere and this could be expected 14 behavior, append a line break before resolving a range. 15 16 * UserInterface/Models/CSSProperty.js: 17 (WI.CSSProperty.prototype._updateOwnerStyleText): 18 1 19 2017-10-30 Ross Kirsling <ross.kirsling@sony.com> 2 20 -
trunk/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js
r224174 r224210 356 356 // range is the position of the property within the rule. 357 357 let range = this._styleSheetTextRange.relativeTo(this._ownerStyle.styleSheetTextRange.startLine, this._ownerStyle.styleSheetTextRange.startColumn); 358 range.resolveOffsets(styleText); 358 359 // Append a line break to count the last line of styleText towards endOffset. 360 range.resolveOffsets(styleText + "\n"); 359 361 360 362 console.assert(oldText === styleText.slice(range.startOffset, range.endOffset), "_styleSheetTextRange data is invalid.");
Note: See TracChangeset
for help on using the changeset viewer.