commit | 4ce56a67280474c66724cab62195a6a524bb741d | [log] [tgz] |
---|---|---|
author | Xiaodan Zhu <zxdan@chromium.org> | Thu Dec 22 19:48:53 2022 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Dec 22 19:48:53 2022 |
tree | 9636448889f6b9d19c0153e7c005506cedcb07fb | |
parent | bdb63397ec033992bff4f7eadb1597789d6a8f3d [diff] |
cros_next: add system textfield component This cl creates a system textfield component with material design. The changes are summarized below: - Add a SystemTextfield class extending views::Textfield. Comparing with views::Textfield, SystemTextfield has specific small, medium, and large sizes and applies dynamic colors. - Add a SystemTextfieldController class extending views::TextfieldController. It defines unified system UI textfield behaviors: 1. When the textfield just gets focused with Tab key, it will not be activated until the user presses RETURN. 2. Clicking the textfield will both focus and activate the textfield. Single clicking will highlight all the text. 3. While editing the textfield, pressing RETURN will commit the changes and deactivate the textfield but keep focus. 4. While editing the textfield, pressing ESCAPE will discard the changes and deactivate the textfield but keep focus. 5. The focus ring would only show on activated. Corresponding unit test will be added in the following cl. Bug: b/252362180 Change-Id: I8b9b7349a4617b88d225f5272d5b2891c7a9d4ae Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4054274 Reviewed-by: Xiaoqian Dai <xdai@chromium.org> Commit-Queue: Xiaodan Zhu <zxdan@chromium.org> Cr-Commit-Position: refs/heads/main@{#1086473}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.