AX: Selection change as a result of focusing an element should include that
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jul 2015 03:34:36 +0000 (03:34 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jul 2015 03:34:36 +0000 (03:34 +0000)
commit030eb2cc91546446313ceecc90235cafa710ac28
treee2db9acf5ccad855085c6adc636abb3750767b34
parent2265d3aa4ca7247b98a2d0843052692ed64e0adc
AX: Selection change as a result of focusing an element should include that
information in the intent
https://bugs.webkit.org/show_bug.cgi?id=146533

Patch by Doug Russell <d_russell@apple.com> on 2015-07-02
Reviewed by Chris Fleizach.

Added focusChange flag to AXTextStateChangeIntent.
Added intent support to selection logic called by Element::updateFocusAppearance().
Added NSAccessibilityTextSelectionChangedFocus to mac notifications.

Source/WebCore:

Test: platform/mac/accessibility/selection-notification-focus-change.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::postTextStateChangeNotification):
* accessibility/AXTextStateChangeIntent.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::setTextSelectionIntent):
(WebCore::AccessibilityRenderObject::setFocused):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
* dom/Element.cpp:
(WebCore::Element::updateFocusAppearance):
* dom/Element.h:
(WebCore::Element::defaultFocusTextStateChangeIntent):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::moveWithoutValidationTo):
(WebCore::FrameSelection::setSelectionByMouseIfDifferent):
(WebCore::FrameSelection::selectAll):
* editing/FrameSelection.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateFocusAppearance):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::updateFocusAppearance):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::select):
(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::restoreCachedSelection):
* html/HTMLTextFormControlElement.h:
* page/EventHandler.cpp:
(WebCore::setInitialKeyboardSelection):
* page/FocusController.cpp:
(WebCore::FocusController::advanceFocusInDocumentOrder):

LayoutTests:

* platform/mac/accessibility/selection-notification-focus-change-expected.txt: Added.
* platform/mac/accessibility/selection-notification-focus-change.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/selection-notification-focus-change-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/selection-notification-focus-change.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/AXTextStateChangeIntent.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/editing/FrameSelection.h
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.h
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/FocusController.cpp