<?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>33962</bug_id>
          
          <creation_ts>2010-01-21 11:39:45 -0800</creation_ts>
          <short_desc>&apos;blur&apos; event fired while modal dialog box is up</short_desc>
          <delta_ts>2010-02-24 15:18:15 -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>All</rep_platform>
          <op_sys>All</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="James Robinson">jamesr</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>creis</cc>
    
    <cc>dglazkov</cc>
    
    <cc>dimich</cc>
    
    <cc>eric</cc>
    
    <cc>fishd</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>183260</commentid>
    <comment_count>0</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-01-21 11:39:45 -0800</bug_when>
    <thetext>WebKit fires the &apos;blur&apos; event, and runs associated handlers, while modal dialog boxes (like window.confirm() and window.alert()) are up.  This breaks assumptions in the page and in WebKit.

Test page:
http://livedom.validator.nu/?&lt;!DOCTYPE%20html&gt;%0A&lt;div%20id%3D&apos;log&apos;&gt;&lt;/div&gt;%0A&lt;input%20type%3D&apos;text&apos;%20id%3D&apos;foo&apos;&gt;lalala&lt;/input&gt;%0A&lt;script&gt;%0Afunction%20$(s)%20{return%20document.getElementById(s);}%0Afunction%20l(s)%20{%20$(&apos;log&apos;).innerHTML%20%2B%3D%20&quot;&lt;br&gt;&quot;%20%2B%20s;%20}%0A%0A$(&apos;foo&apos;).onmouseup%20%3D%20function()%20{%0A%20%20l(&apos;mouseup,%20about%20to%20confirm&apos;);%0A%20%20window.confirm(&quot;hi&quot;);%0A%20%20l(&apos;mouseup,%20did%20confirm&apos;);%0A}%0A$(&apos;foo&apos;).onblur%20%3D%20function()%20{%0A%20%20l(&apos;blur&apos;);%0A%20%20window.setTimeout(function()%20{l(&apos;timer%20fired&apos;);},%205000);%0A};%0A&lt;/script&gt;

On WebKit ToT, clicking inside the input area (and leaving the dialog up for &gt;5 seconds) causes the following output:
mouseup, about to confirm
blur
timer fired
mouseup, did confirm
blur
timer fired

In debug mode, if the dialog is dismissed in less than 5 seconds WebKit crashes with this assertion:
ASSERTION FAILED: m_suspended
(/usr/local/home/jamesr/WebKit/WebCore/page/DOMTimer.cpp:192 virtual void WebCore::DOMTimer::resume())

The reason is that the PageGroupLoadDeferrer suspends all active DOM objects when the modal dialog box is posted.  When the dialog is dismissed, it iterates over all active DOM objects and tries to resume them.  However, since the onblur handler fired while the dialog was up and set a new timer, it is not suspended when the resume() call is made.

Safari 4.0.4 doesn&apos;t fire the blur event at all while the modal dialog box is up.  On windows once the dialog box is dismissed the input area does not seem focused (it doesn&apos;t have a focus ring or a blinking cursor), but clicking outside of it does fire a blur event.  On OS X the dialog has a focus ring and blinking cursor after the dialog is dimissed.

Firefox 3.5.7 fires the blur handler while the dialog is up, but it doesn&apos;t run the body of the setTimeout() until the dialog box is dismissed regardless of how long the dialog is up.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>183807</commentid>
    <comment_count>1</comment_count>
      <attachid>47227</attachid>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-01-22 14:27:11 -0800</bug_when>
    <thetext>Created attachment 47227
Testcase using window.alert</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>183812</commentid>
    <comment_count>2</comment_count>
      <attachid>47229</attachid>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-01-22 14:45:48 -0800</bug_when>
    <thetext>Created attachment 47229
Does not fire focus/blur events while a modal dialog is up

This patch suppresses firing all focus events while a modal dialog is up (using Page::defersLoading() to detect this case).  This is consistent with Safari 4.0.4 behavior, although it is a change compared to ToT WebKit.  Here is a summary of what other browsers do when an &lt;input&gt; has a mouseup handler that opens a modal dialog (window.alert/window.confirm) and a blur handler that sets a timer (window.setTimeout):

