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

Issue 138433002: Add Autofill preview support for <select> input fields (Closed)

Created:
6 years, 11 months ago by ziran.sun
Modified:
6 years, 9 months ago
Reviewers:
tkent, keishi
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Add Autofill preview support for <select> input fields The <select> preview is set with yellow background inline with Input and TextArea Element preview css settings. R=dhollowa@chromium.org, isherman@chromium.org, jhawkins@chromium.org, tkent@chromium.org BUG=58719 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169476

Patch Set 1 #

Total comments: 1

Patch Set 2 : Update code and addressed all the review comments #

Total comments: 1

Patch Set 3 : Remove addFocusRingRects() handling for select preview as it's not used #

Patch Set 4 : Rebase and update code to be in line with the latest code base #

Total comments: 2

Patch Set 5 : Update code as per keishi's review comment. #

Total comments: 10

Patch Set 6 : Update code as tkent's review comments #

Total comments: 10

Patch Set 7 : Update code as per tkent and Chris's review comments #

Patch Set 8 : Rebase #

Total comments: 2

Patch Set 9 : Initialize m_suggestedIndex in constructor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -19 lines) Patch
M LayoutTests/fast/forms/suggested-value.html View 1 4 chunks +7 lines, -2 lines 0 comments Download
M LayoutTests/fast/forms/suggested-value-expected.txt View 1 2 chunks +8 lines, -0 lines 0 comments Download
M LayoutTests/platform/linux/fast/forms/suggested-value-expected.txt View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M LayoutTests/platform/win/fast/forms/suggested-value-expected.txt View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M Source/core/css/html.css View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLSelectElement.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -0 lines 0 comments Download
M Source/core/html/HTMLSelectElement.cpp View 1 2 3 4 5 6 7 8 9 chunks +57 lines, -6 lines 0 comments Download
M Source/core/rendering/RenderListBox.cpp View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderMenuList.cpp View 1 2 3 4 5 6 7 1 chunk +7 lines, -3 lines 0 comments Download
M Source/core/testing/Internals.cpp View 1 2 3 4 5 6 7 2 chunks +7 lines, -0 lines 0 comments Download
M Source/web/WebFormControlElement.cpp View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M public/web/WebFormControlElement.h View 1 2 3 1 chunk +8 lines, -5 lines 0 comments Download

Messages

