<?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>79288</bug_id>
          
          <creation_ts>2012-02-22 15:45:50 -0800</creation_ts>
          <short_desc>[Windows, WinCairo] Handle indeterminate state for checkbox in Windows Theme</short_desc>
          <delta_ts>2012-02-24 06:46:08 -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>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 7</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="Lynn Neir">lynn.neir</reporter>
          <assigned_to name="Brent Fulgham">bfulgham</assigned_to>
          <cc>aroben</cc>
    
    <cc>bfulgham</cc>
    
    <cc>lynn.neir</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>562475</commentid>
    <comment_count>0</comment_count>
    <who name="Lynn Neir">lynn.neir</who>
    <bug_when>2012-02-22 15:45:50 -0800</bug_when>
    <thetext>Windows theme code is not handling indeterminate state for CheckBox.  Below is additional code that gives indetermine state capability.  Only change is addition of two lines to check for indeterminate state on checkbox and add 8 to the result.

This gives correct rendering for Layout test: fast/forms/indeterminate.html

unsigned RenderThemeWin::determineState(RenderObject* o)
{
    unsigned result = TS_NORMAL;
    ControlPart appearance = o-&gt;style()-&gt;appearance();
    if (!isEnabled(o))
        result = TS_DISABLED;
    else if (isReadOnlyControl(o) &amp;&amp; (TextFieldPart == appearance || TextAreaPart == appearance || SearchFieldPart == appearance))
        result = TFS_READONLY; // Readonly is supported on textfields.
    else if (isPressed(o)) // Active overrides hover and focused.
        result = TS_ACTIVE;
    else if (supportsFocus(appearance) &amp;&amp; isFocused(o))
        result = TS_FOCUSED;
    else if (isHovered(o))
        result = TS_HOVER;

    if (isChecked(o))
        result += 4; // 4 unchecked states, 4 checked states.
    else if (isIndeterminate(o) &amp;&amp; appearance == CheckboxPart)
        result += 8;

    return result;
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>563676</commentid>
    <comment_count>1</comment_count>
      <attachid>128600</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2012-02-23 16:40:56 -0800</bug_when>
    <thetext>Created attachment 128600
Correct handling of CheckBox when in indeterminate state

Thanks for the update, Lynn.  I&apos;ve generated a patch based on your suggested change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>564252</commentid>
    <comment_count>2</comment_count>
      <attachid>128600</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2012-02-24 05:51:12 -0800</bug_when>
    <thetext>Comment on attachment 128600
Correct handling of CheckBox when in indeterminate state

View in context: https://bugs.webkit.org/attachment.cgi?id=128600&amp;action=review

&gt; Source/WebCore/ChangeLog:8
&gt; +        Tested by fast/forms/indeterminate.html

I wish we our regression tests actually tested RenderThemeWin! Then we could check in new pixel results for this test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>564291</commentid>
    <comment_count>3</comment_count>
      <attachid>128600</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-02-24 06:46:04 -0800</bug_when>
    <thetext>Comment on attachment 128600
Correct handling of CheckBox when in indeterminate state

Clearing flags on attachment: 128600

Committed r108791: &lt;http://trac.webkit.org/changeset/108791&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>564292</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-02-24 06:46:08 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>128600</attachid>
            <date>2012-02-23 16:40:56 -0800</date>
            <delta_ts>2012-02-24 06:46:03 -0800</delta_ts>
            <desc>Correct handling of CheckBox when in indeterminate state</desc>
            <filename>indeterminate_checkbox.patch</filename>
            <type>text/plain</type>
            <size>1254</size>
            <attacher name="Brent Fulgham">bfulgham</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDEwODY5OCkKKysrIFNvdXJjZS9XZWJDb3JlL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE1IEBACisyMDEyLTAyLTIzICBMeW5uIE5l
aXIgPGx5bm4ubmVpckBza3lwZS5uZXQ+CisKKyAgICAgICAgW1dpbmRvd3MsIFdpbkNhaXJvXSBI
YW5kbGUgaW5kZXRlcm1pbmF0ZSBjaGVja2JveCBzdGF0ZQorICAgICAgICBodHRwczovL2J1Z3Mu
d2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NzkyODgKKworICAgICAgICBSZXZpZXdlZCBieSBO
T0JPRFkgKE9PUFMhKS4KKworICAgICAgICBUZXN0ZWQgYnkgZmFzdC9mb3Jtcy9pbmRldGVybWlu
YXRlLmh0bWwKKworICAgICAgICAqIHJlbmRlcmluZy9SZW5kZXJUaGVtZVdpbi5jcHA6IEFkZCBj
b2RlIHRvIGNoZWNrIGZvciBpbmRldGVybWluYXRlCisgICAgICAgICAgc3RhdGUgaW4gQ2hlY2tC
b3guCisKIDIwMTItMDItMjEgIEphbWVzIFJvYmluc29uICA8amFtZXNyQGNocm9taXVtLm9yZz4K
IAogICAgICAgICBbY2hyb21pdW1dIE5vdGlmeSBjb21wb3NpdG9yIG9mIHdoZWVsIGV2ZW50IHJl
Z2lzdHJhdGlvbiB2aWEgU2Nyb2xsaW5nQ29vcmRpbmF0b3IKSW5kZXg6IFNvdXJjZS9XZWJDb3Jl
L3JlbmRlcmluZy9SZW5kZXJUaGVtZVdpbi5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gU291cmNlL1dlYkNv
cmUvcmVuZGVyaW5nL1JlbmRlclRoZW1lV2luLmNwcAkocmV2aXNpb24gMTA4Njg0KQorKysgU291
cmNlL1dlYkNvcmUvcmVuZGVyaW5nL1JlbmRlclRoZW1lV2luLmNwcAkod29ya2luZyBjb3B5KQpA
QCAtNDU3LDYgKzQ1Nyw4IEBAIHVuc2lnbmVkIFJlbmRlclRoZW1lV2luOjpkZXRlcm1pbmVTdGF0
ZSgKICAgICAgICAgcmVzdWx0ID0gVFNfSE9WRVI7CiAgICAgaWYgKGlzQ2hlY2tlZChvKSkKICAg
ICAgICAgcmVzdWx0ICs9IDQ7IC8vIDQgdW5jaGVja2VkIHN0YXRlcywgNCBjaGVja2VkIHN0YXRl
cy4KKyAgICBlbHNlIGlmIChpc0luZGV0ZXJtaW5hdGUobykgJiYgYXBwZWFyYW5jZSA9PSBDaGVj
a2JveFBhcnQpCisgICAgICAgIHJlc3VsdCArPSA4OwogICAgIHJldHVybiByZXN1bHQ7CiB9CiAK
</data>

          </attachment>
      

    </bug>

</bugzilla>