Commit cfd5aaaa authored by Nektarios Paisios's avatar Nektarios Paisios Committed by Commit Bot

In the address bar IA2_TEXT_CARET_MOVED should fire after the location of the...

In the address bar IA2_TEXT_CARET_MOVED should fire after the location of the caret has actually changed

Bug affecting Zoomtext and caret tracking.
1. We were firing selection changed events before the input method had been notified that the position of the caret had been moved and so before AXSystemCaretWin had a chance to update its location.
2. IA2_TEXT_CARET_MOVED and selection changed events on other platforms should also fire when the text selection is changed without changing the caret offset in the text, because the actual location of the caret on screen will actually move.
R=dmazzoni@chromium.org

Bug: 
Change-Id: I129b677f4e72a9e1564e63de875611a379a267a4
Reviewed-on: https://chromium-review.googlesource.com/767590Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516387}
parent eca75901
...@@ -1968,7 +1968,6 @@ void Textfield::UpdateAfterChange(bool text_changed, bool cursor_changed) { ...@@ -1968,7 +1968,6 @@ void Textfield::UpdateAfterChange(bool text_changed, bool cursor_changed) {
if (cursor_changed) { if (cursor_changed) {
UpdateCursorViewPosition(); UpdateCursorViewPosition();
UpdateCursorVisibility(); UpdateCursorVisibility();
NotifyAccessibilityEvent(ui::AX_EVENT_TEXT_SELECTION_CHANGED, true);
} }
if (text_changed || cursor_changed) { if (text_changed || cursor_changed) {
OnCaretBoundsChanged(); OnCaretBoundsChanged();
...@@ -2036,6 +2035,7 @@ void Textfield::OnCaretBoundsChanged() { ...@@ -2036,6 +2035,7 @@ void Textfield::OnCaretBoundsChanged() {
GetInputMethod()->OnCaretBoundsChanged(this); GetInputMethod()->OnCaretBoundsChanged(this);
if (touch_selection_controller_) if (touch_selection_controller_)
touch_selection_controller_->SelectionChanged(); touch_selection_controller_->SelectionChanged();
NotifyAccessibilityEvent(ui::AX_EVENT_TEXT_SELECTION_CHANGED, true);
} }
void Textfield::OnBeforeUserAction() { void Textfield::OnBeforeUserAction() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment