Diff
Modified: trunk/LayoutTests/ChangeLog (259686 => 259687)
--- trunk/LayoutTests/ChangeLog 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/LayoutTests/ChangeLog 2020-04-07 23:43:29 UTC (rev 259687)
@@ -1,3 +1,13 @@
+2020-04-07 Chris Fleizach <[email protected]>
+
+ AX: VoiceOver can't activate combobox when textfield is inside it
+ https://bugs.webkit.org/show_bug.cgi?id=210081
+
+ Reviewed by Joanmarie Diggs.
+
+ * accessibility/activation-of-input-field-inside-other-element-expected.txt: Added.
+ * accessibility/activation-of-input-field-inside-other-element.html: Added.
+
2020-04-07 Jason Lawrence <[email protected]>
[ iOS ] http/tests/security/appcache-in-private-browsing.html is flaky timing out
Added: trunk/LayoutTests/accessibility/activation-of-input-field-inside-other-element-expected.txt (0 => 259687)
--- trunk/LayoutTests/accessibility/activation-of-input-field-inside-other-element-expected.txt (rev 0)
+++ trunk/LayoutTests/accessibility/activation-of-input-field-inside-other-element-expected.txt 2020-04-07 23:43:29 UTC (rev 259687)
@@ -0,0 +1,11 @@
+
+This test checks whether a simulated click will activate a combobox that contains a text field.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Combo box element WAS clicked with accessibility
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/accessibility/activation-of-input-field-inside-other-element.html (0 => 259687)
--- trunk/LayoutTests/accessibility/activation-of-input-field-inside-other-element.html (rev 0)
+++ trunk/LayoutTests/accessibility/activation-of-input-field-inside-other-element.html 2020-04-07 23:43:29 UTC (rev 259687)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<div role="combobox" aria-expanded="false" aria-haspopup="listbox" id="combo" _onclick_="comboBoxClicked();">
+ <div role="none">
+ <input id="input-40" type="text" role="textbox" autocomplete="off" placeholder="Select an Option" aria-autocomplete="none" readonly="" disabled="">
+ </div>
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+ description("This test checks whether a simulated click will activate a combobox that contains a text field.");
+
+ function comboBoxClicked() {
+ debug("Combo box element WAS clicked with accessibility");
+ finishJSTest();
+ }
+
+ window.jsTestIsAsync = true;
+ if (window.accessibilityController) {
+ var element = accessibilityController.accessibleElementById("combo");
+ element.press();
+ }
+</script>
+<script src=""
+</body>
+</html>
+
Modified: trunk/Source/WebCore/ChangeLog (259686 => 259687)
--- trunk/Source/WebCore/ChangeLog 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/ChangeLog 2020-04-07 23:43:29 UTC (rev 259687)
@@ -1,3 +1,72 @@
+2020-04-07 Chris Fleizach <[email protected]>
+
+ AX: VoiceOver can't activate combobox when textfield is inside it
+ https://bugs.webkit.org/show_bug.cgi?id=210081
+
+ Reviewed by Joanmarie Diggs.
+
+ Change accessKeyAction to return whether a simulated click event was dispatched.
+ Accessibility uses that information to decide whether it should sent an event afterwards, because
+ some objects accessKeyAction is only to focus(). AX is expected here to press on the object (and possibly focus).
+
+ Test: accessibility/activation-of-input-field-inside-other-element.html
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::press):
+ * dom/Element.h:
+ (WebCore::Element::accessKeyAction):
+ * html/BaseCheckableInputType.cpp:
+ (WebCore::BaseCheckableInputType::accessKeyAction):
+ * html/BaseCheckableInputType.h:
+ * html/BaseChooserOnlyDateAndTimeInputType.cpp:
+ (WebCore::BaseChooserOnlyDateAndTimeInputType::accessKeyAction):
+ * html/BaseChooserOnlyDateAndTimeInputType.h:
+ * html/BaseClickableWithKeyInputType.cpp:
+ (WebCore::BaseClickableWithKeyInputType::accessKeyAction):
+ * html/BaseClickableWithKeyInputType.h:
+ * html/HTMLAnchorElement.cpp:
+ (WebCore::HTMLAnchorElement::accessKeyAction):
+ * html/HTMLAnchorElement.h:
+ * html/HTMLButtonElement.cpp:
+ (WebCore::HTMLButtonElement::accessKeyAction):
+ * html/HTMLButtonElement.h:
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::accessKeyAction):
+ * html/HTMLElement.h:
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::accessKeyAction):
+ * html/HTMLInputElement.h:
+ * html/HTMLLabelElement.cpp:
+ (WebCore::HTMLLabelElement::accessKeyAction):
+ * html/HTMLLabelElement.h:
+ * html/HTMLLegendElement.cpp:
+ (WebCore::HTMLLegendElement::accessKeyAction):
+ * html/HTMLLegendElement.h:
+ * html/HTMLOptGroupElement.cpp:
+ (WebCore::HTMLOptGroupElement::accessKeyAction):
+ * html/HTMLOptGroupElement.h:
+ * html/HTMLOptionElement.cpp:
+ (WebCore::HTMLOptionElement::accessKeyAction):
+ * html/HTMLOptionElement.h:
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::accessKeyAction):
+ * html/HTMLSelectElement.h:
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::accessKeyAction):
+ * html/HTMLTextAreaElement.h:
+ * html/HiddenInputType.cpp:
+ (WebCore::HiddenInputType::accessKeyAction):
+ * html/HiddenInputType.h:
+ * html/InputType.cpp:
+ (WebCore::InputType::accessKeyAction):
+ * html/InputType.h:
+ * html/RangeInputType.cpp:
+ (WebCore::RangeInputType::accessKeyAction):
+ * html/RangeInputType.h:
+ * svg/SVGElement.cpp:
+ (WebCore::SVGElement::accessKeyAction):
+ * svg/SVGElement.h:
+
2020-04-07 Jiewen Tan <[email protected]>
[WebAuthn] Cancel WebAuthn requests when users cancel LocalAuthentication prompts
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (259686 => 259687)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -905,15 +905,13 @@
UserGestureIndicator gestureIndicator(ProcessingUserGesture, document);
- bool dispatchedTouchEvent = false;
+ bool dispatchedEvent = false;
#if PLATFORM(IOS_FAMILY)
if (hasTouchEventListener())
- dispatchedTouchEvent = dispatchTouchEvent();
+ dispatchedEvent = dispatchTouchEvent();
#endif
- if (!dispatchedTouchEvent)
- pressElement->accessKeyAction(true);
- return true;
+ return dispatchedEvent || pressElement->accessKeyAction(true) || pressElement->dispatchSimulatedClick(nullptr, SendMouseUpDownEvents);
}
bool AccessibilityObject::dispatchTouchEvent()
Modified: trunk/Source/WebCore/dom/Element.cpp (259686 => 259687)
--- trunk/Source/WebCore/dom/Element.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/dom/Element.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -419,9 +419,9 @@
return !event->defaultPrevented() && !event->defaultHandled();
}
-void Element::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEventOptions eventOptions, SimulatedClickVisualOptions visualOptions)
+bool Element::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEventOptions eventOptions, SimulatedClickVisualOptions visualOptions)
{
- simulateClick(*this, underlyingEvent, eventOptions, visualOptions, SimulatedClickSource::UserAgent);
+ return simulateClick(*this, underlyingEvent, eventOptions, visualOptions, SimulatedClickSource::UserAgent);
}
Ref<Node> Element::cloneNodeInternal(Document& targetDocument, CloningOperation type)
Modified: trunk/Source/WebCore/dom/Element.h (259686 => 259687)
--- trunk/Source/WebCore/dom/Element.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/dom/Element.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -381,7 +381,7 @@
WEBCORE_EXPORT AtomString computeInheritedLanguage() const;
Locale& locale() const;
- virtual void accessKeyAction(bool /*sendToAnyEvent*/) { }
+ virtual bool accessKeyAction(bool /*sendToAnyEvent*/) { return false; }
virtual bool isURLAttribute(const Attribute&) const { return false; }
virtual bool attributeContainsURL(const Attribute& attribute) const { return isURLAttribute(attribute); }
@@ -529,7 +529,7 @@
bool dispatchMouseEvent(const PlatformMouseEvent&, const AtomString& eventType, int clickCount = 0, Element* relatedTarget = nullptr);
bool dispatchWheelEvent(const PlatformWheelEvent&);
bool dispatchKeyEvent(const PlatformKeyboardEvent&);
- void dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEventOptions = SendNoEvents, SimulatedClickVisualOptions = ShowPressedLook);
+ bool dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEventOptions = SendNoEvents, SimulatedClickVisualOptions = ShowPressedLook);
void dispatchFocusInEvent(const AtomString& eventType, RefPtr<Element>&& oldFocusedElement);
void dispatchFocusOutEvent(const AtomString& eventType, RefPtr<Element>&& newFocusedElement);
virtual void dispatchFocusEvent(RefPtr<Element>&& oldFocusedElement, FocusDirection);
Modified: trunk/Source/WebCore/dom/SimulatedClick.cpp (259686 => 259687)
--- trunk/Source/WebCore/dom/SimulatedClick.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/dom/SimulatedClick.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -81,14 +81,14 @@
element.dispatchEvent(SimulatedMouseEvent::create(eventType, element.document().windowProxy(), underlyingEvent, element, source));
}
-void simulateClick(Element& element, Event* underlyingEvent, SimulatedClickMouseEventOptions mouseEventOptions, SimulatedClickVisualOptions visualOptions, SimulatedClickSource creationOptions)
+bool simulateClick(Element& element, Event* underlyingEvent, SimulatedClickMouseEventOptions mouseEventOptions, SimulatedClickVisualOptions visualOptions, SimulatedClickSource creationOptions)
{
if (element.isDisabledFormControl())
- return;
+ return false;
static NeverDestroyed<HashSet<Element*>> elementsDispatchingSimulatedClicks;
if (!elementsDispatchingSimulatedClicks.get().add(&element).isNewEntry)
- return;
+ return false;
if (mouseEventOptions == SendMouseOverUpDownEvents)
simulateMouseEvent(eventNames().mouseoverEvent, element, underlyingEvent, creationOptions);
@@ -103,6 +103,7 @@
simulateMouseEvent(eventNames().clickEvent, element, underlyingEvent, creationOptions);
elementsDispatchingSimulatedClicks.get().remove(&element);
+ return true;
}
} // namespace WebCore
Modified: trunk/Source/WebCore/dom/SimulatedClick.h (259686 => 259687)
--- trunk/Source/WebCore/dom/SimulatedClick.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/dom/SimulatedClick.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -37,6 +37,6 @@
UserAgent
};
-void simulateClick(Element&, Event* underlyingEvent, SimulatedClickMouseEventOptions, SimulatedClickVisualOptions, SimulatedClickSource);
+bool simulateClick(Element&, Event* underlyingEvent, SimulatedClickMouseEventOptions, SimulatedClickVisualOptions, SimulatedClickSource);
} // namespace WebCore
Modified: trunk/Source/WebCore/html/BaseCheckableInputType.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/BaseCheckableInputType.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/BaseCheckableInputType.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -91,12 +91,10 @@
}
// FIXME: Could share this with BaseClickableWithKeyInputType and RangeInputType if we had a common base class.
-void BaseCheckableInputType::accessKeyAction(bool sendMouseEvents)
+bool BaseCheckableInputType::accessKeyAction(bool sendMouseEvents)
{
- InputType::accessKeyAction(sendMouseEvents);
-
ASSERT(element());
- element()->dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
+ return InputType::accessKeyAction(sendMouseEvents) || element()->dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
}
String BaseCheckableInputType::fallbackValue() const
Modified: trunk/Source/WebCore/html/BaseCheckableInputType.h (259686 => 259687)
--- trunk/Source/WebCore/html/BaseCheckableInputType.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/BaseCheckableInputType.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -47,7 +47,7 @@
bool appendFormData(DOMFormData&, bool) const override;
void handleKeypressEvent(KeyboardEvent&) override;
bool canSetStringValue() const override;
- void accessKeyAction(bool sendMouseEvents) override;
+ bool accessKeyAction(bool sendMouseEvents) override;
String fallbackValue() const override;
bool storesValueSeparateFromAttribute() override;
void setValue(const String&, bool, TextFieldEventBehavior) override;
Modified: trunk/Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -130,11 +130,11 @@
BaseClickableWithKeyInputType::handleKeyupEvent(*this, event);
}
-void BaseChooserOnlyDateAndTimeInputType::accessKeyAction(bool sendMouseEvents)
+bool BaseChooserOnlyDateAndTimeInputType::accessKeyAction(bool sendMouseEvents)
{
BaseDateAndTimeInputType::accessKeyAction(sendMouseEvents);
ASSERT(element());
- BaseClickableWithKeyInputType::accessKeyAction(*element(), sendMouseEvents);
+ return BaseClickableWithKeyInputType::accessKeyAction(*element(), sendMouseEvents);
}
bool BaseChooserOnlyDateAndTimeInputType::isMouseFocusable() const
Modified: trunk/Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.h (259686 => 259687)
--- trunk/Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -52,7 +52,7 @@
ShouldCallBaseEventHandler handleKeydownEvent(KeyboardEvent&) override;
void handleKeypressEvent(KeyboardEvent&) override;
void handleKeyupEvent(KeyboardEvent&) override;
- void accessKeyAction(bool sendMouseEvents) override;
+ bool accessKeyAction(bool sendMouseEvents) override;
bool isMouseFocusable() const override;
void attributeChanged(const QualifiedName&) override;
Modified: trunk/Source/WebCore/html/BaseClickableWithKeyInputType.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/BaseClickableWithKeyInputType.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/BaseClickableWithKeyInputType.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -75,9 +75,9 @@
}
// FIXME: Could share this with BaseCheckableInputType and RangeInputType if we had a common base class.
-void BaseClickableWithKeyInputType::accessKeyAction(HTMLInputElement& element, bool sendMouseEvents)
+bool BaseClickableWithKeyInputType::accessKeyAction(HTMLInputElement& element, bool sendMouseEvents)
{
- element.dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
+ return element.dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
}
auto BaseClickableWithKeyInputType::handleKeydownEvent(KeyboardEvent& event) -> ShouldCallBaseEventHandler
@@ -97,11 +97,11 @@
handleKeyupEvent(*this, event);
}
-void BaseClickableWithKeyInputType::accessKeyAction(bool sendMouseEvents)
+bool BaseClickableWithKeyInputType::accessKeyAction(bool sendMouseEvents)
{
InputType::accessKeyAction(sendMouseEvents);
ASSERT(element());
- accessKeyAction(*element(), sendMouseEvents);
+ return accessKeyAction(*element(), sendMouseEvents);
}
} // namespace WebCore
Modified: trunk/Source/WebCore/html/BaseClickableWithKeyInputType.h (259686 => 259687)
--- trunk/Source/WebCore/html/BaseClickableWithKeyInputType.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/BaseClickableWithKeyInputType.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -40,7 +40,7 @@
static ShouldCallBaseEventHandler handleKeydownEvent(HTMLInputElement&, KeyboardEvent&);
static void handleKeypressEvent(HTMLInputElement&, KeyboardEvent&);
static void handleKeyupEvent(InputType&, KeyboardEvent&);
- static void accessKeyAction(HTMLInputElement&, bool sendMouseEvents);
+ static bool accessKeyAction(HTMLInputElement&, bool sendMouseEvents);
protected:
explicit BaseClickableWithKeyInputType(HTMLInputElement& element) : InputType(element) { }
@@ -49,7 +49,7 @@
ShouldCallBaseEventHandler handleKeydownEvent(KeyboardEvent&) override;
void handleKeypressEvent(KeyboardEvent&) override;
void handleKeyupEvent(KeyboardEvent&) override;
- void accessKeyAction(bool sendMouseEvents) override;
+ bool accessKeyAction(bool sendMouseEvents) override;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/html/HTMLAnchorElement.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLAnchorElement.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -274,9 +274,9 @@
HTMLElement::parseAttribute(name, value);
}
-void HTMLAnchorElement::accessKeyAction(bool sendMouseEvents)
+bool HTMLAnchorElement::accessKeyAction(bool sendMouseEvents)
{
- dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
+ return dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
}
bool HTMLAnchorElement::isURLAttribute(const Attribute& attribute) const
Modified: trunk/Source/WebCore/html/HTMLAnchorElement.h (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLAnchorElement.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -88,7 +88,7 @@
bool isKeyboardFocusable(KeyboardEvent*) const override;
void defaultEventHandler(Event&) final;
void setActive(bool active = true, bool pause = false) final;
- void accessKeyAction(bool sendMouseEvents) final;
+ bool accessKeyAction(bool sendMouseEvents) final;
bool isURLAttribute(const Attribute&) const final;
bool canStartSelection() const final;
String target() const override;
Modified: trunk/Source/WebCore/html/HTMLButtonElement.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLButtonElement.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLButtonElement.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -211,11 +211,11 @@
return true;
}
-void HTMLButtonElement::accessKeyAction(bool sendMouseEvents)
+bool HTMLButtonElement::accessKeyAction(bool sendMouseEvents)
{
focus();
- dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
+ return dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
}
bool HTMLButtonElement::isURLAttribute(const Attribute& attribute) const
Modified: trunk/Source/WebCore/html/HTMLButtonElement.h (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLButtonElement.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLButtonElement.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -68,7 +68,7 @@
bool isActivatedSubmit() const final;
void setActivatedSubmit(bool flag) final;
- void accessKeyAction(bool sendMouseEvents) final;
+ bool accessKeyAction(bool sendMouseEvents) final;
bool isURLAttribute(const Attribute&) const final;
bool canStartSelection() const final { return false; }
Modified: trunk/Source/WebCore/html/HTMLElement.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLElement.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLElement.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -705,9 +705,9 @@
simulateClick(*this, nullptr, SendNoEvents, DoNotShowPressedLook, SimulatedClickSource::Bindings);
}
-void HTMLElement::accessKeyAction(bool sendMouseEvents)
+bool HTMLElement::accessKeyAction(bool sendMouseEvents)
{
- dispatchSimulatedClick(nullptr, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
+ return dispatchSimulatedClick(nullptr, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
}
String HTMLElement::title() const
Modified: trunk/Source/WebCore/html/HTMLElement.h (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLElement.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLElement.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -66,7 +66,7 @@
WEBCORE_EXPORT void click();
- void accessKeyAction(bool sendMouseEvents) override;
+ bool accessKeyAction(bool sendMouseEvents) override;
RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
bool rendererIsEverNeeded() final;
Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLInputElement.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -666,10 +666,10 @@
return isTextField();
}
-void HTMLInputElement::accessKeyAction(bool sendMouseEvents)
+bool HTMLInputElement::accessKeyAction(bool sendMouseEvents)
{
Ref<InputType> protectedInputType(*m_inputType);
- protectedInputType->accessKeyAction(sendMouseEvents);
+ return protectedInputType->accessKeyAction(sendMouseEvents);
}
bool HTMLInputElement::isPresentationAttribute(const QualifiedName& name) const
Modified: trunk/Source/WebCore/html/HTMLInputElement.h (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLInputElement.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLInputElement.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -391,7 +391,7 @@
bool canStartSelection() const final;
- void accessKeyAction(bool sendMouseEvents) final;
+ bool accessKeyAction(bool sendMouseEvents) final;
void parseAttribute(const QualifiedName&, const AtomString&) final;
bool isPresentationAttribute(const QualifiedName&) const final;
Modified: trunk/Source/WebCore/html/HTMLLabelElement.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLLabelElement.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLLabelElement.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -189,12 +189,12 @@
element->focus(true, direction);
}
-void HTMLLabelElement::accessKeyAction(bool sendMouseEvents)
+bool HTMLLabelElement::accessKeyAction(bool sendMouseEvents)
{
if (auto element = control())
- element->accessKeyAction(sendMouseEvents);
- else
- HTMLElement::accessKeyAction(sendMouseEvents);
+ return element->accessKeyAction(sendMouseEvents);
+
+ return HTMLElement::accessKeyAction(sendMouseEvents);
}
} // namespace
Modified: trunk/Source/WebCore/html/HTMLLabelElement.h (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLLabelElement.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLLabelElement.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -42,7 +42,7 @@
bool isEventTargetedAtInteractiveDescendants(Event&) const;
- void accessKeyAction(bool sendMouseEvents) final;
+ bool accessKeyAction(bool sendMouseEvents) final;
// Overridden to update the hover/active state of the corresponding control.
void setActive(bool = true, bool pause = false) final;
Modified: trunk/Source/WebCore/html/HTMLLegendElement.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLLegendElement.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLLegendElement.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -72,10 +72,11 @@
control->focus(false, direction);
}
-void HTMLLegendElement::accessKeyAction(bool sendMouseEvents)
+bool HTMLLegendElement::accessKeyAction(bool sendMouseEvents)
{
if (auto control = associatedControl())
- control->accessKeyAction(sendMouseEvents);
+ return control->accessKeyAction(sendMouseEvents);
+ return false;
}
HTMLFormElement* HTMLLegendElement::form() const
Modified: trunk/Source/WebCore/html/HTMLLegendElement.h (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLLegendElement.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLLegendElement.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -42,7 +42,7 @@
// Control in the legend's field set that gets focus and access key.
RefPtr<HTMLFormControlElement> associatedControl();
- void accessKeyAction(bool sendMouseEvents) final;
+ bool accessKeyAction(bool sendMouseEvents) final;
void focus(bool restorePreviousSelection, FocusDirection) final;
};
Modified: trunk/Source/WebCore/html/HTMLOptGroupElement.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLOptGroupElement.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLOptGroupElement.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -112,12 +112,13 @@
return const_cast<HTMLSelectElement*>(ancestorsOfType<HTMLSelectElement>(*this).first());
}
-void HTMLOptGroupElement::accessKeyAction(bool)
+bool HTMLOptGroupElement::accessKeyAction(bool)
{
RefPtr<HTMLSelectElement> select = ownerSelectElement();
// send to the parent to bring focus to the list box
if (select && !select->focused())
- select->accessKeyAction(false);
+ return select->accessKeyAction(false);
+ return false;
}
} // namespace
Modified: trunk/Source/WebCore/html/HTMLOptGroupElement.h (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLOptGroupElement.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLOptGroupElement.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -49,7 +49,7 @@
void childrenChanged(const ChildChange&) final;
- void accessKeyAction(bool sendMouseEvents) final;
+ bool accessKeyAction(bool sendMouseEvents) final;
void recalcSelectOptions();
};
Modified: trunk/Source/WebCore/html/HTMLOptionElement.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLOptionElement.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLOptionElement.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -135,11 +135,14 @@
select->setSelectedIndex(oldSelectedIndex);
}
-void HTMLOptionElement::accessKeyAction(bool)
+bool HTMLOptionElement::accessKeyAction(bool)
{
RefPtr<HTMLSelectElement> select = ownerSelectElement();
- if (select)
+ if (select) {
select->accessKeySetSelectedIndex(index());
+ return true;
+ }
+ return false;
}
int HTMLOptionElement::index() const
Modified: trunk/Source/WebCore/html/HTMLOptionElement.h (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLOptionElement.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLOptionElement.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -72,7 +72,7 @@
void parseAttribute(const QualifiedName&, const AtomString&) final;
InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
- void accessKeyAction(bool) final;
+ bool accessKeyAction(bool) final;
void childrenChanged(const ChildChange&) final;
Modified: trunk/Source/WebCore/html/HTMLSelectElement.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLSelectElement.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLSelectElement.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -390,10 +390,10 @@
cache->childrenChanged(this);
}
-void HTMLSelectElement::accessKeyAction(bool sendMouseEvents)
+bool HTMLSelectElement::accessKeyAction(bool sendMouseEvents)
{
focus();
- dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
+ return dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
}
void HTMLSelectElement::setMultiple(bool multiple)
Modified: trunk/Source/WebCore/html/HTMLSelectElement.h (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLSelectElement.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLSelectElement.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -73,7 +73,7 @@
WEBCORE_EXPORT const Vector<HTMLElement*>& listItems() const;
- void accessKeyAction(bool sendMouseEvents) final;
+ bool accessKeyAction(bool sendMouseEvents) final;
void accessKeySetSelectedIndex(int);
WEBCORE_EXPORT void setMultiple(bool);
Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLTextAreaElement.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -500,9 +500,10 @@
return !valueMissing(candidate) && !tooShort(candidate, IgnoreDirtyFlag) && !tooLong(candidate, IgnoreDirtyFlag);
}
-void HTMLTextAreaElement::accessKeyAction(bool)
+bool HTMLTextAreaElement::accessKeyAction(bool)
{
focus();
+ return false;
}
void HTMLTextAreaElement::setCols(unsigned cols)
Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.h (259686 => 259687)
--- trunk/Source/WebCore/html/HTMLTextAreaElement.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -120,7 +120,7 @@
bool isKeyboardFocusable(KeyboardEvent*) const final;
void updateFocusAppearance(SelectionRestorationMode, SelectionRevealMode) final;
- void accessKeyAction(bool sendMouseEvents) final;
+ bool accessKeyAction(bool sendMouseEvents) final;
bool shouldUseInputMethod() final;
bool matchesReadWritePseudoClass() const final;
Modified: trunk/Source/WebCore/html/HiddenInputType.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/HiddenInputType.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HiddenInputType.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -73,8 +73,9 @@
return nullptr;
}
-void HiddenInputType::accessKeyAction(bool)
+bool HiddenInputType::accessKeyAction(bool)
{
+ return false;
}
bool HiddenInputType::rendererIsNeeded()
Modified: trunk/Source/WebCore/html/HiddenInputType.h (259686 => 259687)
--- trunk/Source/WebCore/html/HiddenInputType.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/HiddenInputType.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -44,7 +44,7 @@
void restoreFormControlState(const FormControlState&) override;
bool supportsValidation() const override;
RenderPtr<RenderElement> createInputRenderer(RenderStyle&&) override;
- void accessKeyAction(bool sendMouseEvents) override;
+ bool accessKeyAction(bool sendMouseEvents) override;
bool rendererIsNeeded() override;
bool storesValueSeparateFromAttribute() override;
bool isHiddenType() const override;
Modified: trunk/Source/WebCore/html/InputType.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/InputType.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/InputType.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -592,10 +592,11 @@
{
}
-void InputType::accessKeyAction(bool)
+bool InputType::accessKeyAction(bool)
{
ASSERT(element());
element()->focus(false);
+ return false;
}
void InputType::addSearchResult()
Modified: trunk/Source/WebCore/html/InputType.h (259686 => 259687)
--- trunk/Source/WebCore/html/InputType.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/InputType.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -205,7 +205,7 @@
virtual bool shouldUseInputMethod() const;
virtual void handleFocusEvent(Node* oldFocusedNode, FocusDirection);
virtual void handleBlurEvent();
- virtual void accessKeyAction(bool sendMouseEvents);
+ virtual bool accessKeyAction(bool sendMouseEvents);
virtual bool canBeSuccessfulSubmitButton();
virtual void subtreeHasChanged();
virtual void blur();
Modified: trunk/Source/WebCore/html/RangeInputType.cpp (259686 => 259687)
--- trunk/Source/WebCore/html/RangeInputType.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/RangeInputType.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -315,12 +315,10 @@
}
// FIXME: Could share this with BaseClickableWithKeyInputType and BaseCheckableInputType if we had a common base class.
-void RangeInputType::accessKeyAction(bool sendMouseEvents)
+bool RangeInputType::accessKeyAction(bool sendMouseEvents)
{
- InputType::accessKeyAction(sendMouseEvents);
-
- if (auto* element = this->element())
- element->dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
+ auto* element = this->element();
+ return InputType::accessKeyAction(sendMouseEvents) || (element && element->dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents));
}
void RangeInputType::attributeChanged(const QualifiedName& name)
Modified: trunk/Source/WebCore/html/RangeInputType.h (259686 => 259687)
--- trunk/Source/WebCore/html/RangeInputType.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/html/RangeInputType.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -56,7 +56,7 @@
void createShadowSubtree() final;
Decimal parseToNumber(const String&, const Decimal&) const final;
String serialize(const Decimal&) const final;
- void accessKeyAction(bool sendMouseEvents) final;
+ bool accessKeyAction(bool sendMouseEvents) final;
void attributeChanged(const QualifiedName&) final;
void setValue(const String&, bool valueChanged, TextFieldEventBehavior) final;
String fallbackValue() const final;
Modified: trunk/Source/WebCore/svg/SVGElement.cpp (259686 => 259687)
--- trunk/Source/WebCore/svg/SVGElement.cpp 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/svg/SVGElement.cpp 2020-04-07 23:43:29 UTC (rev 259687)
@@ -935,9 +935,9 @@
}
}
-void SVGElement::accessKeyAction(bool sendMouseEvents)
+bool SVGElement::accessKeyAction(bool sendMouseEvents)
{
- dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
+ return dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
}
void SVGElement::invalidateInstances()
Modified: trunk/Source/WebCore/svg/SVGElement.h (259686 => 259687)
--- trunk/Source/WebCore/svg/SVGElement.h 2020-04-07 23:42:34 UTC (rev 259686)
+++ trunk/Source/WebCore/svg/SVGElement.h 2020-04-07 23:43:29 UTC (rev 259687)
@@ -179,7 +179,7 @@
virtual void clearTarget() { }
void buildPendingResourcesIfNeeded();
- void accessKeyAction(bool sendMouseEvents) override;
+ bool accessKeyAction(bool sendMouseEvents) override;
#ifndef NDEBUG
virtual bool filterOutAnimatableAttribute(const QualifiedName&) const;