<?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>78070</bug_id>
          
          <creation_ts>2012-02-07 19:25:48 -0800</creation_ts>
          <short_desc>REGRESSION: Page Cycler Moz regression from presentation attribute changes.</short_desc>
          <delta_ts>2013-02-16 16:13:24 -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>DOM</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>
          <dependson>78220</dependson>
    
    <dependson>78497</dependson>
    
    <dependson>78590</dependson>
    
    <dependson>78604</dependson>
    
    <dependson>78798</dependson>
    
    <dependson>78891</dependson>
    
    <dependson>79195</dependson>
    
    <dependson>79304</dependson>
    
    <dependson>79468</dependson>
    
    <dependson>80370</dependson>
    
    <dependson>82816</dependson>
          <blocked>77861</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Julien Chaffraix">jchaffraix</reporter>
          <assigned_to name="Andreas Kling">kling</assigned_to>
          <cc>cmarcelo</cc>
    
    <cc>dglazkov</cc>
    
    <cc>gregsimon</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>kling</cc>
    
    <cc>koivisto</cc>
    
    <cc>loislo</cc>
    
    <cc>michaeln</cc>
    
    <cc>mikelawther</cc>
    
    <cc>podivilov</cc>
    
    <cc>rniwa</cc>
    
    <cc>tony</cc>
    
    <cc>tonyg</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>551711</commentid>
    <comment_count>0</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2012-02-07 19:25:48 -0800</bug_when>
    <thetext>Using our integration bots (following WebKit and Chromium ToT) did catch up the regression but we did not hear them (not on WebKit:

http://build.chromium.org/f/chromium/perf/mac-release-10.6-webkit-latest/moz/report.html?history=150&amp;rev=-1

You can see 2 spikes (the revision number is written on the bottom left side of the graph):
* first one at r120492
* second one at r120514

I have found out which one corresponds to each build:
* first one -&gt; http://build.chromium.org/p/chromium.webkit/builders/Mac10.6%20Perf/builds/6206
* second one -&gt; http://build.chromium.org/p/chromium.webkit/builders/Mac10.6%20Perf/builds/6212

A chromium change could have regressed everything though we doubt it as rolling back WebKit removed the regression.

First spike points at http://trac.webkit.org/changeset/106741.

Second spike seems to point at http://trac.webkit.org/changeset/106756 (there is another change so I am not 100% sure).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>552058</commentid>
    <comment_count>1</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2012-02-08 05:53:11 -0800</bug_when>
    <thetext>Would it be possible to get a CPU profile dump of this test? Best thing would be a way for me to run the test myself, but as I understand it that&apos;s not possible. :/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>552172</commentid>
    <comment_count>2</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2012-02-08 08:58:21 -0800</bug_when>
    <thetext>Is there some way you could tell me which page(s) have regressed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>552244</commentid>
    <comment_count>3</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-02-08 10:16:48 -0800</bug_when>
    <thetext>(In reply to comment #1)
&gt; Would it be possible to get a CPU profile dump of this test? Best thing would be a way for me to run the test myself, but as I understand it that&apos;s not possible. :/

I&apos;ve sent you an email with the page cycler data.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>552812</commentid>
    <comment_count>4</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2012-02-08 20:43:38 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #1)
&gt; &gt; Would it be possible to get a CPU profile dump of this test? Best thing would be a way for me to run the test myself, but as I understand it that&apos;s not possible. :/
&gt; 
&gt; I&apos;ve sent you an email with the page cycler data.

Thanks a lot Tony. Using the data, I came up with the patch on bug 78199, which landed in &lt;http://trac.webkit.org/changeset/107173&gt;. I hope this fixes the regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>553233</commentid>
    <comment_count>5</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2012-02-09 09:40:19 -0800</bug_when>
    <thetext>Unfortunately it doesn&apos;t seem to have helped. You can always look at the graphs on Chromium side:

* Mac: http://build.chromium.org/f/chromium/perf/mac-release-10.6-webkit-latest/moz/report.html?history=150&amp;rev=-1
* Linux: http://build.chromium.org/f/chromium/perf/linux-release-webkit-latest/moz/report.html?history=150&amp;rev=-1
* Win Vista: http://build.chromium.org/f/chromium/perf/vista-release-webkit-latest/moz/report.html?history=150&amp;rev=-1

Unfortunately they don&apos;t show the WebKit revisions (this has been reported) but they do follow ToT WebKit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>555040</commentid>
    <comment_count>6</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2012-02-12 23:19:41 -0800</bug_when>
    <thetext>FYI, I am still working on this.
Landed &lt;http://trac.webkit.org/changeset/107484&gt; which re-enables the matched declaration cache optimizations for elements with presentation attributes.
I have a few more things coming, faster style sharing rejection, bypassing CSSParser where possible, etc. If none of this helps I&apos;m going to reinstate the cache for tagname/attrname/attrvalue -&gt; style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>555718</commentid>
    <comment_count>7</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-02-13 16:10:59 -0800</bug_when>
    <thetext>We&apos;re continuing to get slower as patches land and it&apos;s getting harder to determine the cause.  Here&apos;s the current graph:
http://build.chromium.org/f/chromium/perf/vista-release-webkit-latest/moz/report.html?history=150&amp;rev=121749

We recorded another 2% regression to the moz page cycler between r107445 and r107543: http://trac.webkit.org/log/trunk/Source?rev=107543&amp;stop_rev=107445&amp;verbose=on</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>556061</commentid>
    <comment_count>8</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2012-02-14 00:43:58 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; We&apos;re continuing to get slower as patches land and it&apos;s getting harder to determine the cause.  Here&apos;s the current graph:
&gt; http://build.chromium.org/f/chromium/perf/vista-release-webkit-latest/moz/report.html?history=150&amp;rev=121749
&gt; 
&gt; We recorded another 2% regression to the moz page cycler between r107445 and r107543: http://trac.webkit.org/log/trunk/Source?rev=107543&amp;stop_rev=107445&amp;verbose=on

Did &lt;http://trac.webkit.org/changeset/107573&gt; get rolled in yet? How do I know which WebKit revision the perf builder is at?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>556072</commentid>
    <comment_count>9</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2012-02-14 01:01:30 -0800</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #7)
&gt; &gt; We&apos;re continuing to get slower as patches land and it&apos;s getting harder to determine the cause.  Here&apos;s the current graph:
&gt; &gt; http://build.chromium.org/f/chromium/perf/vista-release-webkit-latest/moz/report.html?history=150&amp;rev=121749
&gt; &gt; 
&gt; &gt; We recorded another 2% regression to the moz page cycler between r107445 and r107543: http://trac.webkit.org/log/trunk/Source?rev=107543&amp;stop_rev=107445&amp;verbose=on
&gt; 
&gt; Did &lt;http://trac.webkit.org/changeset/107573&gt; get rolled in yet? How do I know which WebKit revision the perf builder is at?

Never mind, I guess this is what the &quot;Roll webkit deps from r107561 to r107621.&quot; commits are about. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>557371</commentid>
    <comment_count>10</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-02-15 10:32:36 -0800</bug_when>
    <thetext>loislo bisected the recent 2% perf regression and narrowed it down to http://trac.webkit.org/changeset/107484.  Andreas, should we open a new bug for that regression?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>561199</commentid>
    <comment_count>11</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-02-21 14:01:58 -0800</bug_when>
    <thetext>We seem to be holding steady at a 2% page cycler regression:

http://build.chromium.org/f/chromium/perf/xp-release-dual-core/moz/report.html?history=400&amp;rev=122870</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>561227</commentid>
    <comment_count>12</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-02-21 14:24:12 -0800</bug_when>
    <thetext>Sorry, I read the graph wrong.  It&apos;s around 9.5% right now on Windows.  Here&apos;s the graph:

http://build.chromium.org/f/chromium/perf/xp-release-dual-core/moz/report.html?history=500&amp;rev=122870

The first bump is the initial bug report, the second smaller bump is bug 78798.  Both still exist.

On Mac 10.6, it&apos;s only about 6-7%, but that&apos;s still pretty bad:
http://build.chromium.org/f/chromium/perf/mac-release-10.6/moz/report.html?history=570&amp;rev=122870

It&apos;s been 2 weeks since this bug was filed, should we consider reverting changes?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>561250</commentid>
    <comment_count>13</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2012-02-21 14:58:31 -0800</bug_when>
    <thetext>(In reply to comment #12)
&gt; It&apos;s been 2 weeks since this bug was filed, should we consider reverting changes?

Reverting these changes would be a task of unsavory proportions, and I&apos;d prefer that we didn&apos;t resort to that.

It&apos;s important to note that the content in this particular PLT is ~12 years old, and reflects a very different web where the nearly all styling is done with presentation attributes rather than CSS. To give you some idea, the largest style sheet in the test is 12 kB.

That said, I do intend to make up for this regression.

Much of the remaining delta is due to repeated reparsing of the same CSS values. My next step will be to introduce a String-&gt;CSSValue cache in CSSValuePool for use by presentation attributes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>569015</commentid>
    <comment_count>14</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-03-01 16:00:31 -0800</bug_when>
    <thetext>How&apos;re things progressing?  It looks like we got back the 2%, but we&apos;re still a 7% regression.

http://build.chromium.org/f/chromium/perf/xp-release-dual-core/moz/report.html?history=700&amp;rev=124156</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>570938</commentid>
    <comment_count>15</comment_count>
      <attachid>130179</attachid>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2012-03-05 12:21:06 -0800</bug_when>
    <thetext>Created attachment 130179
possible patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>570947</commentid>
    <comment_count>16</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-03-05 12:31:53 -0800</bug_when>
    <thetext>Attachment 130179 did not pass style-queue:

Failed to run &quot;[&apos;Tools/Scripts/check-webkit-style&apos;, &apos;--diff-files&apos;, u&apos;Source/WebCore/dom/StyledElement.cpp&apos;, u&apos;S...&quot; exit_code: 1
Source/WebCore/dom/StyledElement.cpp:52:  This { should be at the end of the previous line  [whitespace/braces] [4]
Source/WebCore/dom/StyledElement.cpp:85:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>570982</commentid>
    <comment_count>17</comment_count>
      <attachid>130179</attachid>
    <who name="Early Warning System Bot">webkit-ews</who>
    <bug_when>2012-03-05 13:08:54 -0800</bug_when>
    <thetext>Comment on attachment 130179
possible patch

Attachment 130179 did not pass qt-ews (qt):
Output: http://queues.webkit.org/results/11818158</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>571003</commentid>
    <comment_count>18</comment_count>
      <attachid>130179</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-03-05 13:37:41 -0800</bug_when>
    <thetext>Comment on attachment 130179
possible patch

Attachment 130179 did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11817178</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>571141</commentid>
    <comment_count>19</comment_count>
      <attachid>130179</attachid>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2012-03-05 16:18:11 -0800</bug_when>
    <thetext>Comment on attachment 130179
possible patch

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

I run Mozilla page cycler locally and it looks like this gives us a 1.8% increase in performance.

&gt; Source/WebCore/dom/StyledElement.cpp:246
&gt; +    PresentationAttributeCache::iterator cacheEntry;
&gt; +    if (!cacheKey.isNull())
&gt; +        cacheEntry = presentationAttributeCache().add(cacheKey, 0).first;

This is what makes Chromium unhappy: cacheEntry can be used later without having been properly initialized. Adding a default initialization to presentationAttributeCache().end() removes the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574028</commentid>
    <comment_count>20</comment_count>
      <attachid>130179</attachid>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2012-03-08 11:51:37 -0800</bug_when>
    <thetext>Comment on attachment 130179
possible patch

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

&gt; Source/WebCore/dom/StyledElement.cpp:101
&gt; +    static PresentationAttributeCache* cache = new PresentationAttributeCache();

This could also use DEFINE_STATIC_LOCAL.

&gt;&gt; Source/WebCore/dom/StyledElement.cpp:246
&gt;&gt; +        cacheEntry = presentationAttributeCache().add(cacheKey, 0).first;
&gt; 
&gt; This is what makes Chromium unhappy: cacheEntry can be used later without having been properly initialized. Adding a default initialization to presentationAttributeCache().end() removes the issue.

It looks like there is some race conditions here and we can still do a re-hashing (causing an ASSERT in debug). I though this was because we postpone the size() check to the end of the function and that we don&apos;t properly cap the size to minimumTableSize (I think it should be &gt;= instead of &gt;). Patching that did not help though.

Strangely enough changing our traits minimumTableSize to 255 (bad as it is not a power of 2) solves the problem. I would have to dig deeper into this to understand why.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>578101</commentid>
    <comment_count>21</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2012-03-13 18:58:26 -0700</bug_when>
    <thetext>The situation on the bots hasn&apos;t moved since this bug was filed and it makes no sense.

I could see the performance degradation on my Linux machine (a solid 2% under Chromium&apos;s DRT) and on the same setup, Antti&apos;s change brought us back to the performance level prior to r106740.

The linux perf bot is very noisy which makes it hard to know if he agrees with me here. I will see if I can reproduce the situation on a Mac SL machine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>578684</commentid>
    <comment_count>22</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2012-03-14 13:04:59 -0700</bug_when>
    <thetext>Yeah, it seems to me the sum of gains from the various fixes roughly matches the original regression. The bot graphs have a general long term trend of creeping up. I wonder if the what we have now is part of that trend, a collection of unrelated smaller regressions, apparently mostly affecting windows platform.

It also doesn&apos;t make sense to spend too much engineering effort on these tests. The web that they measure (all simple presentational html, no stylesheet, barely any scripts) doesn&apos;t exist anymore and we in any case load 40 of these kinds page in a second on an average laptop.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>578726</commentid>
    <comment_count>23</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-03-14 13:45:45 -0700</bug_when>
    <thetext>(In reply to comment #22)
&gt; Yeah, it seems to me the sum of gains from the various fixes roughly matches the original regression. The bot graphs have a general long term trend of creeping up. I wonder if the what we have now is part of that trend, a collection of unrelated smaller regressions, apparently mostly affecting windows platform.

This regression isn&apos;t Windows specific, here&apos;s the long view on the mac bot (looks like about 5% since this started):
http://build.chromium.org/f/chromium/perf/mac-release-10.6-webkit-latest/moz/report.html?history=700&amp;rev=126700

Also, because it&apos;s easy for other perf regressions to creep in, this is why it&apos;s better to roll out rather than fix in the tree over the span of weeks.

&gt; It also doesn&apos;t make sense to spend too much engineering effort on these tests. The web that they measure (all simple presentational html, no stylesheet, barely any scripts) doesn&apos;t exist anymore and we in any case load 40 of these kinds page in a second on an average laptop.

There&apos;s similar regressions noticed in the intl1 and intl2 page cyclers, which are from a scrape in 2007.  They&apos;re mostly pages from countries other than the US, but it&apos;s probably not that different from if we did a scrape of today&apos;s top US sites.
http://build.chromium.org/f/chromium/perf/vista-release-webkit-latest/intl1/report.html?history=700&amp;rev=126700
http://build.chromium.org/f/chromium/perf/vista-release-webkit-latest/intl2/report.html?history=700&amp;rev=126700

Which is to say, the regression may still impact today&apos;s pages, but it&apos;s hard to tell without a page cycler or some other perf test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>587932</commentid>
    <comment_count>24</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2012-03-26 11:11:13 -0700</bug_when>
    <thetext>I have more info on the regression. It is related to the matched properties cache in CSSStyleSelector:
* the original change (r106740) disabled matched properties caching for element with presentation attribute change.
* r107484 (bug 78381) re-introduced the caching but it did not improve the hit rate. There is actually a strong correlation here: what we would not cache before just ends up not finding any entries (the numbers are very close).
* other fixes have pumped up the average matched properties cache hit rate up but the case of presentation attribute change is still pathological.

I don&apos;t have a good idea why bug 78381 hasn&apos;t helped here though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>604179</commentid>
    <comment_count>25</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2012-04-17 11:32:14 -0700</bug_when>
    <thetext>Before I forget, here are my notes on this regression as I had to move to something else:
* When it comes to matched properties cache hit, there are 2 statistical populations: elements with and without presentation attributes. Element without presentation attributes have hit rate of ~60%, those with presentation attributes ~40%.
* I haven&apos;t been able to find the reasons for this big difference (I have investigated the presentation attribute cache, the style sharing algorithm and the matched properties cache).
* The original regression broke 2 levels of caching for presentation attributes (matched properties relies on the presentation attributes cache which was removed in r116740). Bug 80707 re-introduced the presentation attributes cache with a different design. However the new design may miss opportunities for cache hits: the old code would try to re-use CSSMappedAttributeDeclaration between different tags by using some buckets for each presentation attribute [called MappedAttributeEntry]. An early prototype of re-adding those buckets did not lead to any improvements though.
* Most of the matched properties cache misses for elements with presentation attribute are for: td (51% of the records), img (22%), table (11%) and body (4%). The remaining records are below 2%.
* Compared to pre-r116740, we are trying harder to cache matched properties which did help the overall cache hit rate. On intl* page cycler, our top reason for not caching is that the parent style has explicitly inherited properties (according for 38% of the records). This is likely due to table parts having borders related properties inherited by default.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>610882</commentid>
    <comment_count>26</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-04-26 13:16:24 -0700</bug_when>
    <thetext>At this point, too much time has passed and no one is actively investigating.  We may as well just close the bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>834878</commentid>
    <comment_count>27</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2013-02-16 16:13:24 -0800</bug_when>
    <thetext>(In reply to comment #26)
&gt; At this point, too much time has passed and no one is actively investigating.  We may as well just close the bug.

Indeed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>130179</attachid>
            <date>2012-03-05 12:21:06 -0800</date>
            <delta_ts>2012-03-08 11:51:37 -0800</delta_ts>
            <desc>possible patch</desc>
            <filename>presentation-attribute-cache-2.patch</filename>
            <type>text/plain</type>
            <size>6282</size>
            <attacher name="Antti Koivisto">koivisto</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL2RvbS9TdHlsZWRFbGVtZW50LmNwcAo9PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0t
LSBTb3VyY2UvV2ViQ29yZS9kb20vU3R5bGVkRWxlbWVudC5jcHAJKHJldmlzaW9uIDEwOTUxNikK
KysrIFNvdXJjZS9XZWJDb3JlL2RvbS9TdHlsZWRFbGVtZW50LmNwcAkod29ya2luZyBjb3B5KQpA
QCA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iArMzEsNyBAQAogbmFtZXNwYWNlIFdlYkNvcmUgewogCiBjbGFzcyBBdHRyaWJ1dGU7
CitzdHJ1Y3QgUHJlc2VudGF0aW9uQXR0cmlidXRlQ2FjaGVLZXk7CiAKIGNsYXNzIFN0eWxlZEVs
ZW1lbnQgOiBwdWJsaWMgRWxlbWVudCB7CiBwdWJsaWM6CkBAIC04Miw2ICs4Myw3IEBAIHByaXZh
dGU6CiAgICAgdmlydHVhbCB2b2lkIHVwZGF0ZVN0eWxlQXR0cmlidXRlKCkgY29uc3Q7CiAgICAg
dm9pZCBpbmxpbmVTdHlsZUNoYW5nZWQoKTsKIAorICAgIHZvaWQgbWFrZVByZXNlbnRhdGlvbkF0
dHJpYnV0ZUNhY2hlS2V5KFByZXNlbnRhdGlvbkF0dHJpYnV0ZUNhY2hlS2V5JikgY29uc3Q7CiAg
ICAgdm9pZCB1cGRhdGVBdHRyaWJ1dGVTdHlsZSgpOwogCiAgICAgdm9pZCBkZXN0cm95SW5saW5l
U3R5bGVEZWNsKCkK
</data>
<flag name="commit-queue"
          id="133119"
          type_id="3"
          status="-"
          setter="webkit-ews"
    />
          </attachment>
      

    </bug>

</bugzilla>