Total messages: 47 (0 generated)
ziran.sun
6 years, 11 months ago (2014-01-14 17:00:58 UTC) #1
tkent
not lgtm https://codereview.chromium.org/138433002/diff/1/LayoutTests/fast/forms/suggested-value-expected.txt File LayoutTests/fast/forms/suggested-value-expected.txt (right): https://codereview.chromium.org/138433002/diff/1/LayoutTests/fast/forms/suggested-value-expected.txt#newcode32 LayoutTests/fast/forms/suggested-value-expected.txt:32: | "select.value: TX" The value must not ...
6 years, 11 months ago (2014-01-14 23:55:07 UTC) #2
Ilya Sherman
As I mentioned via email, rather than changing the selectedIndex, you'll want to introduce a ...
6 years, 10 months ago (2014-02-08 01:36:10 UTC) #3
ziran.sun
Code updated and addressed comments from tkent and Ilya. Please review. Thanks!
6 years, 9 months ago (2014-02-28 15:51:53 UTC) #4
tkent
+keishi https://codereview.chromium.org/138433002/diff/60001/Source/core/rendering/RenderListBox.cpp File Source/core/rendering/RenderListBox.cpp (right): https://codereview.chromium.org/138433002/diff/60001/Source/core/rendering/RenderListBox.cpp#newcode343 Source/core/rendering/RenderListBox.cpp:343: // Focus the previewed item. How does it ...
6 years, 9 months ago (2014-03-04 01:09:00 UTC) #5
tkent
Also, how should autofill preview work for <select multiple>?
6 years, 9 months ago (2014-03-04 01:10:21 UTC) #6
ziran.sun
On 2014/03/04 01:09:00, tkent wrote: > +keishi > > https://codereview.chromium.org/138433002/diff/60001/Source/core/rendering/RenderListBox.cpp > File Source/core/rendering/RenderListBox.cpp (right): > ...
6 years, 9 months ago (2014-03-04 16:52:34 UTC) #7
ziran.sun
On 2014/03/04 01:10:21, tkent wrote: > Also, how should autofill preview work for <select multiple>? ...
6 years, 9 months ago (2014-03-05 11:51:58 UTC) #8
keishi
lgtm. https://codereview.chromium.org/138433002/diff/100001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/138433002/diff/100001/Source/core/html/HTMLSelectElement.cpp#newcode258 Source/core/html/HTMLSelectElement.cpp:258: return m_suggestedValue; It doesn't matter yet, but, HTMLInputElement ...
6 years, 9 months ago (2014-03-13 04:47:49 UTC) #9
ziran.sun
Code updated as per keishi's review comment. Please review. https://codereview.chromium.org/138433002/diff/100001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/138433002/diff/100001/Source/core/html/HTMLSelectElement.cpp#newcode258 Source/core/html/HTMLSelectElement.cpp:258: ...
6 years, 9 months ago (2014-03-13 11:20:51 UTC) #10
ziran.sun
On 2014/03/13 11:20:51, ziran.sun wrote: > Code updated as per keishi's review comment. Please review. ...
6 years, 9 months ago (2014-03-13 17:07:24 UTC) #11
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 9 months ago (2014-03-13 23:30:49 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ziran.sun@samsung.com/138433002/120001
6 years, 9 months ago (2014-03-13 23:30:53 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-13 23:41:47 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on blink_presubmit
6 years, 9 months ago (2014-03-13 23:41:48 UTC) #15
tkent
https://codereview.chromium.org/138433002/diff/120001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/138433002/diff/120001/Source/core/html/HTMLSelectElement.cpp#newcode259 Source/core/html/HTMLSelectElement.cpp:259: for (unsigned i = 0; i < items.size(); i++) ...
6 years, 9 months ago (2014-03-14 00:06:40 UTC) #16
ziran.sun
Updated code as per tkent's review comments. Please review. Thanks! https://codereview.chromium.org/138433002/diff/120001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/138433002/diff/120001/Source/core/html/HTMLSelectElement.cpp#newcode259 ...
6 years, 9 months ago (2014-03-14 11:32:36 UTC) #17
ziran.sun
https://codereview.chromium.org/138433002/diff/120001/Source/core/html/HTMLSelectElement.h File Source/core/html/HTMLSelectElement.h (right): https://codereview.chromium.org/138433002/diff/120001/Source/core/html/HTMLSelectElement.h#newcode212 Source/core/html/HTMLSelectElement.h:212: String m_suggestedValue; On 2014/03/14 00:06:41, tkent wrote: > Why ...
6 years, 9 months ago (2014-03-14 11:33:40 UTC) #18
tkent
https://codereview.chromium.org/138433002/diff/140001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/138433002/diff/140001/Source/core/html/HTMLSelectElement.cpp#newcode261 Source/core/html/HTMLSelectElement.cpp:261: if (i == (unsigned)m_suggestedIndex) We don't use C-style cast. ...
6 years, 9 months ago (2014-03-16 23:34:03 UTC) #19
Inactive
https://codereview.chromium.org/138433002/diff/140001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp (right): https://codereview.chromium.org/138433002/diff/140001/Source/core/html/HTMLSelectElement.cpp#newcode260 Source/core/html/HTMLSelectElement.cpp:260: if (items[i]->hasLocalName(optionTag) && m_suggestedIndex >= 0) { isHTMLOptionElement() https://codereview.chromium.org/138433002/diff/140001/Source/core/html/HTMLSelectElement.cpp#newcode278 ...
6 years, 9 months ago (2014-03-16 23:49:42 UTC) #20
Inactive
https://codereview.chromium.org/138433002/diff/140001/Source/web/WebFormControlElement.cpp File Source/web/WebFormControlElement.cpp (right): https://codereview.chromium.org/138433002/diff/140001/Source/web/WebFormControlElement.cpp#newcode122 Source/web/WebFormControlElement.cpp:122: if (m_private->hasTagName(HTMLNames::selectTag)) This will also be isHTMLSelectElement(*m_private) once https://codereview.chromium.org/200723002/ ...
6 years, 9 months ago (2014-03-16 23:58:45 UTC) #21
ziran.sun
Code updated as per tkent and Chris's review comments. Please review. Thanks! https://codereview.chromium.org/138433002/diff/140001/Source/core/html/HTMLSelectElement.cpp File Source/core/html/HTMLSelectElement.cpp ...
6 years, 9 months ago (2014-03-17 16:41:10 UTC) #22
tkent
lgtm
6 years, 9 months ago (2014-03-17 20:51:34 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ziran.sun@samsung.com/138433002/160001
6 years, 9 months ago (2014-03-17 20:51:45 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-17 20:52:57 UTC) #25
commit-bot: I haz the power
Failed to apply patch for Source/core/rendering/RenderListBox.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-17 20:53:01 UTC) #26
ziran.sun
The CQ bit was checked by ziran.sun@samsung.com
6 years, 9 months ago (2014-03-18 11:32:11 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ziran.sun@samsung.com/138433002/180001
6 years, 9 months ago (2014-03-18 11:32:16 UTC) #28
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 11:39:20 UTC) #29
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_compile_dbg
6 years, 9 months ago (2014-03-18 11:39:21 UTC) #30
ziran.sun
The CQ bit was checked by ziran.sun@samsung.com
6 years, 9 months ago (2014-03-18 11:46:07 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ziran.sun@samsung.com/138433002/180001
6 years, 9 months ago (2014-03-18 11:46:09 UTC) #32
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 11:52:54 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_compile_dbg
6 years, 9 months ago (2014-03-18 11:52:54 UTC) #34
tkent
https://codereview.chromium.org/138433002/diff/180001/Source/core/html/HTMLSelectElement.h File Source/core/html/HTMLSelectElement.h (right): https://codereview.chromium.org/138433002/diff/180001/Source/core/html/HTMLSelectElement.h#newcode212 Source/core/html/HTMLSelectElement.h:212: int m_suggestedIndex; This should be initialized in the constructor.
6 years, 9 months ago (2014-03-18 13:56:25 UTC) #35
ziran.sun
initialized m_suggestedIndex in constructor. Please review. Thanks! https://codereview.chromium.org/138433002/diff/180001/Source/core/html/HTMLSelectElement.h File Source/core/html/HTMLSelectElement.h (right): https://codereview.chromium.org/138433002/diff/180001/Source/core/html/HTMLSelectElement.h#newcode212 Source/core/html/HTMLSelectElement.h:212: int m_suggestedIndex; ...
6 years, 9 months ago (2014-03-18 14:06:39 UTC) #36
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 9 months ago (2014-03-18 19:46:24 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ziran.sun@samsung.com/138433002/190001
6 years, 9 months ago (2014-03-18 19:46:32 UTC) #38
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 20:34:35 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on win_blink_rel
6 years, 9 months ago (2014-03-18 20:34:36 UTC) #40
tkent
The CQ bit was checked by tkent@chromium.org
6 years, 9 months ago (2014-03-18 20:39:18 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ziran.sun@samsung.com/138433002/190001
6 years, 9 months ago (2014-03-18 20:39:40 UTC) #42
commit-bot: I haz the power
Change committed as 169476
6 years, 9 months ago (2014-03-18 21:25:53 UTC) #43
tkent
What happens if a suggested value was set, then <option>s are deleted/inserted in the <select>? ...
6 years, 9 months ago (2014-03-19 01:14:06 UTC) #44
ziran.sun
On 2014/03/19 01:14:06, tkent wrote: > What happens if a suggested value was set, then ...
6 years, 9 months ago (2014-03-21 13:41:15 UTC) #45
ziran.sun
On 2014/03/21 13:41:15, ziran.sun wrote: > On 2014/03/19 01:14:06, tkent wrote: > > What happens ...
6 years, 9 months ago (2014-03-24 15:21:43 UTC) #46
ziran.sun
6 years, 9 months ago (2014-03-27 14:34:30 UTC) #47
Message was sent while issue was closed.
On 2014/03/19 01:14:06, tkent wrote:
> We should have a pixel test to check <select> with -webktit-autofill style.

https://codereview.chromium.org/214693004/

Added Layout test for <select>. I feel that this layout test has tested the
-webkit-autofill style. Do let me know if you still think that a pixel test is
still necessary. Thanks!

Powered by Google App Engine
This is Rietveld 408576698