[Webkit-unassigned] [Bug 79288] New: handle indeterminate state for checkbox in Windows Theme

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 22 15:45:50 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=79288

           Summary: handle indeterminate state for checkbox in Windows
                    Theme
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows 7
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: lynn.neir at skype.net
                CC: lynn.neir at skype.net


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->style()->appearance();
    if (!isEnabled(o))
        result = TS_DISABLED;
    else if (isReadOnlyControl(o) && (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) && 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) && appearance == CheckboxPart)
        result += 8;

    return result;
}

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list