Title: [239807] branches/safari-607-branch/Source/WebInspectorUI
- Revision
- 239807
- Author
- [email protected]
- Date
- 2019-01-09 17:38:34 -0800 (Wed, 09 Jan 2019)
Log Message
Cherry-pick r239762. rdar://problem/47158734
Web Inspector: Styles: Undo reverts all changes at once
https://bugs.webkit.org/show_bug.cgi?id=177676
<rdar://problem/34745031>
Reviewed by Devin Rousso.
Command-Z used to revert all changes at once because Web Inspector never
set any history checkpoints in the style editor.
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
* UserInterface/Views/SpreadsheetTextField.js:
(WI.SpreadsheetTextField.prototype._handleBlur):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-607-branch/Source/WebInspectorUI/ChangeLog (239806 => 239807)
--- branches/safari-607-branch/Source/WebInspectorUI/ChangeLog 2019-01-10 01:38:31 UTC (rev 239806)
+++ branches/safari-607-branch/Source/WebInspectorUI/ChangeLog 2019-01-10 01:38:34 UTC (rev 239807)
@@ -1,3 +1,40 @@
+2019-01-09 Kocsen Chung <[email protected]>
+
+ Cherry-pick r239762. rdar://problem/47158734
+
+ Web Inspector: Styles: Undo reverts all changes at once
+ https://bugs.webkit.org/show_bug.cgi?id=177676
+ <rdar://problem/34745031>
+
+ Reviewed by Devin Rousso.
+
+ Command-Z used to revert all changes at once because Web Inspector never
+ set any history checkpoints in the style editor.
+
+ * UserInterface/Views/SpreadsheetStyleProperty.js:
+ (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
+ * UserInterface/Views/SpreadsheetTextField.js:
+ (WI.SpreadsheetTextField.prototype._handleBlur):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-01-08 Nikita Vasilyev <[email protected]>
+
+ Web Inspector: Styles: Undo reverts all changes at once
+ https://bugs.webkit.org/show_bug.cgi?id=177676
+ <rdar://problem/34745031>
+
+ Reviewed by Devin Rousso.
+
+ Command-Z used to revert all changes at once because Web Inspector never
+ set any history checkpoints in the style editor.
+
+ * UserInterface/Views/SpreadsheetStyleProperty.js:
+ (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
+ * UserInterface/Views/SpreadsheetTextField.js:
+ (WI.SpreadsheetTextField.prototype._handleBlur):
+
2019-01-09 Alan Coon <[email protected]>
Cherry-pick r239690. rdar://problem/47158814
Modified: branches/safari-607-branch/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js (239806 => 239807)
--- branches/safari-607-branch/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js 2019-01-10 01:38:31 UTC (rev 239806)
+++ branches/safari-607-branch/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js 2019-01-10 01:38:34 UTC (rev 239807)
@@ -372,7 +372,7 @@
this.remove();
}
- spreadsheetTextFieldDidBlur(textField, event)
+ spreadsheetTextFieldDidBlur(textField, event, changed)
{
let focusedOutsideThisProperty = event.relatedTarget !== this._nameElement && event.relatedTarget !== this._valueElement;
if (focusedOutsideThisProperty && (!this._nameTextField.value.trim() || !this._valueTextField.value.trim())) {
@@ -385,6 +385,9 @@
if (typeof this._delegate.spreadsheetStylePropertyFocusMoved === "function")
this._delegate.spreadsheetStylePropertyFocusMoved(this, {direction: null});
+
+ if (changed && window.DOMAgent)
+ DOMAgent.markUndoableState();
}
spreadsheetTextFieldDidBackspace(textField)
Modified: branches/safari-607-branch/Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js (239806 => 239807)
--- branches/safari-607-branch/Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js 2019-01-10 01:38:31 UTC (rev 239806)
+++ branches/safari-607-branch/Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js 2019-01-10 01:38:34 UTC (rev 239807)
@@ -220,7 +220,8 @@
this._applyCompletionHint();
this.discardCompletion();
- this._delegate.spreadsheetTextFieldDidBlur(this, event);
+ let changed = this._valueBeforeEditing !== this.value;
+ this._delegate.spreadsheetTextFieldDidBlur(this, event, changed);
this.stopEditing();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes