Commit a1608bb0 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Revert "Reland: Better support crosh"

This reverts commit 2f8d70bb.

Reason for revert: breaks text input in ARC++
Bug: 823233
Original change's description:
> Reland: Better support crosh
> 
> Rich editables should be skipped entirely (and not fall through to output).
> 
> Original change:
> - 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.
> 
> TBR=dmazzoni@chromium.org, dtseng@chromium.org
> 
> Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
> Change-Id: If555f157a7eeafe836929e9433891b2e7ae181df
> Reviewed-on: https://chromium-review.googlesource.com/953980
> Commit-Queue: David Tseng <dtseng@chromium.org>
> Reviewed-by: David Tseng <dtseng@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#541684}

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ic585ad279e461b2b7144904180e3b1cb140e1588
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Reviewed-on: https://chromium-review.googlesource.com/968741Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544054}
parent 4f6f6ba6
......@@ -436,10 +436,6 @@ DesktopAutomationHandler.prototype = {
evt.target.state[StateType.EDITABLE])
return;
// Skip richly editables.
if (evt.target.state[StateType.RICHLY_EDITABLE])
return;
// Delegate to the edit text handler if this is an editable.
if (evt.target.state[StateType.EDITABLE]) {
this.onEditableChanged_(evt);
......
......@@ -44,17 +44,7 @@ editing.TextEditHandler = function(node) {
this.node_ = node;
chrome.automation.getDesktop(function(desktop) {
// A rich text field is one where selection gets placed on a DOM descendant
// 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);
var useRichText = node.state[StateType.RICHLY_EDITABLE];
/** @private {!AutomationEditableText} */
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