New issue
Advanced search Search tips

Issue 923267 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 21
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Change content::TextInputState::value to string16.

Project Member Reported by yhanada@chromium.org, Jan 18 (4 days ago)

Issue description

content::TextInputState is a struct used in IPCs between renderer and browser to sync a state of a text input field.
The |value| field of the struct is in UTF-8 string, however both end[1][2][3] of the IPC use UTF-16 string. Changing it to base::string16 will remove unnecessary conversions.

[1]: https://cs.chromium.org/chromium/src/content/renderer/render_widget.cc?sq=package:chromium&g=0&l=1292
[2]: https://cs.chromium.org/chromium/src/content/browser/android/ime_adapter_android.cc?targetos=chromium-android&l=184
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 18 (4 days ago)

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

commit 1b19cf85d31ab9d7a6b9b035f478a39b74874789
Author: Yuichiro Hanada <yhanada@chromium.org>
Date: Fri Jan 18 16:12:26 2019

Change content::TextInputState::value to base::string16.

content::TextInputState is a struct used in IPCs between renderer and
browser to sync a state of a text input field.
The "value" field in the struct is in UTF-8 string, but both end of IPCs
use UTF-16 string. Changing the field to base::string16 removes
unnecessary conversions.

Bug:  923267 
Change-Id: Icaf868dfc3014b32e4fe01f12816bdc680314ac0
Reviewed-on: https://chromium-review.googlesource.com/c/1420487
Reviewed-by: Ehsan Karamad <ekaramad@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624146}
[modify] https://crrev.com/1b19cf85d31ab9d7a6b9b035f478a39b74874789/content/browser/android/ime_adapter_android.cc
[modify] https://crrev.com/1b19cf85d31ab9d7a6b9b035f478a39b74874789/content/common/text_input_state.h
[modify] https://crrev.com/1b19cf85d31ab9d7a6b9b035f478a39b74874789/content/public/test/text_input_test_utils.cc
[modify] https://crrev.com/1b19cf85d31ab9d7a6b9b035f478a39b74874789/content/renderer/render_widget.cc

Comment 2 by yhanada@chromium.org, Jan 21 (2 days ago)

Status: Fixed (was: Assigned)

Sign in to add a comment