Closed Bug 474878 Opened 16 years ago Closed 15 years ago

Implement display of .indeterminate property on Windows

Categories

(Core :: Widget: Win32, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ventnor.bugzilla, Assigned: sylvain.pasche)

References

Details

(Keywords: platform-parity)

Attachments

(1 file, 2 obsolete files)

Windows needs support for displaying the .indeterminate DOM property in its native checkboxes. Indeterminate checkboxes are the kinds of checkboxes you get at the top of a list when only some of the checkboxes within that list are ticked.
Attached patch DrawThemeBackground part. (obsolete) — Splinter Review
work in progress, DrawFrameControl still needs to be done (ClassicGetThemePartAndState). Found this sample which can be useful: http://www.jeskola.net/buzz/beta/files/dev/patternxp/tree/CreateCheckboxImageList.cpp.
Assignee: nobody → sylvain.pasche
Status: NEW → ASSIGNED
This depends on the patch on bug 474868.

Using GetCheckedOrSelected() could save a few duplicated code, I tried to keep the old logic.

Robert, do you want to review this, or do you suggest someone else?
Attachment #358974 - Attachment is obsolete: true
Attachment #359159 - Flags: superreview?(roc)
Attachment #359159 - Flags: review?(roc)
Depends on: 474868
+      enum InputState {
+        UNCHECKED = 0, CHECKED, INDETERMINATE
+      } inputState = UNCHECKED;

Prefer to separate the declaration of InputState from the declaration of inputState.

+        if (GetCheckedOrSelected(aFrame, !isCheckbox))
+          inputState = CHECKED;
+        if (isCheckbox && GetIndeterminate(aFrame))
+          inputState = INDETERMINATE;

{} around these conditional statements. We generally use {} unless the statement transfers control (e.g. break/continue/return).

Please post a new patch with that. Thanks!!!
(In reply to comment #3)
> +      enum InputState {
> +        UNCHECKED = 0, CHECKED, INDETERMINATE
> +      } inputState = UNCHECKED;
> 
> Prefer to separate the declaration of InputState from the declaration of
> inputState.

done

> +        if (GetCheckedOrSelected(aFrame, !isCheckbox))
> +          inputState = CHECKED;
> +        if (isCheckbox && GetIndeterminate(aFrame))
> +          inputState = INDETERMINATE;
> 
> {} around these conditional statements. We generally use {} unless the
> statement transfers control (e.g. break/continue/return).

did that for those two and a few others near things I touched.
Attachment #359159 - Attachment is obsolete: true
Attachment #359356 - Flags: superreview?(roc)
Attachment #359356 - Flags: review?(roc)
Attachment #359159 - Flags: superreview?(roc)
Attachment #359159 - Flags: review?(roc)
Attachment #359356 - Flags: superreview?(roc)
Attachment #359356 - Flags: superreview+
Attachment #359356 - Flags: review?(roc)
Attachment #359356 - Flags: review+
Pushed http://hg.mozilla.org/mozilla-central/rev/557cfff414c6. Thanks!!
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [needs landing]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: