| Index: Source/core/html/HTMLFormControlElement.cpp
|
| diff --git a/Source/core/html/HTMLFormControlElement.cpp b/Source/core/html/HTMLFormControlElement.cpp
|
| index a4e37a36cc362f9912230017706c1f74ee3793f4..6e01ff07ddb1831c499c1ee56e74a867f00f5d13 100644
|
| --- a/Source/core/html/HTMLFormControlElement.cpp
|
| +++ b/Source/core/html/HTMLFormControlElement.cpp
|
| @@ -33,6 +33,7 @@
|
| #include "core/html/HTMLLegendElement.h"
|
| #include "core/html/ValidityState.h"
|
| #include "core/frame/UseCounter.h"
|
| +#include "core/page/FocusController.h"
|
| #include "core/page/Page.h"
|
| #include "core/page/ValidationMessageClient.h"
|
| #include "core/rendering/RenderBox.h"
|
| @@ -56,7 +57,6 @@ HTMLFormControlElement::HTMLFormControlElement(const QualifiedName& tagName, Doc
|
| , m_willValidate(true)
|
| , m_isValid(true)
|
| , m_wasChangedSinceLastFormControlChangeEvent(false)
|
| - , m_wasFocusedByMouse(false)
|
| {
|
| setHasCustomStyleCallbacks();
|
| associateByParser(form);
|
| @@ -331,31 +331,12 @@ bool HTMLFormControlElement::shouldShowFocusRingOnMouseFocus() const
|
| return false;
|
| }
|
|
|
| -void HTMLFormControlElement::dispatchFocusEvent(Element* oldFocusedElement, FocusType type)
|
| -{
|
| - if (type != FocusTypePage)
|
| - m_wasFocusedByMouse = type == FocusTypeMouse;
|
| - HTMLElement::dispatchFocusEvent(oldFocusedElement, type);
|
| -}
|
| -
|
| bool HTMLFormControlElement::shouldHaveFocusAppearance() const
|
| {
|
| ASSERT(focused());
|
| - return shouldShowFocusRingOnMouseFocus() || !m_wasFocusedByMouse;
|
| + return shouldShowFocusRingOnMouseFocus() || !document().page()->focusController().wasFocusedByMouse();
|
| }
|
|
|
| -void HTMLFormControlElement::willCallDefaultEventHandler(const Event& event)
|
| -{
|
| - if (!event.isKeyboardEvent() || event.type() != EventTypeNames::keydown)
|
| - return;
|
| - if (!m_wasFocusedByMouse)
|
| - return;
|
| - m_wasFocusedByMouse = false;
|
| - if (renderer())
|
| - renderer()->paintInvalidationForWholeRenderer();
|
| -}
|
| -
|
| -
|
| short HTMLFormControlElement::tabIndex() const
|
| {
|
| // Skip the supportsFocus check in HTMLElement.
|
|
|