New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 681822 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
inactive
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug-Regression



Sign in to add a comment

[Autofill] "Clear form" option is not working same in all fields in the webpage

Project Member Reported by dknandiraju@chromium.org, Jan 17 2017

Issue description

Application Version (from "Chrome Settings > About Chrome"): 57.0.2984.0
Android Build Number (from "Android Settings > About Phone/Tablet"): MMB29K
Device: Samsung Galaxy Note 5(SM-N920G)

Precondition: "Autofill" has at least one entry with "Name" and "Email" field with some values

Steps to reproduce: 
1) Launch chrome and complete FRE
2) Go to menu-> open "New incognito tab"
3) Navigate to "accounts.google.com/signup"
4) Tap on "Name" field and select "autofill" suggestion.
5) Now tap on "your current email address" field in the page
6) Select "Clear form"

Observed behavior: Text which autofilled in the "name" field in the page is not getting cleared

Expected behavior: All autofilled entries should get cleared

Frequency: 100%
<number of times you were able to reproduce> 

Additional comments: 

 
Note:
1) This issue is observed on all devices 
2)  Good Build: 57.0.2951.0
    Bad Build: 56.0.2952.0
3) Bisect range: https://chromium.googlesource.com/chromium/src/+log/56.0.2951.0..56.0.2952.0?pretty=fuller&n=10000
4)Bisect script is pointing to https://chromium.googlesource.com/chromium/src/+/ef5c846a3e5d3c994d962ddca7d40f4bc1476044
5) Please find logs and Video @ http://go/chrome-androidlogs1/6/681822
Components: UI>Browser>Autofill
Labels: ReleaseBlock-Stable
Owner: yabinh@chromium.org
Status: Assigned (was: Untriaged)

Comment 3 by yabinh@chromium.org, Jan 18 2017

Cc: aelias@chromium.org changwan@chromium.org

Comment 4 by yabinh@chromium.org, Jan 19 2017

Sorry I couldn't find the "Clear form" option at Step 6.Did I miss something?
I tested on Samsung Galaxy Note 4 because I don't have a Note 5.
screenshot.png
212 KB View Download

Comment 5 by yabinh@chromium.org, Jan 23 2017

Labels: Needs-Feedback
Labels: -Needs-Feedback
@yabinh, Please find a video to reproduce the issue on Samsung Galaxy Note 4(SM-N10C)/KTU84P @ http://go/chrome-androidlogs1/6/681822-1.

Comment 7 by yabinh@chromium.org, Jan 25 2017

OK. Now I'm able to repro it with aelias@'s help.
1. To show the "Clear form" option, go to "Settings->Autofill forms, and add an "Address" item;
2. To repro the bug, follow the original steps with Google keyboard instead of Samsung keyboard.

BTW, the bug can be also reproduced on other devices, like Nexus 5.

I'll keep looking into it.

Comment 8 by yabinh@chromium.org, Jan 25 2017

Status: Started (was: Assigned)
Found the root cause.

Focusing in a form, auto filling it, and focusing out will call
1. setCompositionFromExistingText(“auto_filled_text”)
2. finishingComposingText()

At Step 2, we will delete the existing composition and insert new composition. Note that if the auto-filled text is modified, the “Clear form” will not clear it. So we shouldn't modify the text at Step 2.

Comment 9 by yabinh@chromium.org, Jan 28 2017

Cc: yabinh@chromium.org
Issue 686018 has been merged into this issue.
Project Member

Comment 10 by bugdroid1@chromium.org, Feb 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/81279cd5b209a34ca4f7702f2a10576faa50fdf9

commit 81279cd5b209a34ca4f7702f2a10576faa50fdf9
Author: aelias <aelias@chromium.org>
Date: Tue Feb 07 04:46:23 2017

Remove replaceComposition() calls in finishComposingText.

We recently split commitText("") into a new method finishComposingText, a no-op
commit that simply preserves the already existing composition.  But because
of its historical origins it still had the replaceComposition call in it.

This is causing a bug with "yellow" autofill status getting cleared due
to the operation being interpreted as user typing.  But also, it's unnecessary work
in general, and the input/compositionupdate events are just repeated from the last
setComposition() call.  So just clean them out and have a clear()/moveCaret() call.

As a result of this, I was also able to clean out another longstanding autofill
ignoring flag that no longer has anything to ignore.

TEST=WebViewTest.FinishComposingTextDoesntTriggerAutofillTextChange
BUG= 681822 

