<?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>82644</bug_id>
          
          <creation_ts>2012-03-29 12:48:39 -0700</creation_ts>
          <short_desc>InputType attribute changed functions should happen after the attribute change</short_desc>
          <delta_ts>2012-03-29 15:33:01 -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>Forms</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>joepeck</cc>
    
    <cc>tkent</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>591457</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2012-03-29 12:48:39 -0700</bug_when>
    <thetext>InputType::disabledAttributeChanged and InputType::readonlyAttributeChanged should happen
after the attribute has actually changed. This way if the InputType looks at the state, it would
correctly get the new value, not the old value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>591461</commentid>
    <comment_count>1</comment_count>
      <attachid>134649</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2012-03-29 12:52:10 -0700</bug_when>
    <thetext>Created attachment 134649
[PATCH] Proposed Fix

Saw this while looking at:
&lt;http://webkit.org/b/82558&gt; Toggling &lt;input type=&quot;range&quot;&gt; readonly or disabled state while active breaks all click events

It doesn&apos;t really make sense to call the changed function until the value has actually changed!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>591477</commentid>
    <comment_count>2</comment_count>
      <attachid>134649</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-03-29 13:13:06 -0700</bug_when>
    <thetext>Comment on attachment 134649
[PATCH] Proposed Fix

OK.  How do we observe this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>591509</commentid>
    <comment_count>3</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2012-03-29 13:39:28 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 134649 [details])
&gt; OK.  How do we observe this?

This doesn&apos;t change any existing behavior. The only user of these InputType functions
doesn&apos;t turn around and change the readonly / disabled state of the input. But if
someone wanted to do that than this ordering would matter. I had a patch that used
these functions and this confused me. To fix the problem we did not go with that
patch, but I still wanted to fix this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>591513</commentid>
    <comment_count>4</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2012-03-29 13:40:30 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; (From update of attachment 134649 [details] [details])
&gt; &gt; OK.  How do we observe this?
&gt; 
&gt; The only user of these InputType functions doesn&apos;t turn around and
&gt; change the readonly / disabled state of the input.

I typo&apos;d. This should have said, &quot;.. doesn&apos;t turn around and check the state...&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>591535</commentid>
    <comment_count>5</comment_count>
      <attachid>134649</attachid>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2012-03-29 14:04:03 -0700</bug_when>
    <thetext>Comment on attachment 134649
[PATCH] Proposed Fix

This looks correct to me.
I see why you cannot test this, no InputType rely on the attribute value in response to disabledAttributeChanged() or readonlyAttributeChanged().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>591645</commentid>
    <comment_count>6</comment_count>
      <attachid>134649</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-03-29 15:32:57 -0700</bug_when>
    <thetext>Comment on attachment 134649
[PATCH] Proposed Fix

Clearing flags on attachment: 134649

Committed r112589: &lt;http://trac.webkit.org/changeset/112589&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>591646</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-03-29 15:33:01 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>134649</attachid>
            <date>2012-03-29 12:52:10 -0700</date>
            <delta_ts>2012-03-29 15:32:57 -0700</delta_ts>
            <desc>[PATCH] Proposed Fix</desc>
            <filename>take-1.patch</filename>
            <type>text/plain</type>
            <size>1598</size>
            <attacher name="Joseph Pecoraro">joepeck</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCAzZGE5ZDFjLi41OWI3NDgyIDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29y
ZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTMg
QEAKKzIwMTItMDMtMjkgIEpvc2VwaCBQZWNvcmFybyAgPHBlY29yYXJvQGFwcGxlLmNvbT4KKwor
ICAgICAgICBJbnB1dFR5cGUgYXR0cmlidXRlIGNoYW5nZWQgZnVuY3Rpb25zIHNob3VsZCBoYXBw
ZW4gYWZ0ZXIgd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