Firefox 3.5.7 executes the &apos;onblur&apos; handler when the modal dialog appears.  The timer is set, but it does not fire until the time has elapsed _and_ the dialog is dismissed.  While the dialog is up, the input area does not appear to be focused (there is no blinking carrot or focus ring on OS X).  When the dialog is dismissed, the input area is focused and looks focused (blinking carrot, focus ring on OS X).

IE8 executes the &apos;onblur&apos; handler when the modal dialog appears.  The timer is set, but it does not start &apos;counting&apos; until the dialog is dismissed (so on this test page it does not fire until 5 seconds after the dialog is dismissed).  While the dialog is up, the input area doesn&apos;t visibly appear focused.

Safari 4.0.4 on Windows does not execute the &apos;onblur&apos; handler at all.  The input area does not appear visually focused while the modal dialog is up.  Once the dialog is dismissed, the input area still does not look visually focused and does not receive text input, but when the user clicks anywhere else on the page the &apos;blur&apos; event still fires at the &lt;input&gt;.  This seems really buggy.

Safari 4.0.4 on OS X does not execute the &apos;onblur&apos; handler at all.  The input area does not appear visually focused while the modal dialog is up.  Once the dialog is dismissed, the input area does look visually focused and does receive text input (unlike on Windows).

WebKit ToT executes the &apos;onblur&apos; handler while the dialog is up and fires the timer while the dialog is up.  It also crashes with an assertion failure in debug mode if the dialog is dismissed while the timer is still pending.

I do not think that website authors typically expect their code to execute while another piece of code is blocked on a modal dialog.  This patch brings behavior back to roughly the Safari 4.0.4 behavior.

Alternatively, we could still fire focus/blur events while modal dialogs are up but ensure that all timers created are created in the suspended state.  Then they would be resumed by the PageGroupLoadDeferrer when the dialog is dismissed.  This would be closer to the Firefox/IE8 behavior, which is still pretty odd IMHO.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184776</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-01-26 15:02:53 -0800</bug_when>
    <thetext>I think we have a blur of death bug on file as well.  I remember running into it while writing test cases for wave bugs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184777</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-01-26 15:03:24 -0800</bug_when>
    <thetext>Yes, bug 18315.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184786</commentid>
    <comment_count>5</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-01-26 15:17:49 -0800</bug_when>
    <thetext>Bug 18315 looks like exactly the same issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184799</commentid>
    <comment_count>6</comment_count>
      <attachid>47229</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-01-26 15:48:45 -0800</bug_when>
    <thetext>Comment on attachment 47229
Does not fire focus/blur events while a modal dialog is up

Makes sense to me.  Seems the code should have a comment next to it explaining why the if check is made.
And can we test this?  If we can&apos;t, we should explain why not in the ChagneLog.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>184963</commentid>
    <comment_count>7</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2010-01-26 23:27:41 -0800</bug_when>
    <thetext>I wonder if we can leverage showModalDialog somehow to test this.  window.alert() just logs text in the layout tests, but showModalDialog actually functions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185235</commentid>
    <comment_count>8</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-01-27 15:06:34 -0800</bug_when>
    <thetext>showModalDialog() support in DRT and test_shell seems really bad. It&apos;s off by
default in test_shell and can be enabled with a command-line flag, but the
nested loop for the opened windows does not spin down when window.close() is
invoked inside the popup so it&apos;s not very useful.  I couldn&apos;t get the dialog to
show at all using DRT - I suspect that this behavior is also behind some flag
or setting and may not be fully baked.

I&apos;ll upload another patch with explanatory comments in the code and ChangeLog
that Eric suggested, but I don&apos;t think a new test is entirely feasible here, as
sad as that is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185242</commentid>
    <comment_count>9</comment_count>
      <attachid>47567</attachid>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-01-27 15:22:09 -0800</bug_when>
    <thetext>Created attachment 47567
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185243</commentid>
    <comment_count>10</comment_count>
      <attachid>47567</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-01-27 15:25:25 -0800</bug_when>
    <thetext>Comment on attachment 47567
