Changeset 188730 in webkit
- Timestamp:
- Aug 20, 2015 6:37:40 PM (9 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r188728 r188730 1 2015-08-20 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Visual editor adds extra spaces to styles with no properties 4 https://bugs.webkit.org/show_bug.cgi?id=148242 5 6 Reviewed by Timothy Hatcher. 7 8 * UserInterface/Models/CSSStyleDeclaration.js: 9 (WebInspector.CSSStyleDeclaration.prototype.set text): 10 Now trims the text and, if the resulting string has no length or the style is inline, 11 replaces the text to be set with the trimmed text. 12 13 * UserInterface/Views/VisualStylePropertyCombiner.js: 14 (WebInspector.VisualStylePropertyCombiner.prototype.modifyPropertyText): 15 Removed unnecessary trim. 16 1 17 2015-08-20 Devin Rousso <drousso@apple.com> 2 18 -
trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js
r188226 r188730 187 187 return; 188 188 189 var modified = text !== this._initialText; 189 let trimmedText = text.trim(); 190 if (this._text === trimmedText) 191 return; 192 193 if (!trimmedText.length || this._type === WebInspector.CSSStyleDeclaration.Type.Inline) 194 text = trimmedText; 195 196 let modified = text !== this._initialText; 190 197 if (modified !== this._hasModifiedInitialText) { 191 198 this._hasModifiedInitialText = modified; -
trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyCombiner.js
r188630 r188730 78 78 modifyPropertyText(text, value) 79 79 { 80 let trimmedText = text.trimRight();81 80 if (this._textContainsNameRegExp.test(text)) 82 81 text = text.replace(this._replacementRegExp, value !== null ? "$1$2: " + value + ";" : "$1");
Note: See TracChangeset
for help on using the changeset viewer.