<?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>39032</bug_id>
          
          <creation_ts>2010-05-12 15:59:09 -0700</creation_ts>
          <short_desc>Don&apos;t clear yellow autofill highlight until user edits value</short_desc>
          <delta_ts>2010-05-14 07:17:06 -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>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>P3</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jens Alfke">jens</reporter>
          <assigned_to name="Jens Alfke">jens</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>sullivan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>224965</commentid>
    <comment_count>0</comment_count>
    <who name="Jens Alfke">jens</who>
    <bug_when>2010-05-12 15:59:09 -0700</bug_when>
    <thetext>The &apos;autofilled&apos; flag (and yellow background highlight) on a text field gets cleared when the field is focused. This can have weird results — for example, if there&apos;s an onload handler on the page that focuses a particular field, then that field won&apos;t appear autofilled even though it was. Also, if password fields get autofilled (as Chrome does), then a form&apos;s fields turn yellow again as soon as you tab out, since the browser applies the autofill again.
This got reported against Chrome as: http://code.google.com/p/chromium/issues/detail?id=38386
The specific behaviors called out there apply to Chrome, but the autofill highlight is part of WebKit.

I propose that HTMLInputField be changed slightly so that the autofill flag isn&apos;t cleared until the field is actually changed by the user, not just tabbed through. This seems more consistent in that the highlight then applies to the _contents_ of the field, showing that it&apos;s still a value supplied automatically by the browser and not hand-typed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>224979</commentid>
    <comment_count>1</comment_count>
      <attachid>55912</attachid>
    <who name="Jens Alfke">jens</who>
    <bug_when>2010-05-12 16:52:43 -0700</bug_when>
    <thetext>Created attachment 55912
patch

FYI, I asked about this change on webkit-dev, and John Sullivan was OK with it:
&quot;It seems reasonable to me that the autofilled property is only cleared when the text is modified by the user. Since it is a visible change in the behavior, there&apos;s always a chance that it will not sit well with everyone and we might eventually have to allow for both behaviors somehow. But it seems like a small enough behavior change that it&apos;s unlikely that anyone will care strongly about it.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>224995</commentid>
    <comment_count>2</comment_count>
    <who name="John Sullivan">sullivan</who>
    <bug_when>2010-05-12 17:23:39 -0700</bug_when>
    <thetext>I think we could implement the old behavior on top of the new code by having the client notice the focus event and explicitly call setAutofilled(false), so that makes the new code seem even safer than I previously thought.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>224999</commentid>
    <comment_count>3</comment_count>
      <attachid>55912</attachid>
    <who name="John Sullivan">sullivan</who>
    <bug_when>2010-05-12 17:25:09 -0700</bug_when>
    <thetext>Comment on attachment 55912
patch

This seems safe enough.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>225795</commentid>
    <comment_count>4</comment_count>
      <attachid>55912</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-05-14 07:17:01 -0700</bug_when>
    <thetext>Comment on attachment 55912
patch

Clearing flags on attachment: 55912

Committed r59472: &lt;http://trac.webkit.org/changeset/59472&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>225796</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-05-14 07:17:06 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>55912</attachid>
            <date>2010-05-12 16:52:43 -0700</date>
            <delta_ts>2010-05-14 07:17:01 -0700</delta_ts>
            <desc>patch</desc>
            <filename>textmate stdin cZcdP1.txt</filename>
            <type>text/plain</type>
            <size>1660</size>
            <attacher name="Jens Alfke">jens</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
ZWFiMjRjYy4uMThmNGE2NCAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvV2Vi
Q29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxNSBAQAorMjAxMC0wNS0xMiAgSmVucyBBbGZrZSAg
PHNuZWpAY2hyb21pdW0ub3JnPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEp
LgorCisgICAgICAgIERvbid0IGNsZWFyIHllbGxvdyBhdXRvZmlsbCBoaWdobGlnaHQgZnJvbSB0
ZXh0IGZpZWxkcyB1bnRpbCB0aGUgdXNlciBlZGl0cyB0aGVtLgorICAgICAgICBodHRwczovL2J1
Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MzkwMzIKKyAgICAgICAgTm8gbmV3IHRlc3Rz
IChDb3VsZG4ndCBmaW5kIGFueSBhdXRvZmlsbCB0ZXN0cy4gVGhlIGZsYWcgZG9lc24ndCBzZWVt
IHRvIGJlIGV4cG9zZWQgdG8gSlMuKQorCisgICAgICAgICogaHRtbC9IVE1MSW5wdXRFbGVtZW50
LmNwcDoKKyAgICAgICAgKFdlYkNvcmU6OkhUTUxJbnB1dEVsZW1lbnQ6OmhhbmRsZUZvY3VzRXZl
bnQpOiAgRG9uJ3QgY2xlYXIgdGhlIGF1dG9maWxsZWQgZmx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