[Webkit-unassigned] [Bug 127613] Web Inspector: In a DataGrid, store value of columnIdentifier as a dataset attribute

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 25 09:34:01 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=127613


Joseph Pecoraro <joepeck at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #222197|review?, commit-queue?      |review-
               Flag|                            |




--- Comment #3 from Joseph Pecoraro <joepeck at webkit.org>  2014-01-25 09:31:28 PST ---
(From update of attachment 222197)
View in context: https://bugs.webkit.org/attachment.cgi?id=222197&action=review

r- because I think it breaks styles. But make it so you set classname and dataset attribute, and it is good!

> Source/WebInspectorUI/UserInterface/DataGrid.js:88
> -        cell.className = columnIdentifier + "-column";
> +        cell.dataset["columnIdentifier"] = columnIdentifier;

I think we will need to set the class name for styles. There are a lot of CSS instances of "<foo>-column":

    shell> ack "\-column" *.css
    DOMTreeDataGrid.css
    62:.dom-tree-data-grid .data-container .name-column {
    66:.dom-tree-data-grid .data-container .name-column .icon {
    74:.dom-tree-data-grid .data-container .name-column .label {
    83:.dom-tree-data-grid .data-container tr:hover .name-column .label {

    DetailsSection.css
    251:.details-section > .content .data-grid td.value-column {
    257:.details-section > .content .data-grid td.value-column > div {
    ...

> Source/WebInspectorUI/UserInterface/DataGrid.js:155
> -        td.className = columnIdentifier + "-column";
> +        td.dataset["columnIdentifier"] = columnIdentifier;

Same here.

> Source/WebInspectorUI/UserInterface/DataGrid.js:346
> -        // FIXME: Better way to do this than regular expressions?
> -        var columnIdentifier = parseInt(element.className.match(/\b(\d+)-column\b/)[1], 10);
> +        var columnIdentifier = element.dataset["columnIdentifier"];

This looks great though!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list