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

Issue 235983016: Add support for setting password value gated on user's gesture in a page (Closed)

Created:
6 years, 8 months ago by vabr (Chromium)
Modified:
6 years, 8 months ago
CC:
blink-reviews, jamesr, dglazkov+blink, abarth-chromium, jochen (gone - plz use gerrit)
Visibility:
Public.

Description

Add support for setting password value gated on user's gesture in a page WebViewImpl will now be able to notify WebAutofillClient when a user gesture is handled for the first time after a load. This has security motivation, detailed here: https://docs.google.com/document/d/1_Es0qQVrKZSZoXuQBuPmNW8-EAUDsuQGSMIlRFPzs_0/edit?usp=sharing This improves the current status, when a workaround involving checking for a user gesture outside of Blink is used. That workaround does not work for Android, and can be seen as a layering violation in the sense, that checking for user gesture is a Blink internal thing. There was one technical challenge to tackle in this approach: the need to know in WebViewImpl, whether a event satisfies isUserGestureEventType, because such events can get created higher up the stack, in EventRouter. For example, the GestureTap event does not satisfy isUserGestureEventType, but causes a mouse click event to be created, which satisfies isUserGestureEventType. That event is never seen by WebViewImpl. That's why this CL also needs to add a check for UserGestureIndicator being created during the handleEvent call. This is the Blink part, two more CLs are planned as follow-ups: 1) Chromium part: PasswordAutofillAgent receiving the newly added notification + clean-up (basically getting rid of content/ changes from https://codereview.chromium.org/163843002) 2) Blink clean-up: making WebInputEvent::isUserGestureEventType Blink-internal BUG=163072 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=171759

Patch Set 1 : #

Total comments: 2

Patch Set 2 : OVERRIDE added #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -1 line) Patch
M Source/platform/UserGestureIndicator.h View 2 chunks +3 lines, -0 lines 0 comments Download
M Source/platform/UserGestureIndicator.cpp View 4 chunks +17 lines, -0 lines 4 comments Download
M Source/web/WebViewImpl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/web/WebViewImpl.cpp View 5 chunks +41 lines, -0 lines 0 comments Download
M Source/web/tests/WebViewTest.cpp View 1 4 chunks +69 lines, -1 line 0 comments Download
M public/web/WebAutofillClient.h View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
vabr (Chromium)
Jochen FYI. Hi Kent, This is my attempt at your suggestion in https://codereview.chromium.org/225853005/#msg4. My biggest ...
6 years, 8 months ago (2014-04-15 17:09:37 UTC) #1
tkent
lgtm. On 2014/04/15 17:09:37, vabr (Chromium) wrote: > My biggest issue was the need to ...
6 years, 8 months ago (2014-04-16 02:09:04 UTC) #2
tkent
https://codereview.chromium.org/235983016/diff/20001/Source/web/tests/WebViewTest.cpp File Source/web/tests/WebViewTest.cpp (right): https://codereview.chromium.org/235983016/diff/20001/Source/web/tests/WebViewTest.cpp#newcode1148 Source/web/tests/WebViewTest.cpp:1148: virtual void firstUserGestureObserved() { ++m_userGestureNotificationsCount; } nit: add OVERRIDE
6 years, 8 months ago (2014-04-16 02:09:11 UTC) #3
vabr (Chromium)
Thanks, Kent! I updated the CL description with the explanation about checking for user gesture ...
6 years, 8 months ago (2014-04-16 07:21:59 UTC) #4
vabr (Chromium)
The CQ bit was checked by vabr@chromium.org
6 years, 8 months ago (2014-04-16 07:22:14 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/235983016/30001
6 years, 8 months ago (2014-04-16 07:22:34 UTC) #6
commit-bot: I haz the power
Change committed as 171759
6 years, 8 months ago (2014-04-16 08:37:19 UTC) #7
jochen (gone - plz use gerrit)
https://codereview.chromium.org/235983016/diff/30001/Source/platform/UserGestureIndicator.cpp File Source/platform/UserGestureIndicator.cpp (right): https://codereview.chromium.org/235983016/diff/30001/Source/platform/UserGestureIndicator.cpp#newcode134 Source/platform/UserGestureIndicator.cpp:134: s_processedUserGestureInPast = true; i think you only want to ...
6 years, 8 months ago (2014-04-16 14:05:15 UTC) #8
vabr (Chromium)
6 years, 8 months ago (2014-04-16 16:24:16 UTC) #9
Message was sent while issue was closed.
Thanks, Jochen!

Created a new CL to address your comments:
https://codereview.chromium.org/239963005/

https://codereview.chromium.org/235983016/diff/30001/Source/platform/UserGest...
File Source/platform/UserGestureIndicator.cpp (right):

https://codereview.chromium.org/235983016/diff/30001/Source/platform/UserGest...
Source/platform/UserGestureIndicator.cpp:134: s_processedUserGestureInPast =
true;
On 2014/04/16 14:05:16, jochen wrote:
> i think you only want to do this when we actually invoke addGesture()

Done.

https://codereview.chromium.org/235983016/diff/30001/Source/platform/UserGest...
Source/platform/UserGestureIndicator.cpp:204: s_processedUserGestureInPast =
true;
On 2014/04/16 14:05:16, jochen wrote:
> false?

True! :)
(Thanks for catching this!)

Powered by Google App Engine
This is Rietveld 408576698