<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>11129</bug_id>
          
          <creation_ts>2010-10-23 00:00:29 +0000</creation_ts>
          <short_desc>Remove forminput, formchange and related dispatch methods</short_desc>
          <delta_ts>2011-08-04 05:06:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</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="Erik Arvidsson">erik.arvidsson</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>amwebdk</cc>
    
    <cc>annevk</cc>
    
    <cc>ayg</cc>
    
    <cc>bugs</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>mounir</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robertc</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>41706</commentid>
    <comment_count>0</comment_count>
    <who name="Erik Arvidsson">erik.arvidsson</who>
    <bug_when>2010-10-23 00:00:29 +0000</bug_when>
    <thetext>For context see the following thread

http://www.w3.org/2002/02/mid/AANLkTinkgDsyOgWS=UaMdvF8_H9KRz_cwZM7_DXxbhPr@mail.gmail.com;list=public-webapps</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42743</commentid>
    <comment_count>1</comment_count>
    <who name="Rob Crowther">robertc</who>
    <bug_when>2010-11-24 02:59:26 +0000</bug_when>
    <thetext>I&apos;m not sure I get the &apos;increasing the size of the API&apos; argument, can someone expand on it?

To pick a some examples for comparison: Is it worth increasing the size of the API to have valueAsNumber or valueAsDate when both can be easily worked around by the developer if required?  Is it worth adding an output element when we could just have a span and use innerHTML?

Why is this case less worthy than either of those two examples?

I like that an onforminput attribute can be added to the output element.  Even if that isn&apos;t really best practice it&apos;s simple for beginners to grasp, and it keeps all the logic for each output element in one place (and makes the output element much easier to explain).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43726</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-01-01 06:10:57 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: Since you can&apos;t register capturing handlers declaratively, and since form controls can be all over the place in the DOM now, I think &apos;forminput&apos; and &apos;formchange&apos; are still very helpful and have clear use cases. As as straightforward demonstration of this, try to rewrite the examples in the spec that use these features to do them without onforminput/onformchange and see whether it&apos;s still as simple.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44650</commentid>
    <comment_count>3</comment_count>
      <attachid>945</attachid>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-01-24 12:45:02 +0000</bug_when>
    <thetext>Created attachment 945
testcase without forminput or formchange

I found 3 examples in the spec and all those can be trivially
handled without these additional events.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44651</commentid>
    <comment_count>4</comment_count>
      <attachid>946</attachid>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-01-24 12:49:40 +0000</bug_when>
    <thetext>Created attachment 946
testcase

Oops, I left some unrelated alert() in the previous file.
(I was just testing form element&apos;s scoping there..)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44652</commentid>
    <comment_count>5</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2011-01-24 12:52:47 +0000</bug_when>
    <thetext>I&apos;m reopening the bug because, like Olli, I do think forminput and formchange are not needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44653</commentid>
    <comment_count>6</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-01-24 13:07:05 +0000</bug_when>
    <thetext>One problem with forminput/formchange -like broadcasting events is that
what should happen when one of the targets is moved to another form
or even another document when some other target for the events is
handling the event. Well, perhaps nothing special shouldn&apos;t happen,
but it would be rather strange to get forminput when the element is in a
form which has never been used yet.

In fact, that sort of breaks the algorithm&apos;s step 3
&quot;For each element in controls, in tree order, fire a simple event named event
name at the element.&quot;
Depending on how you read that, tree order should be checked either just
once before firing any events, or before each event.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44656</commentid>
    <comment_count>7</comment_count>
    <who name="Rob Crowther">robertc</who>
    <bug_when>2011-01-24 14:38:10 +0000</bug_when>
    <thetext>&gt; all those can be trivially handled without these additional events

What does your definition of &apos;trivially handled&apos; encompass?  Here&apos;s the amount of JavaScript required in the spec examples purely in terms of character counts (not including spaces):

calculator: 67 characters
password validity: 37 characters
car price: 15 characters

