<?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>49040</bug_id>
          
          <creation_ts>2010-11-04 17:04:11 -0700</creation_ts>
          <short_desc>Pasting large amounts of plain text in a text area is very slow</short_desc>
          <delta_ts>2010-11-05 17:15:23 -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>HTML Editing</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</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>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Enrica Casucci">enrica</reporter>
          <assigned_to name="Enrica Casucci">enrica</assigned_to>
          <cc>adele</cc>
    
    <cc>ojan</cc>
    
    <cc>rniwa</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>305014</commentid>
    <comment_count>0</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-11-04 17:04:11 -0700</bug_when>
    <thetext>Select a large amount of plain text (~500k) from a file and copy
Open the attached file.
Paste into the text area.

Result: the browser hangs for several seconds.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305015</commentid>
    <comment_count>1</comment_count>
      <attachid>73006</attachid>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-11-04 17:04:40 -0700</bug_when>
    <thetext>Created attachment 73006
Test</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305017</commentid>
    <comment_count>2</comment_count>
      <attachid>73007</attachid>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-11-04 17:11:26 -0700</bug_when>
    <thetext>Created attachment 73007
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305021</commentid>
    <comment_count>3</comment_count>
      <attachid>73007</attachid>
    <who name="Adele Peterson">adele</who>
    <bug_when>2010-11-04 17:20:51 -0700</bug_when>
    <thetext>Comment on attachment 73007
Patch

Would we also want this optimization if we&apos;re pasting into any element that has user-modify: read-write-plaintext-only set?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305161</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-11-04 23:21:41 -0700</bug_when>
    <thetext>See also: bug 34237 (a case of slow pasting that Enrica fixed a few months ago).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305164</commentid>
    <comment_count>5</comment_count>
      <attachid>73007</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2010-11-04 23:34:35 -0700</bug_when>
    <thetext>Comment on attachment 73007
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=73007&amp;action=review

&gt; WebCore/ChangeLog:11
&gt; +        pasting into a text area. What we really avoid is iterating through
&gt; +        a large number of paragraph when no style change is needed.

&quot;What we really avoid is iterating through...&quot; sounds confusing to me.  Maybe just &quot;We avoid iterating through...&quot;?

