| Index: Source/core/html/HTMLFormControlElement.cpp
|
| diff --git a/Source/core/html/HTMLFormControlElement.cpp b/Source/core/html/HTMLFormControlElement.cpp
|
| index 3ad09c1b9ffe14b63973f60877eb318aad4bf0be..827199b43fc83dde6ba73e35664e27a11e24e4da 100644
|
| --- a/Source/core/html/HTMLFormControlElement.cpp
|
| +++ b/Source/core/html/HTMLFormControlElement.cpp
|
| @@ -340,14 +340,22 @@ bool HTMLFormControlElement::shouldHaveFocusAppearance() const
|
| return !m_wasFocusedByMouse || shouldShowFocusRingOnMouseFocus();
|
| }
|
|
|
| -bool HTMLFormControlElement::wasFocusedByMouse() const
|
| +void HTMLFormControlElement::dispatchFocusEvent(Element* oldFocusedElement, FocusType type)
|
| {
|
| - return m_wasFocusedByMouse;
|
| + if (type != FocusTypePage)
|
| + m_wasFocusedByMouse = type == FocusTypeMouse;
|
| + HTMLElement::dispatchFocusEvent(oldFocusedElement, type);
|
| }
|
|
|
| -void HTMLFormControlElement::setWasFocusedByMouse(bool wasFocusedByMouse)
|
| +void HTMLFormControlElement::willCallDefaultEventHandler(const Event& event)
|
| {
|
| - m_wasFocusedByMouse = wasFocusedByMouse;
|
| + if (!m_wasFocusedByMouse)
|
| + return;
|
| + if (!event.isKeyboardEvent() || event.type() != EventTypeNames::keydown)
|
| + return;
|
| + m_wasFocusedByMouse = false;
|
| + if (renderer())
|
| + renderer()->setShouldDoFullPaintInvalidation(true);
|
| }
|
|
|
| short HTMLFormControlElement::tabIndex() const
|
|
|