<?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>8753</bug_id>
          
          <creation_ts>2006-05-05 15:27:29 -0700</creation_ts>
          <short_desc>REGRESSION (r14032): Incorrect and non-uniform text zoom applied after going forward and backward</short_desc>
          <delta_ts>2013-06-04 11:21:44 -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>Layout and Rendering</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, NeedsReduction, Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mitz</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>darin</cc>
    
    <cc>emacemac7</cc>
    
    <cc>ian</cc>
    
    <cc>mjs</cc>
    
    <cc>robert</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>41364</commentid>
    <comment_count>0</comment_count>
    <who name="">mitz</who>
    <bug_when>2006-05-05 15:27:29 -0700</bug_when>
    <thetext>Steps to reproduce:
1. Go to http://bugzilla.opendarwin.org/show_bug.cgi?id=8132
2. Click the first attachment (Proposed patch)
3. Choose View &gt; Make Text Smaller
4. Choose History &gt; Back
5. Choose History &gt; Forward
6. Choose History &gt; Back

Expected result:
Text should be smaller in the bug page both in steps 4 and 6. Text zoom should affect both the text and the form controls.

Actual result:
In step 4, text and form controls are zoomed out as expected. In step 6, text appears in default size (bigger than expected), while form controls are smaller.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41385</commentid>
    <comment_count>1</comment_count>
    <who name="">mitz</who>
    <bug_when>2006-05-06 05:57:47 -0700</bug_when>
    <thetext>I noticed two problems with the new form element state code:

1) In Document::formElementsState,
    Vector&lt;String&gt; stateVector(m_formElementsWithState.size() * 3);
should be
    Vector&lt;String&gt; stateVector;
    stateVector.reserveCapacity(m_formElementsWithState.size() * 3);

2) Both the keys and the values in the FormElementStateMap get &quot;double-freed&quot;. I&apos;m not sure if this is a problem in the hash map code or in how it&apos;s used here. Here&apos;s what happens: when you remove an entry from the map, it calls the FormElementKey destructor (which derefs the name and type) then it assigns the deletedValue to the FormElementKey (so the = operator derefs the name and type again). You can work around this by setting name and type to 0 in the destructor.
Then I noticed that the same happens with the values: ~Vector is called (which calls the impl&apos;s destructor), then the empty Vector is assigned to the vector (which will eventually call the impl&apos;s destructor again).
Perhaps the solution is as simple as setting the correct traits (needsDestruction = false) but I don&apos;t really understand how it&apos;s supposed to work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41386</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2006-05-06 06:02:38 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Perhaps the solution is as simple as setting the correct traits
&gt; (needsDestruction = false)

It can&apos;t be exactly that, since HashMap::remove doesn&apos;t even check needsDestruction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41398</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-05-06 11:41:57 -0700</bug_when>
    <thetext>Aggh! I&apos;ll take care of this right away.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41399</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-05-06 11:44:00 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; 2) Both the keys and the values in the FormElementStateMap get &quot;double-freed&quot;.
&gt; I&apos;m not sure if this is a problem in the hash map code or in how it&apos;s used
&gt; here.

It&apos;s definitely a problem in the hash map code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41400</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-05-06 11:59:11 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; It&apos;s definitely a problem in the hash map code.

It&apos;s wrong for HashMap::remove to call the value&apos;s destructor. Instead it needs to use the smart &quot;RefCounter&quot; template to do whatever extra work is needed because of differences between the value&apos;s destructor and the storage value&apos;s destructor.

The code that&apos;s in there now is just totally wrong!

I have a fix and I&apos;ll attach it shortly. What I&apos;m not sure about is how to make a test for this.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41403</commentid>
    <comment_count>6</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-05-06 12:10:24 -0700</bug_when>
    <thetext>I&apos;m confused now. I have a patch that I believe fixes the double destruction. But the incorrect text zooming still seems to be occuring. Mitz, I don&apos;t know how you made the connection between the bug and the problems in the form element code, so I&apos;m not sure what else to try to diagnose this. For the time being, attaching my patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41404</commentid>
    <comment_count>7</comment_count>
      <attachid>8137</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-05-06 12:11:29 -0700</bug_when>
    <thetext>Created attachment 8137
patch based on Mitz&apos;s analysis, not sure if it fixes bug or what he observed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41405</commentid>
    <comment_count>8</comment_count>
    <who name="">mitz</who>
    <bug_when>2006-05-06 12:28:10 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Mitz, I don&apos;t know
&gt; how you made the connection between the bug and the problems in the form
&gt; element code, so I&apos;m not sure what else to try to diagnose this.

