WebKit Bugzilla
Attachment 370268 Details for
Bug 198004
: Web Inspector: Storage tab crashes easily when adding new local/session storage entries.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198004-20190520130513.patch (text/plain), 3.74 KB, created by
Devin Rousso
on 2019-05-20 13:05:14 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-05-20 13:05:14 PDT
Size:
3.74 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index d76efb6430cd0e2c425e6618f7f317b95b27e3e6..197b170521001298bf5646f60492cc928595aaaf 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,24 @@ >+2019-05-20 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Storage tab crashes easily when adding new local/session storage entries. >+ https://bugs.webkit.org/show_bug.cgi?id=198004 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Views/DataGrid.js: >+ (WI.DataGrid.prototype._startEditingNodeAtColumnIndex): >+ Force a layout in the case that a new `PlaceholderDataGridNode` was added to the end of the >+ `DataGrid` as part of the `editCallback`. Web Inspector won't crash without this, but it >+ won't properly select/focus the next row when tabbing from the last column to the next row. >+ >+ (WI.DataGrid.prototype._editingCommitted): >+ Save the new value of the column before removing the editing styles, as that refreshes the >+ `DataGridNode`. If the new value isn't saved, the old value is used during the refresh. >+ >+ (WI.DataGrid.prototype._keyDown): >+ Drive-by: use `get element` instead of using the member variable directly, as the underlying >+ value might not have been initialized yet. >+ > 2019-05-17 Devin Rousso <drousso@apple.com> > > Web Inspector: Timelines: CPU/memory timeline bars sometimes don't draw correctly and jump around on scrolling >diff --git a/Source/WebInspectorUI/UserInterface/Views/DataGrid.js b/Source/WebInspectorUI/UserInterface/Views/DataGrid.js >index 18c504c8b6e0278df99b1cf2f114eb2222b887ad..fb16fde009c11d1030a17c03b26fbf0d46f03270 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/DataGrid.js >+++ b/Source/WebInspectorUI/UserInterface/Views/DataGrid.js >@@ -516,11 +516,13 @@ WI.DataGrid = class DataGrid extends WI.View > { > console.assert(node, "Invalid argument: must provide DataGridNode to edit."); > >+ this.updateLayoutIfNeeded(); >+ > this._editing = true; > this._editingNode = node; > this._editingNode.select(); > >- var element = this._editingNode._element.children[columnIndex]; >+ var element = this._editingNode.element.children[columnIndex]; > WI.startEditing(element, this._startEditingConfig(element)); > window.getSelection().setBaseAndExtent(element, 0, element, 1); > } >@@ -559,7 +561,9 @@ WI.DataGrid = class DataGrid extends WI.View > var columnIndex = this.orderedColumns.indexOf(columnIdentifier); > > var textBeforeEditing = this._editingNode.data[columnIdentifier] || ""; >+ > var currentEditingNode = this._editingNode; >+ currentEditingNode.data[columnIdentifier] = newText.trim(); > > // Returns an object with the next node and column index to edit, and whether it > // is an appropriate time to re-sort the table rows. When editing, we want to >@@ -598,8 +602,6 @@ WI.DataGrid = class DataGrid extends WI.View > > this._editingCancelled(element); > >- // Update table's data model, and delegate to the callback to update other models. >- currentEditingNode.data[columnIdentifier] = newText.trim(); > this._editCallback(currentEditingNode, columnIdentifier, textBeforeEditing, newText, moveDirection); > > var textDidChange = textBeforeEditing.trim() !== newText.trim(); >@@ -1399,7 +1401,7 @@ WI.DataGrid = class DataGrid extends WI.View > } else if (isEnterKey(event)) { > if (this._editCallback) { > handled = true; >- this._startEditing(this.selectedNode._element.children[0]); >+ this._startEditing(this.selectedNode.element.children[0]); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198004
: 370268