Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Issue 919543003: Make Textfield::GetTextInputClient() return non-null, even if readonly (Closed)

Created:
5 years, 10 months ago by tapted
Modified:
5 years, 10 months ago
Reviewers:
msw, James Su
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, tfarina, penghuang+watch_chromium.org, nona+watch_chromium.org, James Su, chrome-apps-syd-reviews_chromium.org, mac-views-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@20150211-MacViews-TextfileTest-B-split-input-method
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make Textfield::GetTextInputClient() return non-null, even if readonly The TextInputClient is used to validate allowable operations in a textfield (e.g. cut/copy/paste). On a readonly textfield, Copy should work, but Cut/Paste should present to the user as being disabled. Currently, a read-only textfield returns null from GetTextInputClient(), making this validation impossible, except "inside" the textfield (e.g. Textfield::ShowContextMenuForView(..)). The logic originated in r80226, but doesn't seem to be for a specific reason. Note that TextInputClient::GetTextInputType() returns TEXT_INPUT_TYPE_NONE for readonly textfields, and a test is updated to check. BUG=454353 Committed: https://crrev.com/eecac90df29818ec6e57344bf1663ba001f599e7 Cr-Commit-Position: refs/heads/master@{#317711}

Patch Set 1 #

Total comments: 4

Patch Set 2 : More checks #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -2 lines) Patch
M ui/views/controls/textfield/textfield.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/textfield/textfield_unittest.cc View 1 1 chunk +13 lines, -1 line 0 comments Download

Messages

Total messages: 11 (4 generated)
tapted
Hi Michael, please take a look. (for more context, this is split off from a ...
5 years, 10 months ago (2015-02-11 10:51:25 UTC) #2
msw
lgtm with nits, but maybe wait for feedback from suzhe@. https://codereview.chromium.org/919543003/diff/1/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (left): https://codereview.chromium.org/919543003/diff/1/ui/views/controls/textfield/textfield.cc#oldcode703 ...
5 years, 10 months ago (2015-02-11 16:45:00 UTC) #4
tapted
suzhe - wdyt? https://codereview.chromium.org/919543003/diff/1/ui/views/controls/textfield/textfield.cc File ui/views/controls/textfield/textfield.cc (left): https://codereview.chromium.org/919543003/diff/1/ui/views/controls/textfield/textfield.cc#oldcode703 ui/views/controls/textfield/textfield.cc:703: return read_only_ ? NULL : this; ...
5 years, 10 months ago (2015-02-11 23:29:09 UTC) #6
tapted
Just an update on this. I raised this CL with James when we had a ...
5 years, 10 months ago (2015-02-19 11:27:11 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/919543003/20001
5 years, 10 months ago (2015-02-24 00:32:13 UTC) #9
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 10 months ago (2015-02-24 01:06:06 UTC) #10
commit-bot: I haz the power
5 years, 10 months ago (2015-02-24 01:06:39 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/eecac90df29818ec6e57344bf1663ba001f599e7
Cr-Commit-Position: refs/heads/master@{#317711}

Powered by Google App Engine
This is Rietveld 408576698