It was wrong of me to report the problems with the form element code under this bug, as I hadn&apos;t observed any connection. Not sure what to do now about the mess I made. Should I file a new bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41410</commentid>
    <comment_count>9</comment_count>
    <who name="">mitz</who>
    <bug_when>2006-05-06 13:57:58 -0700</bug_when>
    <thetext>This bug is a regression for r14032 (fix for bug 8562).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41418</commentid>
    <comment_count>10</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-05-06 16:40:39 -0700</bug_when>
    <thetext>So that means that the anomalies with the form element hash table are a separate issue. And they still need to be fixed. Maybe I should file a separate bug about those.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41419</commentid>
    <comment_count>11</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-05-06 16:41:08 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; Should I file a new bug?

Yes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41425</commentid>
    <comment_count>12</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2006-05-07 00:49:25 -0700</bug_when>
    <thetext>I can reproduce the crash reliably so I&apos;ll test if the patch works and file a new bug if needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41435</commentid>
    <comment_count>13</comment_count>
    <who name="">mitz</who>
    <bug_when>2006-05-07 04:47:20 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #8)
&gt; &gt; Should I file a new bug?
&gt; 
&gt; Yes.
&gt; 

Maciej filed bug 8765.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44842</commentid>
    <comment_count>14</comment_count>
    <who name="Alice Liu">alice.barraclough</who>
    <bug_when>2006-06-06 07:38:21 -0700</bug_when>
    <thetext>&lt;rdar://problem/4575086&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49770</commentid>
    <comment_count>15</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-07-14 06:04:19 -0700</bug_when>
    <thetext>This bug no longer happens with the test case here, because the text view is now an HTML view, and the cause of the bug had something to do with switching view types. That doesn&apos;t mean the bug has gone away, but it&apos;s almost certainly less common now and I no longer know how to reproduce it.

Not a P1 any more.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>896968</commentid>
    <comment_count>16</comment_count>
    <who name="Robert Hogan">robert</who>
    <bug_when>2013-06-04 11:07:30 -0700</bug_when>
    <thetext>I don&apos;t think this bug is meaningful any more. Can it be closed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>896978</commentid>
    <comment_count>17</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2013-06-04 11:21:44 -0700</bug_when>
    <thetext>Not sure if this bug really exists any more. We’ll just close this.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>8137</attachid>
            <date>2006-05-06 12:11:29 -0700</date>
            <delta_ts>2006-05-07 19:50:21 -0700</delta_ts>
            <desc>patch based on Mitz&apos;s analysis, not sure if it fixes bug or what he observed</desc>
            <filename>FormElementHashPatch.txt</filename>
            <type>text/plain</type>
            <size>2380</size>
            <attacher name="Darin Adler">darin</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvZG9tL0RvY3VtZW50LmNwcAo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBXZWJDb3JlL2Rv
bS9Eb2N1bWVudC5jcHAJKHJldmlzaW9uIDE0MjE2KQorKysgV2ViQ29yZS9kb20vRG9jdW1lbnQu
Y3BwCSh3b3JraW5nIGNvcHkpCkBAIC0zMDc4LDcgKzMwNzgsOCBAQAogCiBWZWN0b3I8U3RyaW5n
PiBEb2N1bWVudDo6Zm9ybUVsZW1lbnRzU3RhdGUoKSBjb25zdAogewotICAgIFZlY3RvcjxTdHJp
bmc+IHN0YXRlVmVjdG9yKG1fZm9ybUVsZW1lbnRzV2l0aFN0YXRlLnNpemUoKSAqIDMpOworICAg
IFZlY3RvcjxTdHJpbmc+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
YXZhU2NyaXB0Q29yZS9reG1sY29yZS9IYXNoTWFwLmgJKHdvcmtpbmcgY29weSkKQEAgLTI4OCw4
ICsyODgsNyBAQAogICAgIHsKICAgICAgICAgaWYgKGl0Lm1faW1wbCA9PSBtX2ltcGwuZW5kKCkp
CiAgICAgICAgICAgICByZXR1cm47Ci0gICAgICAgIC8vIFVzZSAiKCppdCkuIiBpbnN0ZWFkIG9m
ICJpdC0+IiB0byB3b3JrIGFyb3VuZCBhIHByb2JsZW0gc2VlbiB3aXRoIHRoZSBWaXN1YWwgQysr
IGNvbXBpbGVyLgotICAgICAgICAoKml0KS5+VmFsdWVUeXBlKCk7CisgICAgICAgIFJlZkNvdW50
ZXI8VmFsdWVUcmFpdHMsIFZhbHVlU3RvcmFnZVRyYWl0cz46OmRlcmVmKCppdC5tX2ltcGwpOwog
ICAgICAgICBtX2ltcGwucmVtb3ZlKGl0Lm1faW1wbCk7CiAgICAgfQogCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>