WebKit Bugzilla
Attachment 347047 Details for
Bug 188534
: Web Inspector: Table should handle row selection instead of the table delegate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-188534-20180813150519.patch (text/plain), 5.03 KB, created by
Matt Baker
on 2018-08-13 15:05:23 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Matt Baker
Created:
2018-08-13 15:05:23 PDT
Size:
5.03 KB
patch
obsolete
>Subversion Revision: 234768 >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 697738cdfab3bf08f2c6cce61dbd68cc0f0b0d3f..0336d905336b75d67777d23928d021372c61649a 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,26 @@ >+2018-08-13 Matt Baker <mattbaker@apple.com> >+ >+ Web Inspector: Table should handle row selection instead of the table delegate >+ https://bugs.webkit.org/show_bug.cgi?id=188534 >+ <rdar://problem/43253335> >+ >+ Reviewed by Joseph Pecoraro. >+ >+ Row selection should be implemented by Table, rather than its delegate. >+ >+ * UserInterface/Views/NetworkTableContentView.js: >+ (WI.NetworkTableContentView.prototype.tableShouldSelectRow): >+ (WI.NetworkTableContentView.prototype.tableCellMouseDown): Deleted. >+ Prevent selection unless the clicked cell belongs to the name column. >+ >+ * UserInterface/Views/ResourceCookiesContentView.js: >+ (WI.ResourceCookiesContentView.prototype.tableShouldSelectRow): >+ Always prevent selection. >+ >+ * UserInterface/Views/Table.js: >+ (WI.Table): >+ (WI.Table.prototype._handleMouseDown): >+ > 2018-08-09 Nikita Vasilyev <nvasilyev@apple.com> > > Web Inspector: Dark Mode: SourceCodeTextEditor error/warning text widget is too light >diff --git a/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js b/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js >index 0c9fb02dffd56579158ae6515524d365e7e439e1..b54fbc1ccd00e2e8b625dc133835870f81a8a5e5 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js >@@ -324,14 +324,6 @@ WI.NetworkTableContentView = class NetworkTableContentView extends WI.ContentVie > > // Table delegate > >- tableCellMouseDown(table, cell, column, rowIndex, event) >- { >- if (column !== this._nameColumn) >- return; >- >- this._table.selectRow(rowIndex); >- } >- > tableCellContextMenuClicked(table, cell, column, rowIndex, event) > { > if (column !== this._nameColumn) >@@ -347,6 +339,11 @@ WI.NetworkTableContentView = class NetworkTableContentView extends WI.ContentVie > contextMenu.appendItem(WI.UIString("Export HAR"), () => { this._exportHAR(); }); > } > >+ tableShouldSelectRow(table, cell, column, rowIndex) >+ { >+ return column === this._nameColumn; >+ } >+ > tableSelectedRowChanged(table, rowIndex) > { > if (isNaN(rowIndex)) { >diff --git a/Source/WebInspectorUI/UserInterface/Views/ResourceCookiesContentView.js b/Source/WebInspectorUI/UserInterface/Views/ResourceCookiesContentView.js >index 5ee044bbce7a0122da31a0a1c1598b24b79975b8..ac030c47b24b830d62e92a4a1852a5d044373932 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ResourceCookiesContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ResourceCookiesContentView.js >@@ -58,6 +58,11 @@ WI.ResourceCookiesContentView = class ResourceCookiesContentView extends WI.Cont > > // Table delegate > >+ tableShouldSelectRow(table, cell, column, rowIndex) >+ { >+ return false; >+ } >+ > tablePopulateCell(table, cell, column, rowIndex) > { > let cookie = this._dataSourceForTable(table)[rowIndex]; >diff --git a/Source/WebInspectorUI/UserInterface/Views/Table.js b/Source/WebInspectorUI/UserInterface/Views/Table.js >index c26323990bf5428a9793063bb0c91dd833ba90f6..b335a9ccac47ca0acc5dfbf33eced2c55bbd1c2c 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/Table.js >+++ b/Source/WebInspectorUI/UserInterface/Views/Table.js >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2008-2017 Apple Inc. All Rights Reserved. >+ * Copyright (C) 2008-2018 Apple Inc. All Rights Reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -56,8 +56,7 @@ WI.Table = class Table extends WI.View > this._scrollContainerElement.className = "data-container"; > this._scrollContainerElement.addEventListener("scroll", scrollHandler); > this._scrollContainerElement.addEventListener("mousewheel", scrollHandler); >- if (this._delegate.tableCellMouseDown) >- this._scrollContainerElement.addEventListener("mousedown", this._handleMouseDown.bind(this)); >+ this._scrollContainerElement.addEventListener("mousedown", this._handleMouseDown.bind(this)); > if (this._delegate.tableCellContextMenuClicked) > this._scrollContainerElement.addEventListener("contextmenu", this._handleContextMenu.bind(this)); > >@@ -1202,7 +1201,10 @@ WI.Table = class Table extends WI.View > let column = this._visibleColumns[columnIndex]; > let rowIndex = row.__index; > >- this._delegate.tableCellMouseDown(this, cell, column, rowIndex, event); >+ if (this._delegate.tableShouldSelectRow && !this._delegate.tableShouldSelectRow(this, cell, column, rowIndex)) >+ return; >+ >+ this.selectRow(rowIndex); > } > > _handleContextMenu(event)
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 188534
:
347043
| 347047