Closed Bug 437009 Opened 12 years ago Closed 11 years ago

buttons with type="radio" or type="checkbox" render with the incorrect state when checked

Categories

(Core :: Widget: Win32, defect)

x86
Windows XP
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla1.9.1a1

People

(Reporter: yuri.pimenov, Assigned: kliu)

References

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9) Gecko/2008051206 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9) Gecko/2008051206 Firefox/3.0

With classic look only button's label gets little offset when button is pressed. With winxp look nothing happens at all.

Reproducible: Always

Steps to Reproduce:
1. load sample xul in xulrunner/ff3.
2. try pressing buttons
3.



Same bug exists in XULRunner 1.9. Linux builds are unaffected.
dunno how to attach a file, posting it here.

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<xul:window xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  id="main"
  title="test"
  width="300"
  height="300"
  persist="width,height">

  <xul:hbox flex="1">
    <xul:vbox id="nav">
      <xul:button label="button1" type="radio" group="group1" />
      <xul:button label="button2" type="radio" group="group1" />
    </xul:vbox>
    <xul:caption flex="1" label="Hello World"/>
  </xul:hbox>

  <xul:separator class="groove-thin" />
  <xul:statusbar>
    <xul:spacer flex="1" />
    <xul:statusbarpanel label="Offline" />
  </xul:statusbar>

</xul:window>
> dunno how to attach a file

Yuri, click "Add an attachment" link. Fill in the fields. Make sure you choose

o select from list: XUL (application/vnd.mozilla.xul+xml)

from the drop-down list.
Attached file testcase
Component: Theme → XUL Widgets
Product: Firefox → Toolkit
QA Contact: theme → xul.widgets
Confirm. Tested at my side and have reproducible-always as in description.
Status: UNCONFIRMED → NEW
Component: XUL Widgets → Themes
Ever confirmed: true
Product: Toolkit → Core
QA Contact: xul.widgets → themes
Summary: buttons with type="radio" render incorectly when checked → buttons with type="radio" or type="checkbox" render with the incorrect state when checked
Version: unspecified → Trunk
Assignee: nobody → kliu
Status: NEW → ASSIGNED
Attachment #327953 - Flags: superreview?(vladimir)
Attachment #327953 - Flags: review?(vladimir)
Component: Themes → Widget: Win32
QA Contact: themes → win32
Comment on attachment 327953 [details] [diff] [review]
handle <button> checked/open states

Hrm, wonder how we didn't catch this before.  I think this is ok -- I gues StandardGetState isn't enough, I thought the old code just did that amount
Attachment #327953 - Flags: superreview?(vladimir)
Attachment #327953 - Flags: superreview+
Attachment #327953 - Flags: review?(vladimir)
Attachment #327953 - Flags: review+
(In reply to comment #6)
> Hrm, wonder how we didn't catch this before.
> 

Probably because nobody ever uses these button types.  ;)
Keywords: checkin-needed
http://hg.mozilla.org/index.cgi/mozilla-central/rev/1d847cc0dbf6
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a1
Thanks, Dao, for driving the checkin-needed list!  :)
Comment on attachment 327953 [details] [diff] [review]
handle <button> checked/open states

Requesting 1.9.0.2 approval: Very low-risk patch to make button states look consistent on Windows (this will also make the history sidebar's View button look right when open)
Attachment #327953 - Flags: approval1.9.0.2?
Can we get an automated test for this before landing on 1.9?
Flags: in-testsuite?
Attached patch testsSplinter Review
I don't have a Mac to test these tests with, so that's why I'm excluding Macs from this test (this is, after all, a Windows bug...).  If someone could verify that these tests also work on the Mac, then the skip-if could be removed.
Attachment #330691 - Flags: review?(vladimir)
Comment on attachment 327953 [details] [diff] [review]
handle <button> checked/open states

Pushing approval out to 1.9.0.3.
Attachment #327953 - Flags: approval1.9.0.2? → approval1.9.0.3?
Vlad can you review these tests?

Note, even with them, we're opting not to take this fix in a maintenance release.
Attachment #327953 - Flags: approval1.9.0.4? → approval1.9.0.4-
Blocks: 410719
Duplicate of this bug: 479453
You need to log in before you can comment on or make changes to this bug.