3 Web Inspector: Styles Redesign: Pasting multiple properties should create properties instead of a bad property
4 https://bugs.webkit.org/show_bug.cgi?id=179622
5 <rdar://problem/35511170>
6
7 Reviewed by NOBODY (OOPS!).
8
9 * UserInterface/Views/SpreadsheetStyleProperty.js:
10 (WI.SpreadsheetStyleProperty.prototype._remove):
11 (WI.SpreadsheetStyleProperty.prototype._update):
12 (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
13 (WI.SpreadsheetStyleProperty.prototype._handleNamePaste):
14 When the user pastes into the name field, parse the text for a list of name-value pairs and
15 replace the property being edited with the text of those pairs.
16
17 * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
18 (WI.SpreadsheetCSSStyleDeclarationEditor):
19 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
20 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.addBlankProperty):
21 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
22 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyAddBlankPropertySoon):
23 (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved): Deleted.
24 Calling `addBlankProperty` will trigger a layout on the next frame, but that might be before
25 the CSSAgent has had a chance to finish refreshing, so we need a way to defer the creation
26 of a new property until after we have finished the next layout (which is after the refresh).
27 Drive-by: fix naming of some delegate functions.
28
29 * UserInterface/Models/CSSProperty.js:
30 (WI.CSSProperty.prototype.remove):
31 Provide a way for replacing the property with new text when removing it.
32
332017-12-18 Devin Rousso <webkit@devinrousso.com>
34