New issue
Advanced search Search tips

Issue 742491 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

chrome --mash hangs when loading page with 'contenteditable'

Project Member Reported by toniki...@chromium.org, Jul 13 2017

Issue description

- (off device) ChromeOS build (Ozone)  

- launch chrome --mash (or chrome --mus --use-ime-service)

- Load any page with 'contenteditable' content: e.g. https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_global_contenteditable

- wait till it finishes loading so user can edit/browse regularly.

ACTUAL OUTCOME: chrome hangs.

EXPECTED OUTCOME: chrome works just fine.
 
Owner: toniki...@chromium.org
Status: Started (was: Untriaged)
https://chromium-review.googlesource.com/c/570056/
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1bd7abc4753464b2af466ba95eb6ccd9327f76f0

commit 1bd7abc4753464b2af466ba95eb6ccd9327f76f0
Author: Antonio Gomes <tonikitoo@igalia.com>
Date: Mon Jul 17 04:44:48 2017

Add entries for content editable and date/time field in Mojo's text input state

Both chrome --mash and chrome --mus --use-ime-service use
InputMethodMus for IME. In such cases, pages with 'content editable'
elements simply hang with the following error and stack trace:

  [ERROR:validation_errors.cc(90)] Invalid message: VALIDATION_ERROR_UNKNOWN_ENUM_VALUE

  #1 0x56228f4e5a9e mojo::internal::ReportValidationError()
  #2 0x56228c7ee648 mojo::internal::TextInputState_Data::Validate()
  #3 0x56228c7e2da9 ui::mojom::internal::WindowTree_SetImeVisibility_Params_Data::Validate()
  #4 0x56228c9dfbe2 ui::mojom::WindowTreeRequestValidator::Accept()
  #5 0x56228f4d423c mojo::FilterChain::Accept()
  #6 0x56228f4d5755 mojo::InterfaceEndpointClient::HandleIncomingMessage()
  #7 0x56228f4dc84c mojo::internal::MultiplexRouter::ProcessIncomingMessage()
  #8 0x56228f4dc03f mojo::internal::MultiplexRouter::Accept()
  #9 0x56228f4d4256 mojo::FilterChain::Accept()
  (...)

This happens because in InputMethodMus::UpdateTextInputType,
ui::TextInputType::TEXT_INPUT_TYPE_CONTENT_EDITABLE is the value
(correctly) used to construct the mojo::TextInputState instance
to be sent to Mus.
Down the road, WindowTreeClient::SetImeVisibility calls out to Mus
passing the mojo::TextInputState instance created previously.

At the mojo validation step, it fails (see stack above) because
text_input_state.mojom does not declare CONTENT_EDITABLE
(see IsKnownValue impl in <out>/gen/ui/platform_window/mojo/text_input_state.mojom-shared-internal.h).

Patch fixes this by syncing up ui::TextInputType, blink::WebTextInputType
and mojo::TextInputType.

PS: For the sake of completeness, DATE_TIME_FIELD enum item was added,
    and mojo::TextInputType::LAST is renamed to ::MAX in order to be able to
    compile assert it against ui::TEXT_INPUT_TYPE_MAX.

TEST=load any page with 'contenteditable' attr, in chrome --mash.

BUG= 718105 , 742491 

Change-Id: Icbea847e7fc655ca3c04243fefb8d67abaaa9239
Reviewed-on: https://chromium-review.googlesource.com/570056
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487025}
[modify] https://crrev.com/1bd7abc4753464b2af466ba95eb6ccd9327f76f0/ui/platform_window/mojo/OWNERS
[modify] https://crrev.com/1bd7abc4753464b2af466ba95eb6ccd9327f76f0/ui/platform_window/mojo/ime_type_converters.cc
[modify] https://crrev.com/1bd7abc4753464b2af466ba95eb6ccd9327f76f0/ui/platform_window/mojo/text_input_state.mojom

Comment 3 by sky@chromium.org, Jul 17 2017

Status: Fixed (was: Started)

Sign in to add a comment