Commit 042a8dcc authored by David Tseng's avatar David Tseng Committed by Commit Bot

Revert "Better support crosh"

This reverts commit d6d6b05f.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Better support crosh
> 
> - value change events often fire on richly editable text fields. We do not really use this in the state machine for rich text, so ignore it. It often causes poor state transitions e.g. speaking "deleted" in crosh when typing.
> - use the AutomationRichEditableText class in more cases. This acknowledges the usage in the wild where a page author can set role textbox on any node. When they do this it is assumed they manage a DOM selection unless they set the role on either an input or textarea where the browser does this on their behalf.
> 
> Test: chromevox_tests --gtest_filter=Editing*.*. Manually on crosh, by typing into the text field.
> Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
> Change-Id: I8a9cf31e8834434ade0960d5e0b3045a664bc7ca
> Reviewed-on: https://chromium-review.googlesource.com/952193
> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
> Commit-Queue: David Tseng <dtseng@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#541378}

TBR=dmazzoni@chromium.org,dtseng@chromium.org

Change-Id: I3a3d196e9dfefdaed96fb098c6ecaf8cc5643d82
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Reviewed-on: https://chromium-review.googlesource.com/954042Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541629}
parent a77ef710
...@@ -440,8 +440,7 @@ DesktopAutomationHandler.prototype = { ...@@ -440,8 +440,7 @@ DesktopAutomationHandler.prototype = {
return; return;
// Delegate to the edit text handler if this is an editable. // Delegate to the edit text handler if this is an editable.
if (evt.target.state[StateType.EDITABLE] && if (evt.target.state[StateType.EDITABLE]) {
!evt.target.state[StateType.RICHLY_EDITABLE]) {
this.onEditableChanged_(evt); this.onEditableChanged_(evt);
return; return;
} }
......
...@@ -44,17 +44,7 @@ editing.TextEditHandler = function(node) { ...@@ -44,17 +44,7 @@ editing.TextEditHandler = function(node) {
this.node_ = node; this.node_ = node;
chrome.automation.getDesktop(function(desktop) { chrome.automation.getDesktop(function(desktop) {
// A rich text field is one where selection gets placed on a DOM descendant var useRichText = node.state[StateType.RICHLY_EDITABLE];
// to a root text field. This is one of:
// - content editables (detected via richly editable state)
// - role textbox without native text field support (i.e. not an input or
// textarea)
//
// For any of these, it must not be something from the desktop tree where we
// currently do not have rich text fields.
var useRichText = node.state[StateType.RICHLY_EDITABLE] ||
(node.htmlTag != 'input' && node.htmlTag != 'textarea' && node.root &&
node.root.role != RoleType.DESKTOP);
/** @private {!AutomationEditableText} */ /** @private {!AutomationEditableText} */
this.editableText_ = useRichText ? new AutomationRichEditableText(node) : this.editableText_ = useRichText ? new AutomationRichEditableText(node) :
......
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