<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>130161</bug_id>
          
          <creation_ts>2014-03-12 15:38:40 -0700</creation_ts>
          <short_desc>Web Inspector: Classname stuff in WebInspector.displayNameForNode should join DOMTokenList classList instead of using string parsing and concatenation</short_desc>
          <delta_ts>2014-03-13 09:25:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="James Craig">jcraig</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>graouts</cc>
    
    <cc>joepeck</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>989843</commentid>
    <comment_count>0</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2014-03-12 15:38:40 -0700</bug_when>
    <thetext>Web Inspector: Classname stuff in WebInspector.displayNameForNode should join DOMTokenList classList instead of using string parsing and concatenation. Unless I&apos;m missing something, I expect this was just written before DOMTokenList classList was available.

    var classAttribute = node.getAttribute(&quot;class&quot;);
    if (classAttribute) {
        var classes = classAttribute.trim().split(/\s+/);
        var foundClasses = {};

        for (var i = 0; i &lt; classes.length; ++i) {
            var className = classes[i];
            if (className &amp;&amp; !(className in foundClasses)) {
                title += &quot;.&quot; + className;
                foundClasses[className] = true;
            }
        }
    }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>989869</commentid>
    <comment_count>1</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2014-03-12 17:11:28 -0700</bug_when>
    <thetext>node is not a real DOMNode, it is our DOMNode proxy. So we don&apos;t have access to classList unless we go to the injected script for it. That is why we do what we do here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>990022</commentid>
    <comment_count>2</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2014-03-13 09:25:50 -0700</bug_when>
    <thetext>Gotcha. Makes sense.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>