&gt; WebCore/editing/ReplaceSelectionCommand.cpp:1164
&gt; -        if (m_matchStyle) {
&gt; +        if (m_matchStyle &amp;&amp; !isNodeInTextFormControl(start.node())) {

Isn&apos;t better to set m_matchStyle=false right at the front if we&apos;re in a text form control?  Is there a case we need m_matchStyle=true even when we&apos;re in a text form control?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305335</commentid>
    <comment_count>6</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-11-05 10:03:58 -0700</bug_when>
    <thetext>It might be possible to write a perf test for this (seems like the time should be constant or linear).  See LayoutTests/resources/magnitude-perf.js and LayoutTests/perf.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305347</commentid>
    <comment_count>7</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-11-05 10:23:43 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 73007 [details])
&gt; Would we also want this optimization if we&apos;re pasting into any element that has user-modify: read-write-plaintext-only set?

I&apos;ll look into it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305351</commentid>
    <comment_count>8</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-11-05 10:27:59 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (From update of attachment 73007 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=73007&amp;action=review
&gt; 
&gt; &gt; WebCore/ChangeLog:11
&gt; &gt; +        pasting into a text area. What we really avoid is iterating through
&gt; &gt; +        a large number of paragraph when no style change is needed.
&gt; 
&gt; &quot;What we really avoid is iterating through...&quot; sounds confusing to me.  Maybe just &quot;We avoid iterating through...&quot;?
&gt; 
Not sure that what you suggest is less confusing. I can rephrase this.
The point I&apos;m trying to make is that the performance hit comes from the paragraph iteration.

&gt; &gt; WebCore/editing/ReplaceSelectionCommand.cpp:1164
&gt; &gt; -        if (m_matchStyle) {
&gt; &gt; +        if (m_matchStyle &amp;&amp; !isNodeInTextFormControl(start.node())) {
&gt; 
&gt; Isn&apos;t better to set m_matchStyle=false right at the front if we&apos;re in a text form control?
I believe it makes no difference, this is where we apply the style, if we check here we skip applying the style.
  Is there a case we need m_matchStyle=true even when we&apos;re in a text form control?
No. In general we wouldn&apos;t need to apply the style when pasting plain text except for the case where we want to preserve the typing style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305353</commentid>
    <comment_count>9</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-11-05 10:30:41 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; It might be possible to write a perf test for this (seems like the time should be constant or linear).  See LayoutTests/resources/magnitude-perf.js and LayoutTests/perf.

This fix doesn&apos;t change the performance from non-linear to linear. The performance is linear already.
Do you think this is still worth?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305374</commentid>
    <comment_count>10</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2010-11-05 10:51:15 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; No. In general we wouldn&apos;t need to apply the style when pasting plain text except for the case where we want to preserve the typing style.

Ok, in that case, it&apos;s cleaner to set m_matchStyle false if we&apos;re in a text form control.  When we don&apos;t need this extra condition in the if statement.  I think setting this either when we instantiates ReplaceSelectionCommand or right at the beginning of doApply will also prevent us from needlessly obtaining the computed style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305377</commentid>
    <comment_count>11</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2010-11-05 10:53:51 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; (In reply to comment #6)
&gt; &gt; It might be possible to write a perf test for this (seems like the time should be constant or linear).  See LayoutTests/resources/magnitude-perf.js and LayoutTests/perf.
&gt; 
&gt; This fix doesn&apos;t change the performance from non-linear to linear. The performance is linear already.
&gt; Do you think this is still worth?

It might be fast enough to show up as constant even though it&apos;s technically linear.  Another way to think of it is testing to make sure that pasting 500k of text always takes less than X ms.

I&apos;m not sure that magnitude-perf.js will handle this type of test well, Ojan, what do you think?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305385</commentid>
    <comment_count>12</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2010-11-05 11:00:58 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; It might be fast enough to show up as constant even though it&apos;s technically linear.  Another way to think of it is testing to make sure that pasting 500k of text always takes less than X ms.

I&apos;m afraid setting a hard time limit will make this test flaky. I&apos;m okay with not having a test for this change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305479</commentid>
    <comment_count>13</comment_count>
    <who name="Ojan Vafai">ojan</who>
    <bug_when>2010-11-05 13:19:22 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #9)
&gt; &gt; (In reply to comment #6)
&gt; &gt; &gt; It might be possible to write a perf test for this (seems like the time should be constant or linear).  See LayoutTests/resources/magnitude-perf.js and LayoutTests/perf.
&gt; &gt; 
&gt; &gt; This fix doesn&apos;t change the performance from non-linear to linear. The performance is linear already.
&gt; &gt; Do you think this is still worth?
&gt; 
&gt; It might be fast enough to show up as constant even though it&apos;s technically linear.  Another way to think of it is testing to make sure that pasting 500k of text always takes less than X ms.
&gt; 
&gt; I&apos;m not sure that magnitude-perf.js will handle this type of test well, Ojan, what do you think?

The magnitude perf stuff is still pretty experimental (e.g. these tests are skipped on non-chromium bots right now). I welcome people using it and writing new tests, but it&apos;s still on my todo list to make the tests more reliable. Given that this patch is not changing the order of magnitude, I probably wouldn&apos;t bother in this case.

(In reply to comment #12)
&gt; (In reply to comment #11)
&gt; &gt; It might be fast enough to show up as constant even though it&apos;s technically linear.  Another way to think of it is testing to make sure that pasting 500k of text always takes less than X ms.
&gt; 
&gt; I&apos;m afraid setting a hard time limit will make this test flaky. I&apos;m okay with not having a test for this change.

We could at least have a manual test. It&apos;s not ideal, but it gives a comparison point that can be used to identify regressions between nightly builds. Eventually, if we have a performance testing framework, we can move this test into it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305494</commentid>
    <comment_count>14</comment_count>
      <attachid>73111</attachid>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-11-05 13:42:27 -0700</bug_when>
    <thetext>Created attachment 73111
Patch2

This is a new patch that addresses Adele&apos;s and Ryosuke&apos;s comments.
I don&apos;t think we need another layout test for this fix, since there are several tests that verify the correct behavior in this case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305527</commentid>
    <comment_count>15</comment_count>
      <attachid>73111</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2010-11-05 14:26:45 -0700</bug_when>
    <thetext>Comment on attachment 73111
Patch2

View in context: https://bugs.webkit.org/attachment.cgi?id=73111&amp;action=review

&gt; editing/ReplaceSelectionCommand.cpp:804
&gt; +    if (isNodeInTextFormControl(selection.start().node()) || (selection.start().node()-&gt;renderer() &amp;&amp; selection.start().node()-&gt;renderer()-&gt;style()-&gt;userModify() == READ_WRITE_PLAINTEXT_ONLY))
&gt; +        m_matchStyle = false;

Maybe we should also check the selection end?  Or is there guarantee that this would never happen?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305531</commentid>
    <comment_count>16</comment_count>
      <attachid>73111</attachid>
    <who name="Adele Peterson">adele</who>
    <bug_when>2010-11-05 14:31:25 -0700</bug_when>
    <thetext>Comment on attachment 73111
Patch2

View in context: https://bugs.webkit.org/attachment.cgi?id=73111&amp;action=review

&gt;&gt; editing/ReplaceSelectionCommand.cpp:804
&gt;&gt; +        m_matchStyle = false;
&gt; 
&gt; Maybe we should also check the selection end?  Or is there guarantee that this would never happen?

Is there a need to still do the isNodeInTextFormControl check?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305636</commentid>
    <comment_count>17</comment_count>
      <attachid>73142</attachid>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-11-05 16:51:49 -0700</bug_when>
    <thetext>Created attachment 73142
Patch3

All tests pass.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305639</commentid>
    <comment_count>18</comment_count>
      <attachid>73142</attachid>
    <who name="Adele Peterson">adele</who>
    <bug_when>2010-11-05 16:55:29 -0700</bug_when>
    <thetext>Comment on attachment 73142
Patch3

View in context: https://bugs.webkit.org/attachment.cgi?id=73142&amp;action=review

&gt; ChangeLog:19
&gt; +        and force no style matching.

You should update this comment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305640</commentid>
    <comment_count>19</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2010-11-05 16:56:10 -0700</bug_when>
    <thetext>(In reply to comment #17)
&gt; Created an attachment (id=73142) [details]
&gt; Patch3
&gt; 
&gt; All tests pass.

Your patch is made in WebCore/.  Could you remake it in /?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305641</commentid>
    <comment_count>20</comment_count>
      <attachid>73142</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2010-11-05 16:58:40 -0700</bug_when>
    <thetext>Comment on attachment 73142
Patch3

View in context: https://bugs.webkit.org/attachment.cgi?id=73142&amp;action=review

&gt; editing/ReplaceSelectionCommand.cpp:805
&gt; +    if ((selection.start().node()-&gt;renderer() &amp;&amp; selection.start().node()-&gt;renderer()-&gt;style()-&gt;userModify() == READ_WRITE_PLAINTEXT_ONLY) &amp;&amp;
&gt; +        (selection.end().node()-&gt;renderer() &amp;&amp; selection.end().node()-&gt;renderer()-&gt;style()-&gt;userModify() == READ_WRITE_PLAINTEXT_ONLY))
&gt; +        m_matchStyle = false;

I&apos;m just curious as to why this is superior to checking that it&apos;s in the text form control.  Could you elaborate?  Of course, this patch LGTM nonetheless.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305644</commentid>
    <comment_count>21</comment_count>
    <who name="Adele Peterson">adele</who>
    <bug_when>2010-11-05 17:00:19 -0700</bug_when>
    <thetext>Its superior because this optimization will apply to other plaintext editable areas besides form controls.
 
(In reply to comment #20)
&gt; (From update of attachment 73142 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=73142&amp;action=review
&gt; 
&gt; &gt; editing/ReplaceSelectionCommand.cpp:805
&gt; &gt; +    if ((selection.start().node()-&gt;renderer() &amp;&amp; selection.start().node()-&gt;renderer()-&gt;style()-&gt;userModify() == READ_WRITE_PLAINTEXT_ONLY) &amp;&amp;
&gt; &gt; +        (selection.end().node()-&gt;renderer() &amp;&amp; selection.end().node()-&gt;renderer()-&gt;style()-&gt;userModify() == READ_WRITE_PLAINTEXT_ONLY))
&gt; &gt; +        m_matchStyle = false;
&gt; 
&gt; I&apos;m just curious as to why this is superior to checking that it&apos;s in the text form control.  Could you elaborate?  Of course, this patch LGTM nonetheless.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305648</commentid>
    <comment_count>22</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2010-11-05 17:03:52 -0700</bug_when>
    <thetext>(In reply to comment #21)
&gt; Its superior because this optimization will apply to other plaintext editable areas besides form controls.

Right, but what are they?  What uses editable region other than contenteditable and forms?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305650</commentid>
    <comment_count>23</comment_count>
    <who name="Adele Peterson">adele</who>
    <bug_when>2010-11-05 17:08:27 -0700</bug_when>
    <thetext>Any element could have this style.  Just like any element could set &quot;-webkit-user-modify: read-write&quot; to get rich text editing.

(In reply to comment #22)
&gt; (In reply to comment #21)
&gt; &gt; Its superior because this optimization will apply to other plaintext editable areas besides form controls.
&gt; 
&gt; Right, but what are they?  What uses editable region other than contenteditable and forms?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305651</commentid>
    <comment_count>24</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2010-11-05 17:09:56 -0700</bug_when>
    <thetext>(In reply to comment #23)
&gt; Any element could have this style.  Just like any element could set &quot;-webkit-user-modify: read-write&quot; to get rich text editing.

That makes sense.  Thanks for the information.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>305655</commentid>
    <comment_count>25</comment_count>
    <who name="Enrica Casucci">enrica</who>
    <bug_when>2010-11-05 17:15:23 -0700</bug_when>
    <thetext>Committed revision 71459.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>73006</attachid>
            <date>2010-11-04 17:04:40 -0700</date>
            <delta_ts>2010-11-04 17:04:40 -0700</delta_ts>
            <desc>Test</desc>
            <filename>textarea.html</filename>
            <type>text/html</type>
            <size>48</size>
            <attacher name="Enrica Casucci">enrica</attacher>
            
              <data encoding="base64">UGFzdGUgaGVyZToKPHRleHRhcmVhIGlkPSJ0ZXh0YXJlYSI+PC90ZXh0YXJlYT4K
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>73007</attachid>
            <date>2010-11-04 17:11:26 -0700</date>
            <delta_ts>2010-11-05 13:42:27 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>fastpaste.txt</filename>
            <type>text/plain</type>
            <size>1652</size>
            <attacher name="Enrica Casucci">enrica</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA3MTM2NikKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMjEgQEAKKzIwMTAtMTEtMDQgIEVucmljYSBDYXN1Y2NpICA8ZW5yaWNhQGFwcGxl
LmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBQ
YXN0aW5nIGxhcmdlIGFtb3VudHMgb2YgcGxhaW4gdGV4dCBpbiBhIHRleHQgYXJlYSBpcyB2ZXJ5
IHNsb3cKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTQ5
MDQwCisgICAgICAgIDxyZGFyOi8vcHJvYmxlbS83NjQwOTEyPgorICAgICAgICAKKyAgICAgICAg
VGhlIG9wdGltaXphdGlvbiBjb25zaXN0cyBpbiBza2lwcGluZyB0aGUgQXBwbHlTdHlsZSBjb21t
YW5kIHdoZW4KKyAgICAgICAgcGFzdGluZyBpbnRvIGEgdGV4dCBhcmVhLiBXaGF0IHdlIHJlYWxs
eSBhdm9pZCBpcyBpdGVyYXRpbmcg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AgICAgcmViYWxhbmNlV2hpdGVzcGFj
ZUF0KGVuZCk7CiAKLSAgICAgICAgaWYgKG1fbWF0Y2hTdHlsZSkgeworICAgICAgICBpZiAobV9t
YXRjaFN0eWxlICYmICFpc05vZGVJblRleHRGb3JtQ29udHJvbChzdGFydC5ub2RlKCkpKSB7CiAg
ICAgICAgICAgICBBU1NFUlQobV9pbnNlcnRpb25TdHlsZSk7CiAgICAgICAgICAgICBhcHBseVN0
eWxlKG1faW5zZXJ0aW9uU3R5bGUuZ2V0KCksIHN0YXJ0LCBlbmQpOwogICAgICAgICB9ICAgIAo=
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>73111</attachid>
            <date>2010-11-05 13:42:27 -0700</date>
            <delta_ts>2010-11-05 16:51:49 -0700</delta_ts>
            <desc>Patch2</desc>
            <filename>fastpaste.txt</filename>
            <type>text/plain</type>
            <size>2009</size>
            <attacher name="Enrica Casucci">enrica</attacher>
            
              <data encoding="base64">SW5kZXg6IGVkaXRpbmcvUmVwbGFjZVNlbGVjdGlvbkNvbW1hbmQuY3BwCj09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0t
IGVkaXRpbmcvUmVwbGFjZVNlbGVjdGlvbkNvbW1hbmQuY3BwCShyZXZpc2lvbiA3MTQ0MCkKKysr
IGVkaXRpbmcvUmVwbGFjZVNlbGVjdGlvbkNvbW1hbmQuY3BwCSh3b3JraW5nIGNvcHkpCkBAIC03
OTksNiArNzk5LDEwIEBACiAgICAgaWYgKHBlcmZvcm1Ucml2aWFsUmVwbGFjZShmcmFnbWVudCkp
CiAgICAgICAgIHJldHVybjsKICAgICAKKyAgICAvLyBXZSBjYW4gc2tpcCBtYXRjaGluZyB0aGUg
c3R5bGUgaWYgdGhlIHNlbGVjdGlvbiBpcyBpbiBhIHRleHQgY29udHJvbCBvciBoYXMgcmVhZC13
cml0ZS1wbG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attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>73142</attachid>
            <date>2010-11-05 16:51:49 -0700</date>
            <delta_ts>2010-11-05 16:58:40 -0700</delta_ts>
            <desc>Patch3</desc>
            <filename>fastpaste.txt</filename>
            <type>text/plain</type>
            <size>2049</size>
            <attacher name="Enrica Casucci">enrica</attacher>
            
              <data encoding="base64">SW5kZXg6IGVkaXRpbmcvUmVwbGFjZVNlbGVjdGlvbkNvbW1hbmQuY3BwCj09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0t
IGVkaXRpbmcvUmVwbGFjZVNlbGVjdGlvbkNvbW1hbmQuY3BwCShyZXZpc2lvbiA3MTQ0MCkKKysr
IGVkaXRpbmcvUmVwbGFjZVNlbGVjdGlvbkNvbW1hbmQuY3BwCSh3b3JraW5nIGNvcHkpCkBAIC03
OTksNiArNzk5LDExIEBACiAgICAgaWYgKHBlcmZvcm1Ucml2aWFsUmVwbGFjZShmcmFnbWVudCkp
CiAgICAgICAgIHJldHVybjsKICAgICAKKyAgICAvLyBXZSBjYW4gc2tpcCBtYXRjaGluZyB0aGUg
c3R5bGUgaWYgdGhlIHNlbGVjdGlvbiBpcyBwbGFpbiB0ZXh0LgorICAgIGlmICgoc2VsZWN0aW9u
LnN0YXJ0KCkubm9kZSgpLT5yZW5kZXJlcigpICYmIHNlbGVjdGlvbi5zdGFydCgpLm5vZGUoKS0+
cmVuZGVyZXIoKS0+c3R5bGUoKS0+dXNlck1vZGlmeSgpID09IFJFQURfV1JJVEVfUExBSU5URVhU
X09OTFkpICYmCisgICAgICAgIChzZWxlY3Rpb24uZW5kKCkubm9kZSgpLT5yZW5kZXJlcigpICYm
IHNlbGVjdGlvbi5lbmQoKS5ub2RlKCktPnJlbmRlcmVyKCktPnN0eWxlKCktPnVzZXJNb2RpZnko
KSA9PSBSRUFEX1dSSVRFX1BMQUlOVEVYVF9PTkxZKSkKK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
b21lcyBmcm9tIGl0ZXJhdGluZyB0aHJvdWdoCisgICAgICAgIGEgbGFyZ2UgbnVtYmVyIG9mIHBh
cmFncmFwaCB3aGVuIG5vIHN0eWxlIGNoYW5nZSBpcyBuZWVkZWQuCisgICAgICAgIEEgZnVydGhl
ciBzdGVwIHdpbGwgYmUgdG8gaW1wcm92ZSB0aGUgcGFyYWdyYXBoIGl0ZXJhdGlvbiB3aGVuIGl0
CisgICAgICAgIGNhbid0IGJlIGF2b2lkZWQuCisgICAgICAgIAorICAgICAgICAqIGVkaXRpbmcv
UmVwbGFjZVNlbGVjdGlvbkNvbW1hbmQuY3BwOgorICAgICAgICAoV2ViQ29yZTo6UmVwbGFjZVNl
bGVjdGlvbkNvbW1hbmQ6OmRvQXBwbHkpOiBDaGVjayBpZiB0aGUgc2VsZWN0aW9uCisgICAgICAg
IGlzIGluIGEgdGV4dCBmb3JtIGNvbnRyb2wgb3IgaW4gYW4gZWxlbWVudCB0aGF0IGhhcyAtd2Vi
a2l0LXVzZXItbW9kaWZ5OiByZWFkLXdyaXRlLXBsYWludGV4dC1vbmx5CisgICAgICAgIGFuZCBm
b3JjZSBubyBzdHlsZSBtYXRjaGluZy4KKwogMjAxMC0xMS0wNSAgQ2hhcmxpZSBSZWlzICA8Y3Jl
aXNAY2hyb21pdW0ub3JnPgogCiAgICAgICAgIFJldmlld2VkIGJ5IERhcmluIEZpc2hlci4K
</data>
<flag name="review"
          id="63530"
          type_id="1"
          status="+"
          setter="adele"
    />
          </attachment>
      

    </bug>

</bugzilla>