<?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>111494</bug_id>
          
          <creation_ts>2013-03-05 16:30:19 -0800</creation_ts>
          <short_desc>innerHTML should use lazyAttach to avoid creating a render tree until needed</short_desc>
          <delta_ts>2023-04-01 00:55:11 -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>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</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>
          <dependson>116926</dependson>
          <blocked>94733</blocked>
    
    <blocked>111644</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Eric Seidel (no email)">eric</assigned_to>
          <cc>abarth</cc>
    
    <cc>aestes</cc>
    
    <cc>annevk</cc>
    
    <cc>buildbot</cc>
    
    <cc>dglazkov</cc>
    
    <cc>esprehn</cc>
    
    <cc>haraken</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>kling</cc>
    
    <cc>koivisto</cc>
    
    <cc>mifenton</cc>
    
    <cc>rniwa</cc>
    
    <cc>tonyg</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>848229</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-05 16:30:19 -0800</bug_when>
    <thetext>innerHTML should use lazyAttach to avoid creating a render tree until needed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848232</commentid>
    <comment_count>1</comment_count>
      <attachid>191596</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-05 16:33:36 -0800</bug_when>
    <thetext>Created attachment 191596
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848235</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-05 16:34:17 -0800</bug_when>
    <thetext>This may need a couple more tweeks.  I saw two editing-related failures on my local machine, but am not yet sure if those are from this patch or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848239</commentid>
    <comment_count>3</comment_count>
      <attachid>191596</attachid>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2013-03-05 16:35:35 -0800</bug_when>
    <thetext>Comment on attachment 191596
Patch

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

&gt; Source/WebCore/ChangeLog:15
&gt; +        In any case, this brings our inner-html-setter number from 93 runs/sec to 507 runs/sec :)

Really!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848242</commentid>
    <comment_count>4</comment_count>
      <attachid>191596</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2013-03-05 16:39:28 -0800</bug_when>
    <thetext>Comment on attachment 191596
Patch

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

&gt; Source/WebCore/editing/markup.cpp:1100
&gt; -        containerNode-&gt;replaceChild(fragment, containerNode-&gt;firstChild(), ec);
&gt; +        containerNode-&gt;replaceChild(fragment, containerNode-&gt;firstChild(), ec, true);

I wish the last parameter had more readable value than &quot;true&quot; (but that&apos;s obviously not something you need to solve in this patch).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848243</commentid>
    <comment_count>5</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2013-03-05 16:40:45 -0800</bug_when>
    <thetext>The 2400% regression bug is here: https://bugs.webkit.org/show_bug.cgi?id=94733</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848244</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-05 16:41:07 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 191596 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=191596&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/editing/markup.cpp:1100
&gt; &gt; -        containerNode-&gt;replaceChild(fragment, containerNode-&gt;firstChild(), ec);
&gt; &gt; +        containerNode-&gt;replaceChild(fragment, containerNode-&gt;firstChild(), ec, true);
&gt; 
&gt; I wish the last parameter had more readable value than &quot;true&quot; (but that&apos;s obviously not something you need to solve in this patch).

I tried shaving that Yak first, actually. :)   But that will wait for a second patch.  I&apos;m going to also change the default from false to true, since I suspect any place which depends on implicit &quot;false&quot; behavior is probably wrong.  There are some cases where it might make performance-sense to explicitly require a synchronous attach (like for editing I could imagine).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848310</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-05 17:43:41 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 191596 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=191596&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/editing/markup.cpp:1100
&gt; &gt; -        containerNode-&gt;replaceChild(fragment, containerNode-&gt;firstChild(), ec);
&gt; &gt; +        containerNode-&gt;replaceChild(fragment, containerNode-&gt;firstChild(), ec, true);
&gt; 
&gt; I wish the last parameter had more readable value than &quot;true&quot; (but that&apos;s obviously not something you need to solve in this patch).

Bug 111503.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848320</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-05 17:54:43 -0800</bug_when>
    <thetext>If bug 111503 lands before this one, this will need a trivial rebase.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848396</commentid>
    <comment_count>9</comment_count>
      <attachid>191596</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2013-03-05 19:46:52 -0800</bug_when>
    <thetext>Comment on attachment 191596
