<?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>31212</bug_id>
          
          <creation_ts>2009-11-06 12:52:13 -0800</creation_ts>
          <short_desc>showTree(CounterNode*) generates too little info and has too many spaces.</short_desc>
          <delta_ts>2009-11-09 11:43:30 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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="Carol Szabo">carol</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>darin</cc>
    
    <cc>enrica</cc>
    
    <cc>eric</cc>
    
    <cc>justin.garcia</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>161230</commentid>
    <comment_count>0</comment_count>
    <who name="Carol Szabo">carol</who>
    <bug_when>2009-11-06 12:52:13 -0800</bug_when>
    <thetext>I worked on fixing the issue of DOM update reactivity in webkit&apos;s counter implementation. I found the information provided by showTree(CounterNode*) insufficient for my needs and I did not like the usage of tab for indentation as it would create too much whitespace. Here I am proposing an alternative (hopefully better) solution. Patch coming soon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161249</commentid>
    <comment_count>1</comment_count>
      <attachid>42671</attachid>
    <who name="Carol Szabo">carol</who>
    <bug_when>2009-11-06 14:40:57 -0800</bug_when>
    <thetext>Created attachment 42671
Proposed Patch

Adds information about the address of the counters in the tree, the renderer that they are attached to.
Also allows for the inspection of the integrity of the tree structure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161266</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-11-06 16:36:11 -0800</bug_when>
    <thetext>It would be helpful if you could show an example of old vs. new behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161289</commentid>
    <comment_count>3</comment_count>
    <who name="Carol Szabo">carol</who>
    <bug_when>2009-11-06 18:33:23 -0800</bug_when>
    <thetext>New behavior:
 0x09432630 reset: 0 0 P:0x00000000 PS:0x00000000 NS:0x00000000 R:0x0942D6EC
   0x0942DC60 increment: 1 1 P:0x09432630 PS:0x00000000 NS:0x0942C660 R:0x0942ECDC
   0x0942C660 increment: 0 1 P:0x09432630 PS:0x0942DC60 NS:0x09438EE0 R:0x0942EE64
*  0x09438EE0 reset: 0 1 P:0x09432630 PS:0x0942C660 NS:0x00000000 R:0x0942F8E4
     0x09439178 increment: 1 1 P:0x09438EE0 PS:0x00000000 NS:0x00000000 R:0x09430164

Where P stands for parent, PS for previous sibling, NS for next sibling R for the renderer that the counter is attached to.
The first hex number is the address of the counter dumped.

OldBehavior:
reset: 0 0
        increment: 1 1
        increment: 0 1
        reset: 0 1
                increment: 1 1

The decimal numbers represent the value and countInParent members of the counter.

Note: On modern terminals that support more than 100 characters per line the text in the new format would not wrap till 14 levels deep nesting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161308</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-11-07 00:06:28 -0800</bug_when>
    <thetext>Wow. The new format looks super-confusing!  I think we should have other editing folks (those who use these methods regularly for debugging) weigh in here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161362</commentid>
    <comment_count>5</comment_count>
      <attachid>42671</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-11-07 11:43:22 -0800</bug_when>
    <thetext>Comment on attachment 42671
Proposed Patch

This is great!

&gt; +        fprintf(stderr, &quot;0x%08X %s: %d %d P:0x%08X PS:0x%08X NS:0x%08X R:0x%08X\n&quot;,
&gt; +            current, current-&gt;isReset() ? &quot;reset&quot; : &quot;increment&quot;, current-&gt;value(),
&gt; +            current-&gt;countInParent(), current-&gt;parent(), current-&gt;previousSibling(),
&gt; +            current-&gt;nextSibling(), current-&gt;renderer());

This won&apos;t compile without warnings under gcc. The specifier %08X takes an &quot;unsigned&quot; as its argument, but we are passing in a pointer. The most portable way to do this is probably to use %p instead of 0x%08X. Other solutions involve converting the type by adding a typecast.

review- because this will break the build</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161363</commentid>
    <comment_count>6</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-11-07 11:52:25 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; Wow. The new format looks super-confusing!  I think we should have other
&gt; editing folks (those who use these methods regularly for debugging) weigh in
&gt; here.

Counter is not about editing, so I don’t see the relevance of &quot;editing folks&quot;.

But despite my positive comment in the review, I think that dumping all those pointers is not extremely useful. On 64-bit systems they will be even wider too.