patch

Is it OK to never fire these events? Do we need to fire them after the modal dialog goes back down?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185244</commentid>
    <comment_count>11</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-01-27 15:31:37 -0800</bug_when>
    <thetext>The focused state is the same when the dialog is dismissed as it was when the dialog went up, so it doesn&apos;t make sense to fire any events at the page.  In particular, with the following snippet:

&lt;input id=&apos;i&apos;&gt;&lt;/input&gt;
&lt;script&gt;
var inElem = document.getElementById(&apos;i&apos;);
inElem.focus();
window.alert(&apos;hi&apos;);
&lt;/script&gt;

Once the alert is dismissed, the input area is still focused.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185254</commentid>
    <comment_count>12</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-01-27 15:47:14 -0800</bug_when>
    <thetext>FYI, html5 dictates the following:

window.alert(), window.pause(), and window.prompt() all require the user agent to &apos;pause&apos; which is defined at http://dev.w3.org/html5/spec/Overview.html#pause as:

Some of the algorithms in this specification, for historical reasons, require the user agent to pause while running a task until some condition has been met. While a user agent has a paused task, the corresponding event loop must not run further tasks, and any script in the currently running task must block. User agents should remain responsive to user input while paused, however, albeit in a reduced capacity since the event loop will not be doing anything.

window.showModalDialog() has a slightly different behavior in the spec:

Disable the user interface for all the browsing contexts in the list of background browsing contexts. This should prevent the user from navigating those browsing contexts, causing events to be sent to those browsing context, or editing any content in those browsing contexts. However, it does not prevent those browsing contexts from receiving events from sources other than the user, from running scripts, from running animations, and so forth.

http://dev.w3.org/html5/spec/Overview.html#dom-showmodaldialog

Both seem to prohibit firing any events at the page opening the dialog.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>186775</commentid>
    <comment_count>13</comment_count>
    <who name="Dmitry Titov">dimich</who>
    <bug_when>2010-02-01 20:08:22 -0800</bug_when>
    <thetext>It seems the question here is &quot;why only focus events need special treatment?&quot;

I was easily able to reproduce the ASSERT in timers by creating a timer from Worker&apos;s onmessage callback while showing alert() from the main page. So either we should define what happens when a timer is created while modal UI is up (fire it after modal UI is gone?), or we should &apos;pause&apos; the page showing modal UI in a more generic way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187136</commentid>
    <comment_count>14</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-02-02 14:09:42 -0800</bug_when>
    <thetext>I agree in principle, Dmitry.  Ideally we would not fire any events at a page behind a modal dialog.  However, it makes sense to change this in smaller, isolated changes just in case there&apos;s a web compat issue.  In particular special casing focus/blur makes sense in the short term for the following reasons:

- This case is causing ASSERT failures on a very popular webpage (gmail).  I don&apos;t know of any popular sites that trigger ASSERT failures on other events (like onmessage).
- The blur event always fires when a modal dialog is opened up since the modal dialog will gain focus.  This makes it much more likely to trigger bugs than things like onmessage which are racy.
- The behavior in this patch matches a released browser (Safari 4.0.4), which reduces the change of introducing new compat bugs.

Also this patch is quite tiny and doesn&apos;t touch anything as sensitive as the core event handling logic.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187157</commentid>
    <comment_count>15</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-02-02 14:34:13 -0800</bug_when>
    <thetext>&gt; Ideally we would not fire any events at a page behind a modal dialog.