Patch

Attachment 191596 did not pass chromium-ews (chromium-xvfb):
Output: http://webkit-commit-queue.appspot.com/results/17082077

New failing tests:
fast/forms/basic-buttons.html
editing/execCommand/change-font.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848568</commentid>
    <comment_count>10</comment_count>
      <attachid>191596</attachid>
    <who name="Build Bot">buildbot</who>
    <bug_when>2013-03-06 00:42:49 -0800</bug_when>
    <thetext>Comment on attachment 191596
Patch

Attachment 191596 did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-commit-queue.appspot.com/results/17081088</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848675</commentid>
    <comment_count>11</comment_count>
      <attachid>191596</attachid>
    <who name="Build Bot">buildbot</who>
    <bug_when>2013-03-06 03:09:20 -0800</bug_when>
    <thetext>Comment on attachment 191596
Patch

Attachment 191596 did not pass win-ews (win):
Output: http://webkit-commit-queue.appspot.com/results/17021095</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>848829</commentid>
    <comment_count>12</comment_count>
      <attachid>191596</attachid>
    <who name="Build Bot">buildbot</who>
    <bug_when>2013-03-06 07:04:32 -0800</bug_when>
    <thetext>Comment on attachment 191596
Patch

Attachment 191596 did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/17065088</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>849167</commentid>
    <comment_count>13</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-06 12:07:59 -0800</bug_when>
    <thetext>--- /src/WebKit/Source/WebKit/chromium/webkit/Release/layout-test-results/fast/forms/basic-buttons-expected.txt
+++ /src/WebKit/Source/WebKit/chromium/webkit/Release/layout-test-results/fast/forms/basic-buttons-actual.txt
@@ -14,6 +14,7 @@
           text run at (0,40) width 617: &quot;with text (\&quot;foo\&quot;) and then uses six different paddings to make sure each of the buttons render properly. &quot;
         RenderBR {BR} at (617,40) size 0x19
         RenderBR {BR} at (0,60) size 0x19