Review-Url: https://codereview.chromium.org/2664603002
Cr-Commit-Position: refs/heads/master@{#448546}

[modify] https://crrev.com/81279cd5b209a34ca4f7702f2a10576faa50fdf9/components/autofill/content/renderer/autofill_agent.cc
[modify] https://crrev.com/81279cd5b209a34ca4f7702f2a10576faa50fdf9/components/autofill/content/renderer/autofill_agent.h
[modify] https://crrev.com/81279cd5b209a34ca4f7702f2a10576faa50fdf9/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
[modify] https://crrev.com/81279cd5b209a34ca4f7702f2a10576faa50fdf9/third_party/WebKit/LayoutTests/fast/events/composition-event-source-device-event-sender-expected.txt
[modify] https://crrev.com/81279cd5b209a34ca4f7702f2a10576faa50fdf9/third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt
[modify] https://crrev.com/81279cd5b209a34ca4f7702f2a10576faa50fdf9/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/81279cd5b209a34ca4f7702f2a10576faa50fdf9/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
[modify] https://crrev.com/81279cd5b209a34ca4f7702f2a10576faa50fdf9/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
[modify] https://crrev.com/81279cd5b209a34ca4f7702f2a10576faa50fdf9/third_party/WebKit/Source/web/WebViewImpl.cpp
[modify] https://crrev.com/81279cd5b209a34ca4f7702f2a10576faa50fdf9/third_party/WebKit/Source/web/tests/WebViewTest.cpp
[modify] https://crrev.com/81279cd5b209a34ca4f7702f2a10576faa50fdf9/third_party/WebKit/public/web/WebAutofillClient.h

Labels: -Restrict-View-Google Merge-Request-57
Owner: aelias@chromium.org
Project Member

Comment 12 by sheriffbot@chromium.org, Feb 7 2017

Labels: -Merge-Request-57 Hotlist-Merge-Approved Merge-Approved-57
Your change meets the bar and is auto-approved for M57. Please go ahead and merge the CL to branch 2987 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 13 by bugdroid1@chromium.org, Feb 8 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b1b55fb2cf97a6274212b1f288ea20efff471901

commit b1b55fb2cf97a6274212b1f288ea20efff471901
Author: Alexandre Elias <aelias@chromium.org>
Date: Wed Feb 08 03:56:44 2017

Remove replaceComposition() calls in finishComposingText.

We recently split commitText("") into a new method finishComposingText, a no-op
commit that simply preserves the already existing composition.  But because
of its historical origins it still had the replaceComposition call in it.

This is causing a bug with "yellow" autofill status getting cleared due
to the operation being interpreted as user typing.  But also, it's unnecessary work
in general, and the input/compositionupdate events are just repeated from the last
setComposition() call.  So just clean them out and have a clear()/moveCaret() call.

As a result of this, I was also able to clean out another longstanding autofill
ignoring flag that no longer has anything to ignore.

TEST=WebViewTest.FinishComposingTextDoesntTriggerAutofillTextChange
BUG= 681822 

Review-Url: https://codereview.chromium.org/2664603002
Cr-Original-Commit-Position: refs/heads/master@{#448546}
Review-Url: https://codereview.chromium.org/2681023003 .
Cr-Commit-Position: refs/branch-heads/2987@{#381}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/b1b55fb2cf97a6274212b1f288ea20efff471901/components/autofill/content/renderer/autofill_agent.cc
[modify] https://crrev.com/b1b55fb2cf97a6274212b1f288ea20efff471901/components/autofill/content/renderer/autofill_agent.h
[modify] https://crrev.com/b1b55fb2cf97a6274212b1f288ea20efff471901/content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java
[modify] https://crrev.com/b1b55fb2cf97a6274212b1f288ea20efff471901/third_party/WebKit/LayoutTests/fast/events/composition-event-source-device-event-sender-expected.txt
[modify] https://crrev.com/b1b55fb2cf97a6274212b1f288ea20efff471901/third_party/WebKit/LayoutTests/fast/events/ime-composition-events-001-expected.txt
[modify] https://crrev.com/b1b55fb2cf97a6274212b1f288ea20efff471901/third_party/WebKit/Source/core/editing/InputMethodController.cpp
[modify] https://crrev.com/b1b55fb2cf97a6274212b1f288ea20efff471901/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
[modify] https://crrev.com/b1b55fb2cf97a6274212b1f288ea20efff471901/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
[modify] https://crrev.com/b1b55fb2cf97a6274212b1f288ea20efff471901/third_party/WebKit/Source/web/WebViewImpl.cpp
[modify] https://crrev.com/b1b55fb2cf97a6274212b1f288ea20efff471901/third_party/WebKit/Source/web/tests/WebViewTest.cpp
[modify] https://crrev.com/b1b55fb2cf97a6274212b1f288ea20efff471901/third_party/WebKit/public/web/WebAutofillClient.h

Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Verified with Chrome Beta release "57.0.2987.38" On Motox 2nd Gen.

Sign in to add a comment