Bug 177676 - Web Inspector: Styles: Undo reverts all changes at once
Summary: Web Inspector: Styles: Undo reverts all changes at once
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks: 193223
  Show dependency treegraph
 
Reported: 2017-09-29 12:27 PDT by Nikita Vasilyev
Modified: 2019-01-08 19:29 PST (History)
4 users (show)

See Also:


Attachments
[Animated GIF] Bug (115.95 KB, image/gif)
2017-09-29 12:27 PDT, Nikita Vasilyev
no flags Details
Patch (2.91 KB, patch)
2019-01-07 16:36 PST, Nikita Vasilyev
hi: review+
Details | Formatted Diff | Diff
[Video] With patch applied (1.99 MB, video/quicktime)
2019-01-07 16:40 PST, Nikita Vasilyev
no flags Details
Patch (2.91 KB, patch)
2019-01-08 18:52 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2017-09-29 12:27:42 PDT
Created attachment 322219 [details]
[Animated GIF] Bug

Steps:
1. Inspect any element with 2+ CSS properties.
2. Modify both property values one after another.
3. Move focus away from CSS editing field (CodeMirror).
4. Press Command-Z.

Expected:
Only the last change is reverted.

Actual:
All changes are reverted.

Notes:
I reproduced it in the shipped Safari and ToT WebKit.
Comment 1 Radar WebKit Bug Importer 2017-09-29 12:28:06 PDT
<rdar://problem/34745031>
Comment 2 Nikita Vasilyev 2019-01-07 16:36:01 PST
Created attachment 358553 [details]
Patch
Comment 3 Nikita Vasilyev 2019-01-07 16:40:32 PST
Created attachment 358556 [details]
[Video] With patch applied
Comment 4 Devin Rousso 2019-01-08 18:33:04 PST
Comment on attachment 358553 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=358553&action=review

r=me, wow I didn't realize how much I wanted this till I tried using it 😅

> Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js:375
> +    spreadsheetTextFieldDidBlur(textField, event, hasChanged)

This is already implicitly past tense given the function name.  I think `changed` is fine enough (it's also past tense).
Comment 5 Nikita Vasilyev 2019-01-08 18:52:00 PST
Created attachment 358661 [details]
Patch
Comment 6 WebKit Commit Bot 2019-01-08 19:29:27 PST
Comment on attachment 358661 [details]
Patch

Clearing flags on attachment: 358661

Committed r239762: <https://trac.webkit.org/changeset/239762>
Comment 7 WebKit Commit Bot 2019-01-08 19:29:28 PST
All reviewed patches have been landed.  Closing bug.