+        RenderText {#text} at (0,0) size 0x0
       RenderTable {TABLE} at (0,80) size 657x285
         RenderTableSection {TBODY} at (0,0) size 657x285
           RenderTableRow {TR} at (0,0) size 657x22

And:

--- /src/WebKit/Source/WebKit/chromium/webkit/Release/layout-test-results/editing/execCommand/change-font-expected.txt
+++ /src/WebKit/Source/WebKit/chromium/webkit/Release/layout-test-results/editing/execCommand/change-font-actual.txt
@@ -1,2 +1,5 @@
 There should only be one font tag.
 SUCCESS
+
+

Are the failures.

Both come from uses of innerHTML on the body element.

I&apos;m not sure about either.  Maybe there is some white-space collapsing that we would normally do during synchronous attach() which we somehow miss in the async case?  The rendering of both pages is correct, this is a DRT-only issue.  Not yet sure if we care. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>849198</commentid>
    <comment_count>14</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-06 12:41:22 -0800</bug_when>
    <thetext>These failures sound very related to the code Haraken touched in bug 110786.  (I&apos;m not suggesting that his change broke anything here.  Just that he&apos;s touched that code and it&apos;s probably not lazy-attach aware.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>849203</commentid>
    <comment_count>15</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-06 12:45:52 -0800</bug_when>
    <thetext>(In reply to comment #14)
&gt; These failures sound very related to the code Haraken touched in bug 110786.  (I&apos;m not suggesting that his change broke anything here.  Just that he&apos;s touched that code and it&apos;s probably not lazy-attach aware.)

I suspect that we should move the &quot;don&apos;t ignore text renderers in all cases&quot; code in Node::attach() to style recalc and that would fix this issue.

Is suspect we&apos;re currently broken wrt ignoring text nodes and display/visibility changes of renderers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>849211</commentid>
    <comment_count>16</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-06 12:52:39 -0800</bug_when>
    <thetext>This FIXME in Element::recalcStyle *terrifies* me:
        if (ch == Detach || !currentStyle) {
            // FIXME: The style gets computed twice by calling attach. We could do better if we passed the style along.
            reattach();

If we&apos;re really recalc-ing style twice for intial attach of a lazy-attached node, that&apos;s absolutely horrible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>849316</commentid>
    <comment_count>17</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-06 14:41:48 -0800</bug_when>
    <thetext>(In reply to comment #16)
&gt; This FIXME in Element::recalcStyle *terrifies* me:
&gt;         if (ch == Detach || !currentStyle) {
&gt;             // FIXME: The style gets computed twice by calling attach. We could do better if we passed the style along.
&gt;             reattach();
&gt; 
&gt; If we&apos;re really recalc-ing style twice for intial attach of a lazy-attached node, that&apos;s absolutely horrible.

Filed bug 111627.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>849998</commentid>
    <comment_count>18</comment_count>
      <attachid>191596</attachid>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2013-03-07 05:41:57 -0800</bug_when>
    <thetext>Comment on attachment 191596
Patch

We should really do all attaching lazily (including that triggered by the parser).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>850412</commentid>
    <comment_count>19</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-07 13:03:50 -0800</bug_when>
    <thetext>(In reply to comment #18)
&gt; (From update of attachment 191596 [details])
&gt; We should really do all attaching lazily (including that triggered by the parser).

Agreed.  Do you have any theories for the failures mentioned in comment 13?  Debugging those is blocking this change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>850962</commentid>
    <comment_count>20</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2013-03-08 00:42:38 -0800</bug_when>
    <thetext>&gt; Agreed.  Do you have any theories for the failures mentioned in comment 13?

Not without debugging no.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>854794</commentid>
    <comment_count>21</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-13 16:59:02 -0700</bug_when>
    <thetext>http://trac.webkit.org/browser/trunk/LayoutTests/fast/forms/basic-buttons.html
and
http://trac.webkit.org/browser/trunk/LayoutTests/editing/execCommand/change-font.html
are the failing tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>854805</commentid>
    <comment_count>22</comment_count>
      <attachid>193025</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-03-13 17:14:15 -0700</bug_when>
    <thetext>Created attachment 193025
updated to tot</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>887626</commentid>
    <comment_count>23</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-05-10 14:41:56 -0700</bug_when>
    <thetext>With the patch applied, this test:

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
text
&lt;br&gt;
&lt;script&gt;
document.body.innerHTML += &apos;&lt;div&gt;&lt;/div&gt;&apos;;
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;

Fails with this diff:

@@ -7,4 +7,7 @@
         RenderText {#text} at (0,0) size 26x19
           text run at (0,0) width 26: &quot;text &quot;
         RenderBR {BR} at (26,0) size 0x19
+        RenderText {#text} at (0,0) size 0x0
       RenderBlock {DIV} at (0,20) size 784x0
+      RenderBlock (anonymous) at (0,20) size 784x0
+        RenderText {#text} at (0,0) size 0x0

Still debuggin.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>887644</commentid>
    <comment_count>24</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-05-10 15:27:36 -0700</bug_when>
    <thetext>Interestingly, removing this block in Node::attach() makes the behavior change go away. :)  (At least in the test in question.)

    // If this node got a renderer it may be the previousRenderer() of sibling text nodes and thus affect the
    // result of Text::textRendererIsNeeded() for those nodes.
    if (renderer()) {
        for (Node* next = nextSibling(); next; next = next-&gt;nextSibling()) {
            if (next-&gt;renderer())
                break;
            if (!next-&gt;attached())
                break; // Assume this means none of the following siblings are attached.
            if (!next-&gt;isTextNode())
                continue;
            ASSERT(!next-&gt;renderer());
            toText(next)-&gt;createTextRendererIfNeeded();
            // If we again decided not to create a renderer for next, we can bail out the loop,
            // because it won&apos;t affect the result of Text::textRendererIsNeeded() for the rest
            // of sibling nodes.
            if (!next-&gt;renderer())
                break;
        }
    }


I&apos;m not yet entirely sure what the &quot;correct&quot; behavior for these tests are, or if that block is doing what it really means to.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>887686</commentid>
    <comment_count>25</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-05-10 17:24:44 -0700</bug_when>
    <thetext>The following printf-logging on the above test:

@@ -221,8 +221,11 @@ bool Text::textRendererIsNeeded(const NodeRenderingContext&amp; context)
         return true;
 
     RenderObject* prev = context.previousRenderer();
-    if (prev &amp;&amp; prev-&gt;isBR()) // &lt;span&gt;&lt;br/&gt; &lt;br/&gt;&lt;/span&gt;
+    printf(&quot;prev: %p, br: %i\n&quot;, prev, prev &amp;&amp; prev-&gt;isBR());
+    if (prev &amp;&amp; prev-&gt;isBR()) {
+        // &lt;span&gt;&lt;br/&gt; &lt;br/&gt;&lt;/span&gt;
         return false;
+    }
 
     if (parent-&gt;isRenderInline()) {
         // &lt;span&gt;&lt;div/&gt; &lt;div/&gt;&lt;/span&gt;
@@ -236,12 +239,15 @@ bool Text::textRendererIsNeeded(const NodeRenderingContext&amp; context)
         while (first &amp;&amp; first-&gt;isFloatingOrOutOfFlowPositioned())
             first = first-&gt;nextSibling();
         RenderObject* next = context.nextRenderer();
-        if (!first || next == first)
+        if (!first || next == first) {
+            printf(&quot;magic!\n&quot;);
             // Whitespace at the start of a block just goes away.  Don&apos;t even
             // make a render object for this text.
             return false;
         }
+    }
 
+    printf(&quot;Default true: &apos;%s&apos;\n&quot;, wholeText().utf8().data());
     return true;
 }


Produces the following change:

@@ -1,8 +1,19 @@
-prev: 0x3c7cbc586038, br: 1
-prev: 0x3c7cbc3594b8, br: 1
-prev: 0x3c7cbc6dc138, br: 0
-prev: 0x3c7cbc6dc138, br: 0
-prev: 0x3c7cbc6dc138, br: 0
+prev: 0x1af39d059578, br: 1
+prev: (nil), br: 0
+magic!
+prev: (nil), br: 0
+magic!
+prev: (nil), br: 0
+magic!
+prev: 0x1af39d4ee0f8, br: 0
+Default true: &apos;
+&apos;
+prev: 0x1af39d512cf8, br: 0
+Default true: &apos;
+
+
+
+&apos;
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x36
@@ -12,4 +23,7 @@
         RenderText {#text} at (0,0) size 26x19
           text run at (0,0) width 26: &quot;text &quot;
         RenderBR {BR} at (26,0) size 0x19
+        RenderText {#text} at (0,0) size 0x0
       RenderBlock {DIV} at (0,20) size 784x0
+      RenderBlock (anonymous) at (0,20) size 784x0
+        RenderText {#text} at (0,0) size 0x0


Clearly we&apos;re taking a very different path for text node creation during lazyAttach.  Still investigating.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>887693</commentid>
    <comment_count>26</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2013-05-10 17:40:56 -0700</bug_when>
    <thetext>(In reply to comment #24)
&gt; Interestingly, removing this block in Node::attach() makes the behavior change go away. :)  (At least in the test in question.)

How about reverting http://trac.webkit.org/changeset/144526 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>887723</commentid>
    <comment_count>27</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2013-05-10 18:31:53 -0700</bug_when>
    <thetext>I believe the problem here is simply the code in Node::attach().

When lazy-attaching, nothing has a renderer yet.  But the first thing we attach, then walks through its siblings, creating a text renderers.  (See comment 24 for the context.)

lazyAttach marks you as &quot;attached&quot;, which confuses this code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1945931</commentid>
    <comment_count>28</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-04-01 00:55:11 -0700</bug_when>
    <thetext>This has all been substantially changed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>191596</attachid>
            <date>2013-03-05 16:33:36 -0800</date>
            <delta_ts>2013-03-13 17:14:10 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-111494-20130305162952.patch</filename>
            <type>text/plain</type>
            <size>2732</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTQ0ODAxCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggMzI3ODYyNDhkNDk3ZDdi
Njg1OWYyYWFiOGYxZDcyOGM3ZmFhYmVhMC4uYjhiOGI2MmEyYTU2NThlZGJhNmVjNjAxZTAxODhm
OTJmMmUwMDQ1MiAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDIzIEBACisyMDEzLTAzLTA1ICBFcmlj
IFNlaWRlbCAgPGVyaWNAd2Via2l0Lm9yZz4KKworICAgICAgICBpbm5lckhUTUwgc2hvdWxkIHVz
ZSBsYXp5QXR0YWNoIHRvIGF2b2lkIGNyZWF0aW5nIGEgcmVuZGVyIHRyZWUgdW50aWwgbmVlZGVk
CisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0xMTE0OTQK
KworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBJdCB3YXMg
YnJvdWdodCB0byB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TIgKzExMTksMTIgQEAgdm9pZCByZXBsYWNlQ2hpbGRy
ZW5XaXRoVGV4dChDb250YWluZXJOb2RlKiBjb250YWluZXIsIGNvbnN0IFN0cmluZyYgdGV4dCwg
RXhjZXAKICAgICBSZWZQdHI8VGV4dD4gdGV4dE5vZGUgPSBUZXh0OjpjcmVhdGUoY29udGFpbmVy
Tm9kZS0+ZG9jdW1lbnQoKSwgdGV4dCk7CiAKICAgICBpZiAoaGFzT25lQ2hpbGQoY29udGFpbmVy
Tm9kZS5nZXQoKSkpIHsKLSAgICAgICAgY29udGFpbmVyTm9kZS0+cmVwbGFjZUNoaWxkKHRleHRO
b2RlLnJlbGVhc2UoKSwgY29udGFpbmVyTm9kZS0+Zmlyc3RDaGlsZCgpLCBlYyk7CisgICAgICAg
IGNvbnRhaW5lck5vZGUtPnJlcGxhY2VDaGlsZCh0ZXh0Tm9kZS5yZWxlYXNlKCksIGNvbnRhaW5l
ck5vZGUtPmZpcnN0Q2hpbGQoKSwgZWMsIHRydWUpOwogICAgICAgICByZXR1cm47CiAgICAgfQog
CiAgICAgY29udGFpbmVyTm9kZS0+cmVtb3ZlQ2hpbGRyZW4oKTsKLSAgICBjb250YWluZXJOb2Rl
LT5hcHBlbmRDaGlsZCh0ZXh0Tm9kZS5yZWxlYXNlKCksIGVjKTsKKyAgICBjb250YWluZXJOb2Rl
LT5hcHBlbmRDaGlsZCh0ZXh0Tm9kZS5yZWxlYXNlKCksIGVjLCB0cnVlKTsKIH0KIAogfQo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>193025</attachid>
            <date>2013-03-13 17:14:15 -0700</date>
            <delta_ts>2013-03-13 17:14:15 -0700</delta_ts>
            <desc>updated to tot</desc>
            <filename>bug-111494-20130313171012.patch</filename>
            <type>text/plain</type>
            <size>2808</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTQ1Nz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Y29udGFpbmVyTm9kZS0+cmVwbGFjZUNoaWxkKHRl
eHROb2RlLnJlbGVhc2UoKSwgY29udGFpbmVyTm9kZS0+Zmlyc3RDaGlsZCgpLCBlYyk7CisgICAg
ICAgIGNvbnRhaW5lck5vZGUtPnJlcGxhY2VDaGlsZCh0ZXh0Tm9kZS5yZWxlYXNlKCksIGNvbnRh
aW5lck5vZGUtPmZpcnN0Q2hpbGQoKSwgZWMsIEF0dGFjaExhemlseSk7CiAgICAgICAgIHJldHVy
bjsKICAgICB9CiAKICAgICBjb250YWluZXJOb2RlLT5yZW1vdmVDaGlsZHJlbigpOwotICAgIGNv
bnRhaW5lck5vZGUtPmFwcGVuZENoaWxkKHRleHROb2RlLnJlbGVhc2UoKSwgZWMpOworICAgIGNv
bnRhaW5lck5vZGUtPmFwcGVuZENoaWxkKHRleHROb2RlLnJlbGVhc2UoKSwgZWMsIEF0dGFjaExh
emlseSk7CiB9CiAKIH0K
</data>

          </attachment>
      

    </bug>

</bugzilla>