DescriptionMake 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 #
Messages
Total messages: 11 (4 generated)
|