<?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>66658</bug_id>
          
          <creation_ts>2011-08-22 03:31:18 -0700</creation_ts>
          <short_desc>Chrome::setSelectedColorInColorChooser shouldn&apos;t be called when color chooser sets a new color</short_desc>
          <delta_ts>2011-08-23 07:45:38 -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="Keishi Hattori">keishi</reporter>
          <assigned_to name="Keishi Hattori">keishi</assigned_to>
          <cc>darin</cc>
    
    <cc>tkent</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>454516</commentid>
    <comment_count>0</comment_count>
    <who name="Keishi Hattori">keishi</who>
    <bug_when>2011-08-22 03:31:18 -0700</bug_when>
    <thetext>Chrome::setSelectedColorInColorChooser is being called when the color chooser selects a color. This causes an infinite loop when the user changes the color very rapidly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454517</commentid>
    <comment_count>1</comment_count>
      <attachid>104658</attachid>
    <who name="Keishi Hattori">keishi</who>
    <bug_when>2011-08-22 03:34:23 -0700</bug_when>
    <thetext>Created attachment 104658
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454522</commentid>
    <comment_count>2</comment_count>
      <attachid>104658</attachid>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2011-08-22 03:54:38 -0700</bug_when>
    <thetext>Comment on attachment 104658
patch

ok</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454532</commentid>
    <comment_count>3</comment_count>
      <attachid>104658</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-08-22 04:53:34 -0700</bug_when>
    <thetext>Comment on attachment 104658
patch

Clearing flags on attachment: 104658

Committed r93503: &lt;http://trac.webkit.org/changeset/93503&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454533</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-08-22 04:53:38 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454633</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-08-22 09:39:59 -0700</bug_when>
    <thetext>Normally this kind of change needs a regression test. Why no test in this case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>455125</commentid>
    <comment_count>6</comment_count>
    <who name="Keishi Hattori">keishi</who>
    <bug_when>2011-08-22 18:07:20 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; Normally this kind of change needs a regression test. Why no test in this case?

I can&apos;t write a layout test because I need to manipulate NSColorPanel for the problem to occur.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>455131</commentid>
    <comment_count>7</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-08-22 18:10:46 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; I can&apos;t write a layout test because I need to manipulate NSColorPanel for the problem to occur.

We can easily add a feature to DumpRenderTree to call the same function that the NSColorPanel would.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>455147</commentid>
    <comment_count>8</comment_count>
    <who name="Keishi Hattori">keishi</who>
    <bug_when>2011-08-22 19:05:41 -0700</bug_when>
    <thetext>This is my first time looking at DumpRenderTree and I have a couple of questions.

1. The WebKit part of the patch hasn&apos;t landed yet (Bug 65889, Bug 65897). So if I were to do this right now, I need to call a WebCore method from DumpRenderTree. Would it be better to do this after the patches land.

2. This infinite loop only happens in Chromium. The &quot;set to color chooser&quot; and &quot;set from color chooser&quot; IPCs get intertwined causing the loop. 
The loop won&apos;t happen in WebKit because the calls are from a single thread and the NSColorPanel checks if the same color is being set. 
Could we use DumpRenderTree to test for this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>455157</commentid>
    <comment_count>9</comment_count>
    <who name="Kent Tamura">tkent</who>
    <bug_when>2011-08-22 19:24:11 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; This is my first time looking at DumpRenderTree and I have a couple of questions.
&gt; 
&gt; 1. The WebKit part of the patch hasn&apos;t landed yet (Bug 65889, Bug 65897). So if I were to do this right now, I need to call a WebCore method from DumpRenderTree. Would it be better to do this after the patches land.

I think we had better introduce a mock color panel delegate object and inject it to Chrome or ChromeClient by window.internals; e.g. window.internals.useMockColorPanel().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>455402</commentid>
    <comment_count>10</comment_count>
    <who name="Keishi Hattori">keishi</who>
    <bug_when>2011-08-23 07:45:38 -0700</bug_when>
    <thetext>Thanks darin, tkent. I think I have an idea how to test this now. I am working on it.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>104658</attachid>
            <date>2011-08-22 03:34:23 -0700</date>
            <delta_ts>2011-08-22 04:53:34 -0700</delta_ts>
            <desc>patch</desc>
            <filename>bug-66658-20110822193421.patch</filename>
            <type>text/plain</type>
            <size>2347</size>
            <attacher name="Keishi Hattori">keishi</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogOTMzODcKZGlmZiAtLWdpdCBh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