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

Issue 776618 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Feature



Sign in to add a comment

autocapitalize="off" on contenteditable should be respected

Project Member Reported by changwan@chromium.org, Oct 20 2017

Issue description

Steps to reproduce:
(1) Create a webpage with <div contenteditable autocapitalize="off"></div>
(2) Focus on the div and type something.

Expected result:
Text should not be autocapitalized.

Actual result:
Text is autocapitalized.

 
Note: this is the WebKit bug where support was added for this on iOS Safari (in iOS 11?):
https://bugs.webkit.org/show_bug.cgi?id=164538
We decided to make an addition to the HTML spec to add support for autocapitalize. The pull request with the behavior we will implement is here:
https://github.com/whatwg/html/pull/3273
Project Member

Comment 4 by bugdroid1@chromium.org, Jan 18 2018

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

commit bee5506d487adae74b77ae9c7e35092a40111f9f
Author: Ryan Landay <rlanday@chromium.org>
Date: Thu Jan 18 00:16:08 2018

Add InputMethodController test case for autocapitalize flags

This CL adds a test case to record the InputMethodController's current behavior
with regard to the autocapitalize attribute.

Bug:  776618 
Change-Id: Ia7c81c4c2e4b5436e99fee9dc4a276824a763efe
Reviewed-on: https://chromium-review.googlesource.com/871831
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529965}
[modify] https://crrev.com/bee5506d487adae74b77ae9c7e35092a40111f9f/third_party/WebKit/Source/core/editing/ime/InputMethodControllerTest.cpp

Project Member

Comment 5 by bugdroid1@chromium.org, Jan 18 2018

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

commit 3c24bd069e0501ba8023e06bf1d68a0dbe933b92
Author: Ryan Landay <rlanday@chromium.org>
Date: Thu Jan 18 03:16:08 2018

Refactor InputMethodController's autocapitalize logic into a helper function

This CL refactors InputMethodController's logic for setting the autocapitalize
TextInputFlags into a helper method so we can reduce nesting.

Bug:  776618 
Change-Id: Ief536dce4deafe1f23881564531aa5b703d5de1a
Reviewed-on: https://chromium-review.googlesource.com/871836
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530038}
[modify] https://crrev.com/3c24bd069e0501ba8023e06bf1d68a0dbe933b92/third_party/WebKit/Source/core/editing/ime/InputMethodController.cpp

Project Member

Comment 6 by bugdroid1@chromium.org, Jan 18 2018

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

commit a7e135f773c307e02adca78c309e0ce6b82e7125
Author: Ryan Landay <rlanday@chromium.org>
Date: Thu Jan 18 03:35:07 2018

Disable autocapitalize for password, URL, and email inputs

The new autocapitalize spec:
https://html.spec.whatwg.org/multipage/interaction.html#autocapitalization

states that autocapitalization should never be enabled for <input> elements of
type password, URL, or email. This CL implements this behavior in Chrome.

Bug:  776618 
Change-Id: I63fbcbfefc9e8e6139cb9bbeeb9fc4ddce1c7742
Reviewed-on: https://chromium-review.googlesource.com/871842
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530043}
[modify] https://crrev.com/a7e135f773c307e02adca78c309e0ce6b82e7125/third_party/WebKit/Source/core/editing/ime/InputMethodController.cpp
[modify] https://crrev.com/a7e135f773c307e02adca78c309e0ce6b82e7125/third_party/WebKit/Source/core/editing/ime/InputMethodControllerTest.cpp

Project Member

Comment 7 by bugdroid1@chromium.org, Jan 21 2018

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

commit 1de83967752e0cf4f36f3a013b4f1ab687b88e11
Author: Ryan Landay <rlanday@chromium.org>
Date: Sun Jan 21 04:49:28 2018

Add support for autocapitalize on contenteditable elements

The new spec for autocapitalize:
https://html.spec.whatwg.org/multipage/interaction.html#autocapitalization

states that it should be supported on all editable regions. This CL moves the
removes the current logic for implmenting autocapitalize specifically on <input>
and <textarea> elements and moves it into HTMLElement so we can support it on
all editable elements.

Note: I've added some logic to HTMLElement that changes the IDL behavior for
<input> types that don't support autocapitalize (URL, password, and email). This
is temporary and I will remove this in a later CL when I update our IDL behavior
to match the spec.

This CL also adds an integration test for Android so we can verify that
autocapitalize works correctly with contenteditable.

Bug:  776618 
Change-Id: Icd1396c60e255fc756d3892d361a8387af73ed58
Reviewed-on: https://chromium-review.googlesource.com/871976
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530769}
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/content/public/android/BUILD.gn
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/content/public/android/java/src/org/chromium/content/browser/input/ImeUtils.java
[add] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/content/public/android/javatests/src/org/chromium/content/browser/input/ImeAutocapitalizeTest.java
[add] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/content/test/data/android/input/autocapitalize.html
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/LayoutTests/virtual/stable/webexposed/element-instance-property-listing-expected.txt
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/editing/ime/InputMethodController.cpp
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/editing/ime/InputMethodControllerTest.cpp
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/HTMLElement.cpp
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/HTMLElement.h
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/HTMLElement.idl
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/BaseTextInputType.cpp
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/BaseTextInputType.h
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/HTMLInputElement.cpp
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/HTMLInputElement.h
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/HTMLInputElement.idl
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/HTMLTextAreaElement.cpp
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/HTMLTextAreaElement.h
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/HTMLTextAreaElement.idl
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/InputType.cpp
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/InputType.h
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/SearchInputType.cpp
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/SearchInputType.h
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/TextControlElement.cpp
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/TextControlElement.h
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/TextInputType.cpp
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/Source/core/html/forms/TextInputType.h
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/1de83967752e0cf4f36f3a013b4f1ab687b88e11/tools/metrics/histograms/enums.xml

Project Member

Comment 8 by bugdroid1@chromium.org, Jan 23 2018

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

commit d972d2026da8bdd08ff27bf16a7223987ba53f2f
Author: Ryan Landay <rlanday@chromium.org>
Date: Tue Jan 23 20:13:32 2018

Update autocapitalize IDL behavior to match spec

This CL makes two changes to the autocapitalize IDL behavior to match the new
spec:
https://html.spec.whatwg.org/multipage/interaction.html#autocapitalization

- For elements with no autocapitalize attribute set, or which have the attribute
  set with an empty value (e.g. <input autocapitalize> or <input
  autocapitalize="">), return an empty string instead of "sentences".

- All <input> elements will now have the same behavior. Email, URL, and password
  inputs will no longer be special-cased to always return "none".

This CL also adds some test cases for this new behavior.

Bug:  776618 
Change-Id: I4027e81380d5ff7ea7da254b98cfa67b1d202b58
Reviewed-on: https://chromium-review.googlesource.com/872012
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531323}
[modify] https://crrev.com/d972d2026da8bdd08ff27bf16a7223987ba53f2f/third_party/WebKit/LayoutTests/fast/forms/autocapitalize.html
[modify] https://crrev.com/d972d2026da8bdd08ff27bf16a7223987ba53f2f/third_party/WebKit/Source/core/editing/ime/InputMethodController.cpp
[modify] https://crrev.com/d972d2026da8bdd08ff27bf16a7223987ba53f2f/third_party/WebKit/Source/core/html/HTMLElement.cpp

Labels: -M-64 M-66
Status: Fixed (was: Assigned)
Will be in Chrome 66
Project Member

Comment 10 by bugdroid1@chromium.org, Jan 26 2018

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

commit 9e57ef9c21fefb9621289678ecc4ae1aacc82994
Author: Ryan Landay <rlanday@chromium.org>
Date: Fri Jan 26 18:12:11 2018

Add support for inheriting autocapitalize attribute from form owner

This CL adds support for inheriting the autocapitalize attribute from a form
owner as described in the new spec for autocapitalize:
https://html.spec.whatwg.org/multipage/interaction.html#autocapitalization

This CL also adds tests for this new behavior.

Bug:  776618 
Change-Id: Ib96354fb320736255369bd2df3113e172dfdb42e
Reviewed-on: https://chromium-review.googlesource.com/872090
Reviewed-by: Changwan Ryu <changwan@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Ryan Landay <rlanday@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532020}
[modify] https://crrev.com/9e57ef9c21fefb9621289678ecc4ae1aacc82994/content/public/android/javatests/src/org/chromium/content/browser/input/ImeAutocapitalizeTest.java
[modify] https://crrev.com/9e57ef9c21fefb9621289678ecc4ae1aacc82994/content/test/data/android/input/autocapitalize.html
[add] https://crrev.com/9e57ef9c21fefb9621289678ecc4ae1aacc82994/third_party/WebKit/LayoutTests/external/wpt/html/editing/editing-0/autocapitalization/autocapitalize.html
[delete] https://crrev.com/ad9fe998d1954d8688c96e5ee864c4d4f1f6642d/third_party/WebKit/LayoutTests/fast/forms/autocapitalize.html
[modify] https://crrev.com/9e57ef9c21fefb9621289678ecc4ae1aacc82994/third_party/WebKit/Source/core/editing/ime/InputMethodControllerTest.cpp
[modify] https://crrev.com/9e57ef9c21fefb9621289678ecc4ae1aacc82994/third_party/WebKit/Source/core/html/forms/HTMLFormControlElement.cpp
[modify] https://crrev.com/9e57ef9c21fefb9621289678ecc4ae1aacc82994/third_party/WebKit/Source/core/html/forms/HTMLFormControlElement.h

Sign in to add a comment