But on the other hand, the only person who will do this is someone debugging counters. It still seems OK to change it like this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161373</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-11-07 13:53:49 -0800</bug_when>
    <thetext>Oh, I guess I took this to be the generic showTreeForNode(Node*).  My apologies for my confusion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161623</commentid>
    <comment_count>8</comment_count>
      <attachid>42762</attachid>
    <who name="Carol Szabo">carol</who>
    <bug_when>2009-11-09 09:58:34 -0800</bug_when>
    <thetext>Created attachment 42762
Proposed Patch

This patch addresses Darin&apos;s comments about pointer versus int in printf.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161636</commentid>
    <comment_count>9</comment_count>
      <attachid>42762</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2009-11-09 10:28:10 -0800</bug_when>
    <thetext>Comment on attachment 42762
Proposed Patch

Heh, I would have said &quot;counter&quot; instead of &quot;current&quot; -- nouns work better than adjectives for variable names.

And the best function for writing one or two characters is probably fputc rather than fwrite.

And on reflection I would probably use things like &quot;parent&quot;, &quot;prev&quot; and &quot;next&quot; instead of &quot;P&quot;, &quot;PS&quot; and &quot;NS&quot;.

r=me as is though, no need to go over and over this!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161679</commentid>
    <comment_count>10</comment_count>
      <attachid>42762</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-11-09 11:43:25 -0800</bug_when>
    <thetext>Comment on attachment 42762
Proposed Patch

Clearing flags on attachment: 42762

Committed r50673: &lt;http://trac.webkit.org/changeset/50673&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>161680</commentid>
    <comment_count>11</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2009-11-09 11:43:30 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>42671</attachid>
            <date>2009-11-06 14:40:57 -0800</date>
            <delta_ts>2009-11-09 09:58:34 -0800</delta_ts>
            <desc>Proposed Patch</desc>
            <filename>patchFor31212-1.patch</filename>
            <type>text/plain</type>
            <size>2183</size>
            <attacher name="Carol Szabo">carol</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ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dXJyZW50OyBwYXJl
bnQgJiYgcGFyZW50ICE9IHJvb3Q7IHBhcmVudCA9IHBhcmVudC0+cGFyZW50KCkpCisgICAgICAg
ICAgICBmd3JpdGUoIiAgIiwgMSwgMiwgc3RkZXJyKTsKKyAgICAgICAgZnByaW50ZihzdGRlcnIs
ICIweCUwOFggJXM6ICVkICVkIFA6MHglMDhYIFBTOjB4JTA4WCBOUzoweCUwOFggUjoweCUwOFhc
biIsCisgICAgICAgICAgICBjdXJyZW50LCBjdXJyZW50LT5pc1Jlc2V0KCkgPyAicmVzZXQiIDog
ImluY3JlbWVudCIsIGN1cnJlbnQtPnZhbHVlKCksCisgICAgICAgICAgICBjdXJyZW50LT5jb3Vu
dEluUGFyZW50KCksIGN1cnJlbnQtPnBhcmVudCgpLCBjdXJyZW50LT5wcmV2aW91c1NpYmxpbmco
KSwKKyAgICAgICAgICAgIGN1cnJlbnQtPm5leHRTaWJsaW5nKCksIGN1cnJlbnQtPnJlbmRlcmVy
KCkpOwogICAgIH0KIH0KIAo=
</data>
<flag name="review"
          id="24236"
          type_id="1"
          status="-"
          setter="darin"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>42762</attachid>
            <date>2009-11-09 09:58:34 -0800</date>
            <delta_ts>2009-11-09 11:43:24 -0800</delta_ts>
            <desc>Proposed Patch</desc>
            <filename>patchFor31212-2.patch</filename>
            <type>text/plain</type>
            <size>2167</size>
            <attacher name="Carol Szabo">carol</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA1MDYwNCkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTggQEAKKzIwMDktMTEtM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c3RkZXJyKTsKKyAgICAgICAgZnByaW50ZihzdGRlcnIs
ICIlcCAlczogJWQgJWQgUDolcCBQUzolcCBOUzolcCBSOiVwXG4iLAorICAgICAgICAgICAgY3Vy
cmVudCwgY3VycmVudC0+aXNSZXNldCgpID8gInJlc2V0X19fXyIgOiAiaW5jcmVtZW50IiwgY3Vy
cmVudC0+dmFsdWUoKSwKKyAgICAgICAgICAgIGN1cnJlbnQtPmNvdW50SW5QYXJlbnQoKSwgY3Vy
cmVudC0+cGFyZW50KCksIGN1cnJlbnQtPnByZXZpb3VzU2libGluZygpLAorICAgICAgICAgICAg
Y3VycmVudC0+bmV4dFNpYmxpbmcoKSwgY3VycmVudC0+cmVuZGVyZXIoKSk7CiAgICAgfQogfQog
Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>