[Webkit-unassigned] [Bug 89425] New: [Form] Move isKeyboardFocusable and isMouseFocusable to InputType from HTMLInputElement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 18 23:02:30 PDT 2012


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

           Summary: [Form] Move isKeyboardFocusable and isMouseFocusable
                    to InputType from HTMLInputElement
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Forms
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: yosin at chromium.org
            Blocks: 88970


For introducing time fields UI and code cleanup, input type class should decide of keyboard/mouse focus-able rather than HTMLInputElement.

== Current ==
bool HTMLInputElement::isKeyboardFocusable(KeyboardEvent* event) const
{
    if (isTextField())
        return HTMLTextFormControlElement::isFocusable();
    return HTMLTextFormControlElement::isKeyboardFocusable(event) && m_inputType->isKeyboardFocusable();
}

== Proposed ==

bool HTMLInputElement::isKeyboardFocusable(KeyboardEvent* event) const
{
    return m_inputType->isKeyboardFocusable(event);
}

bool InputType::isKeyboardFocusable(KeyboardEvent* event) const
{
    return element()->isTextFormControlKeyboardFocusable(event); // call new method in HTMLInputElement class
}

bool TextFieldInputType::isKeyboardFocusable(KeyboardEvent* event) const
{
    return element()->isTextFormControlFocusable(); // call new method in HTMLInputElement class
}

-- 
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