Plus, slightly more meta, understanding of event bubbling required: false.

With your examples:

calculator: 200 characters
password validity: 185 characters
car price: 116 characters

Understanding event bubbling required: true.

I don&apos;t agree that you can so easily characterize a minimum of 300% more code and the requirement to understand event bubbling as trivial.

&gt; I do think forminput and formchange are not needed

As I previously asked, why is this not needed, but valueAsNumber is?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44658</commentid>
    <comment_count>8</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-01-24 15:10:00 +0000</bug_when>
    <thetext>(In reply to comment #7) 
You count things strangely. For example in the original car example there is
over 350 characters javascript.


&gt; Understanding event bubbling required: true.
?
I just happened to use addEventListener on document element using
bubble phase. That is not the point.

 
&gt; As I previously asked, why is this not needed, but valueAsNumber is?
This bug is not about valueAsNumber.
I&apos;m personally not at all sure why that is needed.
parseFloat(value) and valueAsNumber are not that different.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44659</commentid>
    <comment_count>9</comment_count>
      <attachid>947</attachid>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2011-01-24 15:11:11 +0000</bug_when>
    <thetext>Created attachment 947
testcase 2

With this file, there should be no overhead...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44743</commentid>
    <comment_count>10</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-01-26 10:16:54 +0000</bug_when>
    <thetext>I think we should keep these events and the dispatch APIs. They&apos;re exist for convenience, and they are convenient. They&apos;re hardly an implementation burden. (Event handler attributes in general are also for convenience but are redundant with addEventListener.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44744</commentid>
    <comment_count>11</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-01-26 11:23:00 +0000</bug_when>
    <thetext>But what is the use case for the events and the related methods?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44745</commentid>
    <comment_count>12</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-01-26 11:23:37 +0000</bug_when>
    <thetext>I mean use case which can&apos;t be trivially done with the existing events.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44746</commentid>
    <comment_count>13</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-01-26 12:21:56 +0000</bug_when>
    <thetext>Use case is updating something when one out of many form controls are changed, using just one declarative event listener. Use case for dispatching the event is causing that event listener to run after some script has changed stuff, maybe initially when loading the page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44751</commentid>
    <comment_count>14</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-01-26 13:21:19 +0000</bug_when>
    <thetext>Those are not really a use cases, but descriptions how one could
use the events and methods ;)
Also, why couldn&apos;t scripts use the existing events for the first case?
And for the latter one there could be just a javascript function to call.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44778</commentid>
    <comment_count>15</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-01-26 21:41:21 +0000</bug_when>
    <thetext>(In reply to comment #14)
&gt; Those are not really a use cases, but descriptions how one could
&gt; use the events and methods ;)

Consider a shopping cart where the customer can select the quantity of each item and the page updates the total amount on the fly. The author generates the shopping cart with PHP but doesn&apos;t know enough about javascript and DOM Events to be confident about how to walk the tree or use capturing event listeners (or even that they exist), so instead outputs the calculation script in the onforminput=&quot;&quot; attribute with PHP since he already has implemented the logic to output the actual shopping cart itself with PHP. The end result might be something like:

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/804

&gt; Also, why couldn&apos;t scripts use the existing events for the first case?

You need a capturing event listener for that, which is not available as markup and many authors who know enough to use event handler attributes don&apos;t know that capturing event listeners exist or how they work.

&gt; And for the latter one there could be just a javascript function to call.

If you have several event handler content attributes you would need to call all of them. It&apos;s more convenient to dispatch an event.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44789</commentid>
    <comment_count>16</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-01-27 09:39:26 +0000</bug_when>
    <thetext>(In reply to comment #15)
&gt; http://software.hixie.ch/utilities/js/live-dom-viewer/saved/804
So that could be written close the way the example 1 or 3 in 
http://www.w3.org/Bugs/Public/attachment.cgi?id=947


&gt; 
&gt; You need a capturing event listener for that, which is not available as markup
&gt; and many authors who know enough to use event handler attributes don&apos;t know
&gt; that capturing event listeners exist or how they work.
And why exactly do you need capturing event listeners?


&gt; If you have several event handler content attributes you would need to call all
&gt; of them. It&apos;s more convenient to dispatch an event.
So why would it be more convenient to split the code to several
forminput/change event handlers than just have one function?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44790</commentid>
    <comment_count>17</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-01-27 10:09:49 +0000</bug_when>
    <thetext>(In reply to comment #16)
&gt; (In reply to comment #15)
&gt; &gt; http://software.hixie.ch/utilities/js/live-dom-viewer/saved/804
&gt; So that could be written close the way the example 1 or 3 in 
&gt; http://www.w3.org/Bugs/Public/attachment.cgi?id=947

Ah. I assumed that change and input didn&apos;t bubble. That makes my case weaker indeed.

&gt; &gt; You need a capturing event listener for that, which is not available as markup
&gt; &gt; and many authors who know enough to use event handler attributes don&apos;t know
&gt; &gt; that capturing event listeners exist or how they work.
&gt; And why exactly do you need capturing event listeners?

Since change and input bubble, I don&apos;t. I do need to name=&quot;&quot; my &lt;output&gt;s and put the logic further away from the &lt;output&gt;s, but that&apos;s not a big deal.

 
&gt; &gt; If you have several event handler content attributes you would need to call all
&gt; &gt; of them. It&apos;s more convenient to dispatch an event.
&gt; So why would it be more convenient to split the code to several
&gt; forminput/change event handlers than just have one function?

Each &lt;output&gt; updates its own value when something changes. Just a different coding style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44798</commentid>
    <comment_count>18</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2011-01-27 14:39:49 +0000</bug_when>
    <thetext>So, there is still one situation mentioned by Hixie in comment 2 that hasn&apos;t been discussed: when form controls are &quot;all over the place&quot;. I guess that means:
&lt;form id=&apos;f&apos;&gt;&lt;/form&gt;
&lt;input form=&apos;f&apos; name=&apos;a&apos;&gt;
&lt;input form=&apos;f&apos; name=&apos;b&apos;&gt;
&lt;output form=&apos;f&apos; onforminput=&quot;value=parseFloat(a.value)+parseFloat(b.value);&quot;&gt;

In that case we can&apos;t indeed use the capture or bubbling phases of the input and change events but I think there is no reason to care too much about this case given that I guess the real use cases to have form controls not descendants of their form owners is when they are very far away in the tree and I would guess that should not happen when you want to have an interaction between form controls.

At worst, it&apos;s always possible to do it but it would be more painful:
&lt;form id=&apos;f&apos;&gt;&lt;/form&gt;
&lt;input form=&apos;f&apos; name=&apos;a&apos; oninput=&quot;updateOutput();&quot;&gt;
&lt;input form=&apos;f&apos; name=&apos;b&apos; oninput=&quot;updateOutput();&quot;&gt;
&lt;output form=&apos;f&apos; name=&apos;o&apos;&gt;
&lt;script&gt;
  function updateOutput(aForm) {
    aForm.o.value = parseFloat(aForm.a.value) + parseFloat(aForm.b.value);
  }
&lt;/script&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44799</commentid>
    <comment_count>19</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-01-27 14:52:16 +0000</bug_when>
    <thetext>(In reply to comment #18)
 
&gt; In that case we can&apos;t indeed use the capture or bubbling phases of the input
&gt; and change events 
?

Just add event listener using addEventListener or oninput / onchange to 
document or root element or somewhere and there just check
if event.target.form is the form you&apos;re interested in.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44801</commentid>
    <comment_count>20</comment_count>
    <who name="Mounir Lamouri">mounir</who>
    <bug_when>2011-01-27 15:05:33 +0000</bug_when>
    <thetext>(In reply to comment #19)
&gt; (In reply to comment #18)
&gt; 
&gt; &gt; In that case we can&apos;t indeed use the capture or bubbling phases of the input
&gt; &gt; and change events 
&gt; ?
&gt; 
&gt; Just add event listener using addEventListener or oninput / onchange to 
&gt; document or root element or somewhere and there just check
&gt; if event.target.form is the form you&apos;re interested in.

I would personally prefer oninput on the form controls but both solutions work.
I didn&apos;t want to say that there is no solution. I just wanted to make sure all points from comment 2 have been addressed ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46236</commentid>
    <comment_count>21</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-03-03 23:21:31 +0000</bug_when>
    <thetext>Hmm, the bubbling nature of these events combined with the change to put the event handlers on every element does make the case for this feature rather weaker. (They were added before we had changed the latter.)

EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter&apos;s comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46237</commentid>
    <comment_count>22</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-03-03 23:22:28 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r5928.
Check-in comment: Drop forminput and formchange events, and their associated machinery, since you can now put oninput and onchange everywhere which makes them far less compelling.
http://html5.org/tools/web-apps-tracker?from=5927&amp;to=5928</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53056</commentid>
    <comment_count>23</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:06:17 +0000</bug_when>
    <thetext>mass-moved component to LC1</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>945</attachid>
            <date>2011-01-24 12:45:02 +0000</date>
            <delta_ts>2011-01-24 12:49:40 +0000</delta_ts>
            <desc>testcase without forminput or formchange</desc>
            <filename>formoutput.html</filename>
            <type>text/html</type>
            <size>2665</size>
            <attacher name="Olli Pettay">bugs</attacher>
            
              <data encoding="base64">PGRpdj4KICA8aDM+RXhhbXBsZSAxLCBjYWxjdWxhdG9yICAobm8gbmVlZCBmb3IgZm9ybWlucHV0
KTwvaDM+CgogIDxmb3JtIG5hbWU9ImYxIj4KICAgIDxzY3JpcHQ+CiAgICAgIGRvY3V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GUudGFyZ2V0LmZv
cm0pCiAgICAgICAgICAgICBjYWxjdWxhdGUoZS50YXJnZXQuZm9ybSk7CiAgICAgICAgIH0sIHRy
dWUpOwogICAgICAgCiAgPC9zY3JpcHQ+CiAgPC9mb3JtPgoKPC9kaXY+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>946</attachid>
            <date>2011-01-24 12:49:40 +0000</date>
            <delta_ts>2011-01-24 12:49:40 +0000</delta_ts>
            <desc>testcase</desc>
            <filename>formoutput.html</filename>
            <type>text/html</type>
            <size>2650</size>
            <attacher name="Olli Pettay">bugs</attacher>
            
              <data encoding="base64">PGRpdj4KICA8aDM+RXhhbXBsZSAxLCBjYWxjdWxhdG9yICAobm8gbmVlZCBmb3IgZm9ybWlucHV0
KTwvaDM+CgogIDxmb3JtIG5hbWU9ImYxIj4KICAgIDxzY3JpcHQ+CiAgICAgIGRvY3VtZW50LmFk
ZEV2ZW50TGlzdGVuZXIoImlucHV0IiwKICAgICAgICBmdW5jdGlvbihlKSB7CiAgICAgICAgICBp
ZiAoZG9jdW1lbnQuZm9ybXMuZjEgPT0gZS50YXJnZXQuZm9ybSkKICAgICAgICAgICAgZS50YXJn
ZXQuZm9ybS5vdXRwdXQudmFsdWUgPQogICAgICAgICAgICAgIHBhcnNlRmxvYXQoZS50YXJnZXQu
Zm9ybS5hLnZhbHVlKSArIHBhcnNlRmxvYXQoZS50YXJnZXQuZm9ybS5iLnZhbHVlKTsKICAgICAg
ICB9LCB0cnVlKTsKICAgIDwvc2NyaXB0PgogICAgPGlucHV0IG5hbWU9ImEiPgogICAgPGlucHV0
IG5hbWU9ImIiPgogICAgPG91dHB1dCBuYW1lPSJvdXRwdXQiPgogIDwvZm9ybT4KCjwvZGl2PgoK
CjxkaXY+CiAgPGgzPkV4YW1wbGUgMiwgcGFzc3dvcmQgdmFsaWRpdHkgKG5vIG5lZWQgZm9yIGZv
cm1pbnB1dCk8L2gyPgoKICA8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sZW1lbnRz
LnJhZGlvLmNoZWNrZWQpCiAgICAgICAgICAgcHJpY2UgKz0gMjUwMDsKICAgICAgICAgaWYgKGZv
cm0uZWxlbWVudHMudHVyYm8uY2hlY2tlZCkKICAgICAgICAgICBwcmljZSArPSA1MDAwOwogICAg
ICAgICBpZiAoZm9ybS5lbGVtZW50cy5zdGlja2VyLmNoZWNrZWQpCiAgICAgICAgICAgcHJpY2Ug
Kz0gMjUwOwogICAgICAgICBmb3JtLmVsZW1lbnRzLnJlc3VsdC52YWx1ZSA9IHByaWNlOwogICAg
ICAgfQogICAgICAgY2FsY3VsYXRlKGRvY3VtZW50LmZvcm1zLmYzKTsKCiAgICAgICBkb2N1bWVu
dC5hZGRFdmVudExpc3RlbmVyKCJjaGFuZ2UiLAogICAgICAgICBmdW5jdGlvbihlKSB7CiAgICAg
ICAgICAgaWYgKGRvY3VtZW50LmZvcm1zLmYzID09IGUudGFyZ2V0LmZvcm0pCiAgICAgICAgICAg
ICBjYWxjdWxhdGUoZS50YXJnZXQuZm9ybSk7CiAgICAgICAgIH0sIHRydWUpOwogICAgICAgCiAg
PC9zY3JpcHQ+CiAgPC9mb3JtPgoKPC9kaXY+Cg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>947</attachid>
            <date>2011-01-24 15:11:11 +0000</date>
            <delta_ts>2011-01-24 15:11:11 +0000</delta_ts>
            <desc>testcase 2</desc>
            <filename>formoutput.html</filename>
            <type>text/html</type>
            <size>2028</size>
            <attacher name="Mounir Lamouri">mounir</attacher>
            
              <data encoding="base64">PGRpdj4KICA8aDM+RXhhbXBsZSAxLCBjYWxjdWxhdG9yICAobm8gbmVlZCBmb3IgZm9ybWlucHV0
KTwvaDM+CgogIDxmb3JtIG5hbWU9ImYxIiBvbmlucHV0PSJvdXRwdXQudmFsdWUgPSBwYXJzZUZs
b2F0KGEudmFsdWUpICsgcGFyc2VGbG9hdChiLnZhbHVlKTsiPgogICAgPGlucH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UgKz0gMjUw
MDsKICAgICAgICAgaWYgKGZvcm0uZWxlbWVudHMudHVyYm8uY2hlY2tlZCkKICAgICAgICAgICBw
cmljZSArPSA1MDAwOwogICAgICAgICBpZiAoZm9ybS5lbGVtZW50cy5zdGlja2VyLmNoZWNrZWQp
CiAgICAgICAgICAgcHJpY2UgKz0gMjUwOwogICAgICAgICBmb3JtLmVsZW1lbnRzLnJlc3VsdC52
YWx1ZSA9IHByaWNlOwogICAgICAgfQogICAgICAgY2FsY3VsYXRlKGRvY3VtZW50LmZvcm1zLmYz
KTsKICA8L3NjcmlwdD4KICA8L2Zvcm0+Cgo8L2Rpdj4K
</data>

          </attachment>
      

    </bug>

</bugzilla>