Note that Firefox will fire an image onload event behind a modal dialog when the image load finishes. I&apos;m not sure it&apos;s a bad thing - the concept of modality is about user input, not about something that happens programmatically.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187546</commentid>
    <comment_count>16</comment_count>
    <who name="Dmitry Titov">dimich</who>
    <bug_when>2010-02-03 16:30:07 -0800</bug_when>
    <thetext>After some looking around I think the ASSERT in timer code is a red herring here. Firing events on a page that is already in a modal UI means more JS reentrancy. Very few JS developers are prepared to handle reentrancy, that&apos;s a good reason to &apos;freeze&apos; the page behind the modal UI. It seems the good analogy is Cocoa NSApplication&apos;s runModalForWindow - it stops all events (including timers) on other windows.

One reason why innocently-looking JS can easily shoot itself in the foot in presence of JS reentrancy is bug 18315 which pop ups alerts on top of each other and prevents the page from being closed (in ToT). That bug will be fixed with the proposed patch too.

If FF loads images and fires load events behind the modal UI, then they probably have some code in place to deal with an HTTP Auth or &quot;bad cert&quot; dialogs that may pop up while loading images, or perhaps there is some way to &apos;defer&apos; another alert() that JS code in the event handler may want to pop up. This can be done but it adds complexity and additional code and queues, etc. For example, the network layer of the embedder may continue to pull the bits off the network while events may be deferred (or blocked on the attempt to nest another modal UI, which seems to require more support). This behavior likely needs case-by-case consideration.

Since in modal UI case the focus remains on the same element after modal UI is dismissed, I can see a reason not to fire focus events at all in this scenario (no &apos;blur&apos; and no &apos;focus&apos;). As James noted, the risk of compat issue is  mitigated by the fact that shipping Safari does not fire those.

It might be deemed necessary to prevent/defer other sources of events (worker.onmessage for example) from being dispatched while modal UI is up, or deal with effects of those in some other way, but it likely would require separate patches anyways.

So I&apos;m negating my previous remark, and think the patch is reasonable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>188781</commentid>
    <comment_count>17</comment_count>
      <attachid>47229</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-02-08 15:11:37 -0800</bug_when>
    <thetext>Comment on attachment 47229
Does not fire focus/blur events while a modal dialog is up

