Commit 909901eb authored by Yu Han's avatar Yu Han Committed by Chromium LUCI CQ

[Controls Refresh Android] Fixes input missing border

Prior to this CL, controls-refresh text input is missing its border.

The fix is to make sure property text_field.has_border is passed to
native theme. This property is only used by form controls-refresh
so it has no impact on existing text input.

Bug: 1155397
Change-Id: I3cacd4d9550e10388b15122d7ff94a32ffa5e39d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612495Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
Reviewed-by: default avatarMason Freed <masonfreed@chromium.org>
Commit-Queue: Yu Han <yuzhehan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841106}
parent d677823e
...@@ -158,6 +158,25 @@ IN_PROC_BROWSER_TEST_F(FormControlsBrowserTest, Radio) { ...@@ -158,6 +158,25 @@ IN_PROC_BROWSER_TEST_F(FormControlsBrowserTest, Radio) {
/* screenshot_height */ 40); /* screenshot_height */ 40);
} }
IN_PROC_BROWSER_TEST_F(FormControlsBrowserTest, Input) {
RunTest("form_controls_browsertest_input",
"<!-- text inputs -->"
"<style>input {width: 150px;}</style>"
"<input type=\"text\" /><br><br>"
"<input type=\"number\" /><br><br>"
"<input type=\"search\" /><br><br>"
"<input type=\"email\" /><br><br>"
"<input type=\"password\" /><br><br>"
"<!-- border -->"
"<input type=\"text\" style=\"border: 3px solid lime;\"/><br><br>"
"<!-- shadow -->"
"<input type=\"text\" style=\"box-shadow: 4px 4px 10px rgba(255,0,0,0.5), inset 4px 4px 4px rgba(0,255,0,0.5);\"/><br><br>"
"<!-- disabled -->"
"<input type=\"text\" disabled/>",
/* screenshot_width */ 200,
/* screenshot_height */ 330);
}
// TODO(jarhar): Add tests for other elements from // TODO(jarhar): Add tests for other elements from
// https://concrete-hardboard.glitch.me // https://concrete-hardboard.glitch.me
......
...@@ -60,6 +60,8 @@ static void GetNativeThemeExtraParams( ...@@ -60,6 +60,8 @@ static void GetNativeThemeExtraParams(
extra_params->text_field.is_listbox; extra_params->text_field.is_listbox;
native_theme_extra_params->text_field.background_color = native_theme_extra_params->text_field.background_color =
extra_params->text_field.background_color; extra_params->text_field.background_color;
native_theme_extra_params->text_field.has_border =
extra_params->text_field.has_border;
break; break;
case WebThemeEngine::kPartMenuList: case WebThemeEngine::kPartMenuList:
native_theme_extra_params->menu_list.has_border = native_theme_extra_params->menu_list.has_border =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment