Changeset 259687 in webkit


Ignore:
Timestamp:
Apr 7, 2020 4:43:29 PM (4 years ago)
Author:
Chris Fleizach
Message:

AX: VoiceOver can't activate combobox when textfield is inside it
https://bugs.webkit.org/show_bug.cgi?id=210081

Reviewed by Joanmarie Diggs.

Source/WebCore:

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:

LayoutTests:

  • accessibility/activation-of-input-field-inside-other-element-expected.txt: Added.
  • accessibility/activation-of-input-field-inside-other-element.html: Added.
Location:
trunk
Files:
2 added
41 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r259686 r259687  
     12020-04-07  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: VoiceOver can't activate combobox when textfield is inside it
     4        https://bugs.webkit.org/show_bug.cgi?id=210081
     5
     6        Reviewed by Joanmarie Diggs.
     7
     8        * accessibility/activation-of-input-field-inside-other-element-expected.txt: Added.
     9        * accessibility/activation-of-input-field-inside-other-element.html: Added.
     10
    1112020-04-07  Jason Lawrence  <lawrence.j@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r259680 r259687  
     12020-04-07  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: VoiceOver can't activate combobox when textfield is inside it
     4        https://bugs.webkit.org/show_bug.cgi?id=210081
     5
     6        Reviewed by Joanmarie Diggs.
     7
     8        Change accessKeyAction to return whether a simulated click event was dispatched.
     9        Accessibility uses that information to decide whether it should sent an event afterwards, because
     10        some objects accessKeyAction is only to focus(). AX is expected here to press on the object (and possibly focus).
     11
     12        Test: accessibility/activation-of-input-field-inside-other-element.html
     13
     14        * accessibility/AccessibilityObject.cpp:
     15        (WebCore::AccessibilityObject::press):
     16        * dom/Element.h:
     17        (WebCore::Element::accessKeyAction):
     18        * html/BaseCheckableInputType.cpp:
     19        (WebCore::BaseCheckableInputType::accessKeyAction):
     20        * html/BaseCheckableInputType.h:
     21        * html/BaseChooserOnlyDateAndTimeInputType.cpp:
     22        (WebCore::BaseChooserOnlyDateAndTimeInputType::accessKeyAction):
     23        * html/BaseChooserOnlyDateAndTimeInputType.h:
     24        * html/BaseClickableWithKeyInputType.cpp:
     25        (WebCore::BaseClickableWithKeyInputType::accessKeyAction):
     26        * html/BaseClickableWithKeyInputType.h:
     27        * html/HTMLAnchorElement.cpp:
     28        (WebCore::HTMLAnchorElement::accessKeyAction):
     29        * html/HTMLAnchorElement.h:
     30        * html/HTMLButtonElement.cpp:
     31        (WebCore::HTMLButtonElement::accessKeyAction):
     32        * html/HTMLButtonElement.h:
     33        * html/HTMLElement.cpp:
     34        (WebCore::HTMLElement::accessKeyAction):
     35        * html/HTMLElement.h:
     36        * html/HTMLInputElement.cpp:
     37        (WebCore::HTMLInputElement::accessKeyAction):
     38        * html/HTMLInputElement.h:
     39        * html/HTMLLabelElement.cpp:
     40        (WebCore::HTMLLabelElement::accessKeyAction):
     41        * html/HTMLLabelElement.h:
     42        * html/HTMLLegendElement.cpp:
     43        (WebCore::HTMLLegendElement::accessKeyAction):
     44        * html/HTMLLegendElement.h:
     45        * html/HTMLOptGroupElement.cpp:
     46        (WebCore::HTMLOptGroupElement::accessKeyAction):
     47        * html/HTMLOptGroupElement.h:
     48        * html/HTMLOptionElement.cpp:
     49        (WebCore::HTMLOptionElement::accessKeyAction):
     50        * html/HTMLOptionElement.h:
     51        * html/HTMLSelectElement.cpp:
     52        (WebCore::HTMLSelectElement::accessKeyAction):
     53        * html/HTMLSelectElement.h:
     54        * html/HTMLTextAreaElement.cpp:
     55        (WebCore::HTMLTextAreaElement::accessKeyAction):
     56        * html/HTMLTextAreaElement.h:
     57        * html/HiddenInputType.cpp:
     58        (WebCore::HiddenInputType::accessKeyAction):
     59        * html/HiddenInputType.h:
     60        * html/InputType.cpp:
     61        (WebCore::InputType::accessKeyAction):
     62        * html/InputType.h:
     63        * html/RangeInputType.cpp:
     64        (WebCore::RangeInputType::accessKeyAction):
     65        * html/RangeInputType.h:
     66        * svg/SVGElement.cpp:
     67        (WebCore::SVGElement::accessKeyAction):
     68        * svg/SVGElement.h:
     69
    1702020-04-07  Jiewen Tan  <jiewen_tan@apple.com>
    271
  • trunk/Source/WebCore/accessibility/AccessibilityObject.cpp

    r259401 r259687  
    906906    UserGestureIndicator gestureIndicator(ProcessingUserGesture, document);
    907907   
    908     bool dispatchedTouchEvent = false;
     908    bool dispatchedEvent = false;
    909909#if PLATFORM(IOS_FAMILY)
    910910    if (hasTouchEventListener())
    911         dispatchedTouchEvent = dispatchTouchEvent();
     911        dispatchedEvent = dispatchTouchEvent();
    912912#endif
    913     if (!dispatchedTouchEvent)
    914         pressElement->accessKeyAction(true);
    915    
    916     return true;
     913   
     914    return dispatchedEvent || pressElement->accessKeyAction(true) || pressElement->dispatchSimulatedClick(nullptr, SendMouseUpDownEvents);
    917915}
    918916   
  • trunk/Source/WebCore/dom/Element.cpp

    r259581 r259687  
    420420}
    421421
    422 void Element::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEventOptions eventOptions, SimulatedClickVisualOptions visualOptions)
    423 {
    424     simulateClick(*this, underlyingEvent, eventOptions, visualOptions, SimulatedClickSource::UserAgent);
     422bool Element::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEventOptions eventOptions, SimulatedClickVisualOptions visualOptions)
     423{
     424    return simulateClick(*this, underlyingEvent, eventOptions, visualOptions, SimulatedClickSource::UserAgent);
    425425}
    426426
  • trunk/Source/WebCore/dom/Element.h

    r259557 r259687  
    382382    Locale& locale() const;
    383383
    384     virtual void accessKeyAction(bool /*sendToAnyEvent*/) { }
     384    virtual bool accessKeyAction(bool /*sendToAnyEvent*/) { return false; }
    385385
    386386    virtual bool isURLAttribute(const Attribute&) const { return false; }
     
    530530    bool dispatchWheelEvent(const PlatformWheelEvent&);
    531531    bool dispatchKeyEvent(const PlatformKeyboardEvent&);
    532     void dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEventOptions = SendNoEvents, SimulatedClickVisualOptions = ShowPressedLook);
     532    bool dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEventOptions = SendNoEvents, SimulatedClickVisualOptions = ShowPressedLook);
    533533    void dispatchFocusInEvent(const AtomString& eventType, RefPtr<Element>&& oldFocusedElement);
    534534    void dispatchFocusOutEvent(const AtomString& eventType, RefPtr<Element>&& newFocusedElement);
  • trunk/Source/WebCore/dom/SimulatedClick.cpp

    r254029 r259687  
    8282}
    8383
    84 void simulateClick(Element& element, Event* underlyingEvent, SimulatedClickMouseEventOptions mouseEventOptions, SimulatedClickVisualOptions visualOptions, SimulatedClickSource creationOptions)
     84bool simulateClick(Element& element, Event* underlyingEvent, SimulatedClickMouseEventOptions mouseEventOptions, SimulatedClickVisualOptions visualOptions, SimulatedClickSource creationOptions)
    8585{
    8686    if (element.isDisabledFormControl())
    87         return;
     87        return false;
    8888
    8989    static NeverDestroyed<HashSet<Element*>> elementsDispatchingSimulatedClicks;
    9090    if (!elementsDispatchingSimulatedClicks.get().add(&element).isNewEntry)
    91         return;
     91        return false;
    9292
    9393    if (mouseEventOptions == SendMouseOverUpDownEvents)
     
    104104
    105105    elementsDispatchingSimulatedClicks.get().remove(&element);
     106    return true;
    106107}
    107108
  • trunk/Source/WebCore/dom/SimulatedClick.h

    r208179 r259687  
    3838};
    3939
    40 void simulateClick(Element&, Event* underlyingEvent, SimulatedClickMouseEventOptions, SimulatedClickVisualOptions, SimulatedClickSource);
     40bool simulateClick(Element&, Event* underlyingEvent, SimulatedClickMouseEventOptions, SimulatedClickVisualOptions, SimulatedClickSource);
    4141
    4242} // namespace WebCore
  • trunk/Source/WebCore/html/BaseCheckableInputType.cpp

    r246490 r259687  
    9292
    9393// FIXME: Could share this with BaseClickableWithKeyInputType and RangeInputType if we had a common base class.
    94 void BaseCheckableInputType::accessKeyAction(bool sendMouseEvents)
     94bool BaseCheckableInputType::accessKeyAction(bool sendMouseEvents)
    9595{
    96     InputType::accessKeyAction(sendMouseEvents);
    97 
    9896    ASSERT(element());
    99     element()->dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
     97    return InputType::accessKeyAction(sendMouseEvents) || element()->dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
    10098}
    10199
  • trunk/Source/WebCore/html/BaseCheckableInputType.h

    r242518 r259687  
    4848    void handleKeypressEvent(KeyboardEvent&) override;
    4949    bool canSetStringValue() const override;
    50     void accessKeyAction(bool sendMouseEvents) override;
     50    bool accessKeyAction(bool sendMouseEvents) override;
    5151    String fallbackValue() const override;
    5252    bool storesValueSeparateFromAttribute() override;
  • trunk/Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp

    r246490 r259687  
    131131}
    132132
    133 void BaseChooserOnlyDateAndTimeInputType::accessKeyAction(bool sendMouseEvents)
     133bool BaseChooserOnlyDateAndTimeInputType::accessKeyAction(bool sendMouseEvents)
    134134{
    135135    BaseDateAndTimeInputType::accessKeyAction(sendMouseEvents);
    136136    ASSERT(element());
    137     BaseClickableWithKeyInputType::accessKeyAction(*element(), sendMouseEvents);
     137    return BaseClickableWithKeyInputType::accessKeyAction(*element(), sendMouseEvents);
    138138}
    139139
  • trunk/Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.h

    r242518 r259687  
    5353    void handleKeypressEvent(KeyboardEvent&) override;
    5454    void handleKeyupEvent(KeyboardEvent&) override;
    55     void accessKeyAction(bool sendMouseEvents) override;
     55    bool accessKeyAction(bool sendMouseEvents) override;
    5656    bool isMouseFocusable() const override;
    5757    void attributeChanged(const QualifiedName&) override;
  • trunk/Source/WebCore/html/BaseClickableWithKeyInputType.cpp

    r242518 r259687  
    7676
    7777// FIXME: Could share this with BaseCheckableInputType and RangeInputType if we had a common base class.
    78 void BaseClickableWithKeyInputType::accessKeyAction(HTMLInputElement& element, bool sendMouseEvents)
     78bool BaseClickableWithKeyInputType::accessKeyAction(HTMLInputElement& element, bool sendMouseEvents)
    7979{
    80     element.dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
     80    return element.dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
    8181}
    8282
     
    9898}
    9999
    100 void BaseClickableWithKeyInputType::accessKeyAction(bool sendMouseEvents)
     100bool BaseClickableWithKeyInputType::accessKeyAction(bool sendMouseEvents)
    101101{
    102102    InputType::accessKeyAction(sendMouseEvents);
    103103    ASSERT(element());
    104     accessKeyAction(*element(), sendMouseEvents);
     104    return accessKeyAction(*element(), sendMouseEvents);
    105105}
    106106
  • trunk/Source/WebCore/html/BaseClickableWithKeyInputType.h

    r242518 r259687  
    4141    static void handleKeypressEvent(HTMLInputElement&, KeyboardEvent&);
    4242    static void handleKeyupEvent(InputType&, KeyboardEvent&);
    43     static void accessKeyAction(HTMLInputElement&, bool sendMouseEvents);
     43    static bool accessKeyAction(HTMLInputElement&, bool sendMouseEvents);
    4444   
    4545protected:
     
    5050    void handleKeypressEvent(KeyboardEvent&) override;
    5151    void handleKeyupEvent(KeyboardEvent&) override;
    52     void accessKeyAction(bool sendMouseEvents) override;
     52    bool accessKeyAction(bool sendMouseEvents) override;
    5353};
    5454
  • trunk/Source/WebCore/html/HTMLAnchorElement.cpp

    r258140 r259687  
    275275}
    276276
    277 void HTMLAnchorElement::accessKeyAction(bool sendMouseEvents)
    278 {
    279     dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
     277bool HTMLAnchorElement::accessKeyAction(bool sendMouseEvents)
     278{
     279    return dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
    280280}
    281281
  • trunk/Source/WebCore/html/HTMLAnchorElement.h

    r257707 r259687  
    8989    void defaultEventHandler(Event&) final;
    9090    void setActive(bool active = true, bool pause = false) final;
    91     void accessKeyAction(bool sendMouseEvents) final;
     91    bool accessKeyAction(bool sendMouseEvents) final;
    9292    bool isURLAttribute(const Attribute&) const final;
    9393    bool canStartSelection() const final;
  • trunk/Source/WebCore/html/HTMLButtonElement.cpp

    r248914 r259687  
    212212}
    213213
    214 void HTMLButtonElement::accessKeyAction(bool sendMouseEvents)
     214bool HTMLButtonElement::accessKeyAction(bool sendMouseEvents)
    215215{
    216216    focus();
    217217
    218     dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
     218    return dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
    219219}
    220220
  • trunk/Source/WebCore/html/HTMLButtonElement.h

    r249194 r259687  
    6969    void setActivatedSubmit(bool flag) final;
    7070
    71     void accessKeyAction(bool sendMouseEvents) final;
     71    bool accessKeyAction(bool sendMouseEvents) final;
    7272    bool isURLAttribute(const Attribute&) const final;
    7373
  • trunk/Source/WebCore/html/HTMLElement.cpp

    r257188 r259687  
    706706}
    707707
    708 void HTMLElement::accessKeyAction(bool sendMouseEvents)
    709 {
    710     dispatchSimulatedClick(nullptr, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
     708bool HTMLElement::accessKeyAction(bool sendMouseEvents)
     709{
     710    return dispatchSimulatedClick(nullptr, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
    711711}
    712712
  • trunk/Source/WebCore/html/HTMLElement.h

    r257188 r259687  
    6767    WEBCORE_EXPORT void click();
    6868
    69     void accessKeyAction(bool sendMouseEvents) override;
     69    bool accessKeyAction(bool sendMouseEvents) override;
    7070
    7171    RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r259402 r259687  
    667667}
    668668
    669 void HTMLInputElement::accessKeyAction(bool sendMouseEvents)
     669bool HTMLInputElement::accessKeyAction(bool sendMouseEvents)
    670670{
    671671    Ref<InputType> protectedInputType(*m_inputType);
    672     protectedInputType->accessKeyAction(sendMouseEvents);
     672    return protectedInputType->accessKeyAction(sendMouseEvents);
    673673}
    674674
  • trunk/Source/WebCore/html/HTMLInputElement.h

    r259402 r259687  
    392392    bool canStartSelection() const final;
    393393
    394     void accessKeyAction(bool sendMouseEvents) final;
     394    bool accessKeyAction(bool sendMouseEvents) final;
    395395
    396396    void parseAttribute(const QualifiedName&, const AtomString&) final;
  • trunk/Source/WebCore/html/HTMLLabelElement.cpp

    r249194 r259687  
    190190}
    191191
    192 void HTMLLabelElement::accessKeyAction(bool sendMouseEvents)
    193 {
    194     if (auto element = control())
    195         element->accessKeyAction(sendMouseEvents);
    196     else
    197         HTMLElement::accessKeyAction(sendMouseEvents);
     192bool HTMLLabelElement::accessKeyAction(bool sendMouseEvents)
     193{
     194    if (auto element = control())
     195        return element->accessKeyAction(sendMouseEvents);
     196
     197    return HTMLElement::accessKeyAction(sendMouseEvents);
    198198}
    199199
  • trunk/Source/WebCore/html/HTMLLabelElement.h

    r249194 r259687  
    4343    bool isEventTargetedAtInteractiveDescendants(Event&) const;
    4444
    45     void accessKeyAction(bool sendMouseEvents) final;
     45    bool accessKeyAction(bool sendMouseEvents) final;
    4646
    4747    // Overridden to update the hover/active state of the corresponding control.
  • trunk/Source/WebCore/html/HTMLLegendElement.cpp

    r229694 r259687  
    7373}
    7474
    75 void HTMLLegendElement::accessKeyAction(bool sendMouseEvents)
     75bool HTMLLegendElement::accessKeyAction(bool sendMouseEvents)
    7676{
    7777    if (auto control = associatedControl())
    78         control->accessKeyAction(sendMouseEvents);
     78        return control->accessKeyAction(sendMouseEvents);
     79    return false;
    7980}
    8081
  • trunk/Source/WebCore/html/HTMLLegendElement.h

    r229694 r259687  
    4343    RefPtr<HTMLFormControlElement> associatedControl();
    4444
    45     void accessKeyAction(bool sendMouseEvents) final;
     45    bool accessKeyAction(bool sendMouseEvents) final;
    4646    void focus(bool restorePreviousSelection, FocusDirection) final;
    4747};
  • trunk/Source/WebCore/html/HTMLOptGroupElement.cpp

    r257188 r259687  
    113113}
    114114
    115 void HTMLOptGroupElement::accessKeyAction(bool)
     115bool HTMLOptGroupElement::accessKeyAction(bool)
    116116{
    117117    RefPtr<HTMLSelectElement> select = ownerSelectElement();
    118118    // send to the parent to bring focus to the list box
    119119    if (select && !select->focused())
    120         select->accessKeyAction(false);
     120        return select->accessKeyAction(false);
     121    return false;
    121122}
    122123
  • trunk/Source/WebCore/html/HTMLOptGroupElement.h

    r246490 r259687  
    5050    void childrenChanged(const ChildChange&) final;
    5151
    52     void accessKeyAction(bool sendMouseEvents) final;
     52    bool accessKeyAction(bool sendMouseEvents) final;
    5353
    5454    void recalcSelectOptions();
  • trunk/Source/WebCore/html/HTMLOptionElement.cpp

    r257199 r259687  
    136136}
    137137
    138 void HTMLOptionElement::accessKeyAction(bool)
     138bool HTMLOptionElement::accessKeyAction(bool)
    139139{
    140140    RefPtr<HTMLSelectElement> select = ownerSelectElement();
    141     if (select)
     141    if (select) {
    142142        select->accessKeySetSelectedIndex(index());
     143        return true;
     144    }
     145    return false;
    143146}
    144147
  • trunk/Source/WebCore/html/HTMLOptionElement.h

    r257188 r259687  
    7373
    7474    InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
    75     void accessKeyAction(bool) final;
     75    bool accessKeyAction(bool) final;
    7676
    7777    void childrenChanged(const ChildChange&) final;
  • trunk/Source/WebCore/html/HTMLSelectElement.cpp

    r257839 r259687  
    391391}
    392392
    393 void HTMLSelectElement::accessKeyAction(bool sendMouseEvents)
     393bool HTMLSelectElement::accessKeyAction(bool sendMouseEvents)
    394394{
    395395    focus();
    396     dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
     396    return dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
    397397}
    398398
  • trunk/Source/WebCore/html/HTMLSelectElement.h

    r249194 r259687  
    7474    WEBCORE_EXPORT const Vector<HTMLElement*>& listItems() const;
    7575
    76     void accessKeyAction(bool sendMouseEvents) final;
     76    bool accessKeyAction(bool sendMouseEvents) final;
    7777    void accessKeySetSelectedIndex(int);
    7878
  • trunk/Source/WebCore/html/HTMLTextAreaElement.cpp

    r259401 r259687  
    501501}
    502502
    503 void HTMLTextAreaElement::accessKeyAction(bool)
     503bool HTMLTextAreaElement::accessKeyAction(bool)
    504504{
    505505    focus();
     506    return false;
    506507}
    507508
  • trunk/Source/WebCore/html/HTMLTextAreaElement.h

    r249194 r259687  
    121121    void updateFocusAppearance(SelectionRestorationMode, SelectionRevealMode) final;
    122122
    123     void accessKeyAction(bool sendMouseEvents) final;
     123    bool accessKeyAction(bool sendMouseEvents) final;
    124124
    125125    bool shouldUseInputMethod() final;
  • trunk/Source/WebCore/html/HiddenInputType.cpp

    r246490 r259687  
    7474}
    7575
    76 void HiddenInputType::accessKeyAction(bool)
     76bool HiddenInputType::accessKeyAction(bool)
    7777{
     78    return false;
    7879}
    7980
  • trunk/Source/WebCore/html/HiddenInputType.h

    r249194 r259687  
    4545    bool supportsValidation() const override;
    4646    RenderPtr<RenderElement> createInputRenderer(RenderStyle&&) override;
    47     void accessKeyAction(bool sendMouseEvents) override;
     47    bool accessKeyAction(bool sendMouseEvents) override;
    4848    bool rendererIsNeeded() override;
    4949    bool storesValueSeparateFromAttribute() override;
  • trunk/Source/WebCore/html/InputType.cpp

    r259402 r259687  
    593593}
    594594
    595 void InputType::accessKeyAction(bool)
     595bool InputType::accessKeyAction(bool)
    596596{
    597597    ASSERT(element());
    598598    element()->focus(false);
     599    return false;
    599600}
    600601
  • trunk/Source/WebCore/html/InputType.h

    r259402 r259687  
    206206    virtual void handleFocusEvent(Node* oldFocusedNode, FocusDirection);
    207207    virtual void handleBlurEvent();
    208     virtual void accessKeyAction(bool sendMouseEvents);
     208    virtual bool accessKeyAction(bool sendMouseEvents);
    209209    virtual bool canBeSuccessfulSubmitButton();
    210210    virtual void subtreeHasChanged();
  • trunk/Source/WebCore/html/RangeInputType.cpp

    r259402 r259687  
    316316
    317317// FIXME: Could share this with BaseClickableWithKeyInputType and BaseCheckableInputType if we had a common base class.
    318 void RangeInputType::accessKeyAction(bool sendMouseEvents)
    319 {
    320     InputType::accessKeyAction(sendMouseEvents);
    321 
    322     if (auto* element = this->element())
    323         element->dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
     318bool RangeInputType::accessKeyAction(bool sendMouseEvents)
     319{
     320    auto* element = this->element();
     321    return InputType::accessKeyAction(sendMouseEvents) || (element && element->dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents));
    324322}
    325323
  • trunk/Source/WebCore/html/RangeInputType.h

    r259402 r259687  
    5757    Decimal parseToNumber(const String&, const Decimal&) const final;
    5858    String serialize(const Decimal&) const final;
    59     void accessKeyAction(bool sendMouseEvents) final;
     59    bool accessKeyAction(bool sendMouseEvents) final;
    6060    void attributeChanged(const QualifiedName&) final;
    6161    void setValue(const String&, bool valueChanged, TextFieldEventBehavior) final;
  • trunk/Source/WebCore/svg/SVGElement.cpp

    r259031 r259687  
    936936}
    937937
    938 void SVGElement::accessKeyAction(bool sendMouseEvents)
    939 {
    940     dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
     938bool SVGElement::accessKeyAction(bool sendMouseEvents)
     939{
     940    return dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEvents);
    941941}
    942942
  • trunk/Source/WebCore/svg/SVGElement.h

    r258464 r259687  
    180180
    181181    void buildPendingResourcesIfNeeded();
    182     void accessKeyAction(bool sendMouseEvents) override;
     182    bool accessKeyAction(bool sendMouseEvents) override;
    183183
    184184#ifndef NDEBUG
Note: See TracChangeset for help on using the changeset viewer.