Cleared Eric Seidel&apos;s review+ from obsolete attachment 47229 so that this bug does not appear in http://webkit.org/pending-commit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189155</commentid>
    <comment_count>18</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2010-02-09 15:00:40 -0800</bug_when>
    <thetext>(In reply to comment #15)
&gt; &gt; Ideally we would not fire any events at a page behind a modal dialog.
&gt; 
&gt; Note that Firefox will fire an image onload event behind a modal dialog when
&gt; the image load finishes. I&apos;m not sure it&apos;s a bad thing - the concept of
&gt; modality is about user input, not about something that happens
&gt; programmatically.

I believe that&apos;s a bug in Firefox.  JavaScript is supposed to run to completion without any interleaving threads.  If events fire during a JavaScript call, then that single threaded, run to completion rule is violated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>189183</commentid>
    <comment_count>19</comment_count>
    <who name="Dmitry Titov">dimich</who>
    <bug_when>2010-02-09 17:41:16 -0800</bug_when>
    <thetext>It can be a good idea to try to find what changed this behavior, since by fixing it we might &apos;revert&apos; some effects of that change.

Also, this really needs a test. This &apos;regressed&apos; relative to Safari 4.0.4 because there is no tests for the modal UI. Without a test, it can be broken again the next day.

Currently DRT does not implement [UIDelegate webViewRunModal]. Interestingly, custom property getter for DOMWindow even hides the showModalDialog() if that method is not implemented...

Perhaps simply by implementing this method we could test modal behavior using showModalDialog()? Even one port&apos;s DRT is way better then nothing, since this is platform-independent code. It can be a separate patch - or perhaps combined, considering this is a 1-line fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>192711</commentid>
    <comment_count>20</comment_count>
      <attachid>49249</attachid>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-02-22 17:11:48 -0800</bug_when>
    <thetext>Created attachment 49249
patch with manual tests

This patch adds manual tests to WebCore/manual-tests/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>192727</commentid>
    <comment_count>21</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-02-22 17:45:29 -0800</bug_when>
    <thetext>The behavior changed from Safari 4.0.4 at http://trac.webkit.org/changeset/48257 which was a fix to bug https://bugs.webkit.org/show_bug.cgi?id=27105 &quot;Blur and focus events are not fired when window is blurred and focused&quot;.  This makes sense, the modal dialog was causing the window to get blurred/focused.  However the blurred/focused window still shouldn&apos;t fire blur/focus events if it is hidden behind a modal dialog.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193256</commentid>
    <comment_count>22</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-02-23 23:03:11 -0800</bug_when>
    <thetext>Hey everyone,
Is there consensus on this patch?  I think most of the concerns have been addressed (there is a test, we know when the behavior changed, the new behavior is in line with the spec and Safari 4).

The current behavior is pretty unfortunate.  A coworker reported that he couldn&apos;t use a WebKit browser with debug assertions enabled without having the check fail extremely rapidly on gmail or google calendar.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193414</commentid>
    <comment_count>23</comment_count>
      <attachid>49249</attachid>
    <who name="Dmitry Titov">dimich</who>
    <bug_when>2010-02-24 10:50:19 -0800</bug_when>
    <thetext>Comment on attachment 49249
patch with manual tests

Looking at the patch that regressed this, it looks very reasonable. r=me.

It&apos;s ok to add manual test for now but please create a bug for DRT to support testing modal dialogs and consider to investigate implementation!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193427</commentid>
    <comment_count>24</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-02-24 11:14:23 -0800</bug_when>
    <thetext>Filed https://bugs.webkit.org/show_bug.cgi?id=35350 to improve DRT.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>193544</commentid>
    <comment_count>25</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2010-02-24 15:18:15 -0800</bug_when>
    <thetext>Committed r55205: &lt;http://trac.webkit.org/changeset/55205&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>47227</attachid>
            <date>2010-01-22 14:27:11 -0800</date>
            <delta_ts>2010-01-22 14:27:11 -0800</delta_ts>
            <desc>Testcase using window.alert</desc>
            <filename>alert_timeout.html</filename>
            <type>text/html</type>
            <size>445</size>
            <attacher name="James Robinson">jamesr</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+DQo8ZGl2IGlkPSdsb2cnPjwvZGl2Pg0KPGlucHV0IHR5cGU9J3RleHQn
IGlkPSdmb28nPmxhbGFsYTwvaW5wdXQ+DQo8c2NyaXB0Pg0KZnVuY3Rpb24gJChzKSB7cmV0dXJu
IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHMpO30NCmZ1bmN0aW9uIGwocykgeyAkKCdsb2cnKS5p
bm5lckhUTUwgKz0gIjxicj4iICsgczsgfQ0KDQokKCdmb28nKS5vbm1vdXNldXAgPSBmdW5jdGlv
bigpIHsNCiAgbCgnbW91c2V1cCwgYWJvdXQgdG8gYWxlcnQnKTsNCiAgd2luZG93LmFsZXJ0KCJo
aSIpOw0KICBsKCdtb3VzZXVwLCBkaWQgYWxlcnQnKTsNCn0NCiQoJ2ZvbycpLm9uYmx1ciA9IGZ1
bmN0aW9uKCkgew0KICBsKCdibHVyJyk7DQogIHdpbmRvdy5zZXRUaW1lb3V0KGZ1bmN0aW9uKCkg
e2woJ3RpbWVyIGZpcmVkJyk7fSwgNTAwMCk7DQp9Ow0KPC9zY3JpcHQ+DQoNCg==
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>47229</attachid>
            <date>2010-01-22 14:45:48 -0800</date>
            <delta_ts>2010-02-08 15:11:36 -0800</delta_ts>
            <desc>Does not fire focus/blur events while a modal dialog is up</desc>
            <filename>blur_patch.diff</filename>
            <type>text/plain</type>
            <size>1541</size>
            <attacher name="James Robinson">jamesr</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9D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m9jdXNlZCk6CisKIDIwMTAtMDEtMjEg
IEFsZXhleSBQcm9za3VyeWFrb3YgIDxhcEBhcHBsZS5jb20+CiAKICAgICAgICAgUmV2aWV3ZWQg
YnkgRGFyaW4gQWRsZXIuCmRpZmYgLS1naXQgYS9XZWJDb3JlL3BhZ2UvRm9jdXNDb250cm9sbGVy
LmNwcCBiL1dlYkNvcmUvcGFnZS9Gb2N1c0NvbnRyb2xsZXIuY3BwCmluZGV4IDVlNzhjN2QuLjUy
OGM5ODYgMTAwNjQ0Ci0tLSBhL1dlYkNvcmUvcGFnZS9Gb2N1c0NvbnRyb2xsZXIuY3BwCisrKyBi
L1dlYkNvcmUvcGFnZS9Gb2N1c0NvbnRyb2xsZXIuY3BwCkBAIC0xMTMsNyArMTEzLDggQEAgdm9p
ZCBGb2N1c0NvbnRyb2xsZXI6OnNldEZvY3VzZWQoYm9vbCBmb2N1c2VkKQogICAgIAogICAgIGlm
IChtX2ZvY3VzZWRGcmFtZSAmJiBtX2ZvY3VzZWRGcmFtZS0+dmlldygpKSB7CiAgICAgICAgIG1f
Zm9jdXNlZEZyYW1lLT5zZWxlY3Rpb24oKS0+c2V0Rm9jdXNlZChmb2N1c2VkKTsKLSAgICAgICAg
ZGlzcGF0Y2hFdmVudHNPbldpbmRvd0FuZEZvY3VzZWROb2RlKG1fZm9jdXNlZEZyYW1lLT5kb2N1
bWVudCgpLCBmb2N1c2VkKTsKKyAgICAgICAgaWYgKCFtX2ZvY3VzZWRGcmFtZS0+cGFnZSgpLT5k
ZWZlcnNMb2FkaW5nKCkpCisgICAgICAgICAgICBkaXNwYXRjaEV2ZW50c09uV2luZG93QW5kRm9j
dXNlZE5vZGUobV9mb2N1c2VkRnJhbWUtPmRvY3VtZW50KCksIGZvY3VzZWQpOwogICAgIH0KIH0K
IAo=
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>47567</attachid>
            <date>2010-01-27 15:22:09 -0800</date>
            <delta_ts>2010-02-22 17:11:48 -0800</delta_ts>
            <desc>patch</desc>
            <filename>b_33962.diff</filename>
            <type>text/plain</type>
            <size>1724</size>
            <attacher name="James Robinson">jamesr</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
NTNkZmQ1MC4uMTFjNjgwMSAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwyMCBAQAorMjAxMC0wMS0yMiAgSmFtZXMgUm9iaW5z
b24gIDxqYW1lc3JAY2hyb21pdW0ub3JnPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAo
T09QUyEpLgorCisgICAgICAgIERvIG5vdCBmaXJlIGZvY3VzIGV2ZW50cyB3aGlsZSBhIG1vZGFs
IGRpYWxvZyBpcyB1cC4KKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcu
Y2dpP2lkPTMzOTYyCisKKyAgICAgICAgTW9kaWZpZXMgdGhlIEZvY3VzQ29udHJvbGxlciB0byBj
aGVjayB0aGUgZnJhbWUncyBwYWdlJ3MgZGVmZXJzTG9hZGluZygpIGZsYWcgYmVmb3JlIGZpcmlu
ZyBibHVyL2ZvY3VzIGV2ZW50cy4KKyAgICAgICAgVGhpcyBmbGFnIGlzIHNldCB3aGlsZSBhIG1v
ZGFsIGRpYWxvZyAobGlrZSBhIHdpbmRvdy5hbGVydCBvciB3aW5kb3cuY29uZmlybSkgaXMgdXAu
ICBGaXJpbmcgdGhlIGV2ZW50cyBjYXVzZXMKKyAgICAgICAgYXNzZXJ0aW9uIGZhaWx1cmVzLCBz
aW5jZSB3aGVuIHRoZSBkaWFsb2cgaXMgZGlzbWlzc2VkIHRoZSBQYWdlR3JvdXBMb2FkRGVmZXJy
ZXIgYXNzdW1lcyB0a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50cyB3aGlsZSBtb2RhbCBkaWFsb2dzIGFyZSB1cC4gIFNlZSBodHRwczovL2J1Z3Mud2Vi
a2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MzM5NjIKKyAgICAgICAgaWYgKCFtX2ZvY3VzZWRGcmFt
ZS0+cGFnZSgpLT5kZWZlcnNMb2FkaW5nKCkpCisgICAgICAgICAgICBkaXNwYXRjaEV2ZW50c09u
V2luZG93QW5kRm9jdXNlZE5vZGUobV9mb2N1c2VkRnJhbWUtPmRvY3VtZW50KCksIGZvY3VzZWQp
OwogICAgIH0KIH0KIAo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>49249</attachid>
            <date>2010-02-22 17:11:48 -0800</date>
            <delta_ts>2010-02-24 10:50:18 -0800</delta_ts>
            <desc>patch with manual tests</desc>
            <filename>b_33962_2.diff</filename>
            <type>text/plain</type>
            <size>3343</size>
            <attacher name="James Robinson">jamesr</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
OWFiOTFiOS4uM2M0ZDBjMiAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwyMSBAQAorMjAxMC0wMi0yMiAgSmFtZXMgUm9iaW5z
b24gIDxqYW1lc3JAY2hyb21pdW0ub3JnPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAo
T09QUyEpLgorCisgICAgICAgIERvIG5vdCBmaXJlIGZvY3VzIGV2ZW50cyB3aGlsZSBhIG1vZGFs
IGRpYWxvZyBpcyB1cC4KKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcu
Y2dpP2lkPTMzOTYyCisKKyAgICAgICAgTW9kaWZpZXMgdGhlIEZvY3Vz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BkaXNwYXRjaCBibHVyIG9uIGl0IGJlZm9yZSB3ZSBibHVyIHRoZSB3
aW5kb3cuCiAgICAgLy8gSWYgd2UgaGF2ZSBhIGZvY3VzZWQgbm9kZSB3ZSBzaG91bGQgZGlzcGF0
Y2ggZm9jdXMgb24gaXQgYWZ0ZXIgd2UgZm9jdXMgdGhlIHdpbmRvdy4KICAgICAvLyBodHRwczov
L2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MjcxMDUKKyAgCisgICAgLy8gRG8gbm90
IGZpcmUgZXZlbnRzIHdoaWxlIG1vZGFsIGRpYWxvZ3MgYXJlIHVwLiAgU2VlIGh0dHBzOi8vYnVn
cy53ZWJraXQub3JnL3Nob3dfYnVnLmNnaT9pZD0zMzk2MgorICAgIGlmIChkb2N1bWVudC0+cGFn
ZSgpLT5kZWZlcnNMb2FkaW5nKCkpCisgICAgICAgIHJldHVybjsKICAgICBpZiAoIWZvY3VzZWQg
JiYgZG9jdW1lbnQtPmZvY3VzZWROb2RlKCkpCiAgICAgICAgIGRvY3VtZW50LT5mb2N1c2VkTm9k
ZSgpLT5kaXNwYXRjaEJsdXJFdmVudCgpOwogICAgIGRvY3VtZW50LT5kaXNwYXRjaFdpbmRvd0V2
ZW50KEV2ZW50OjpjcmVhdGUoZm9jdXNlZCA/IGV2ZW50TmFtZXMoKS5mb2N1c0V2ZW50IDogZXZl
bnROYW1lcygpLmJsdXJFdmVudCwgZmFsc2UsIGZhbHNlKSk7Cg==
</data>
<flag name="review"
          id="32059"
          type_id="1"
          status="+"
          setter="dimich"
    />
          </attachment>
      

    </bug>

</bugzilla>