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

Issue 1615003002: Fix behavior of HTMLInputElement.maxLength/minLength getter (Closed)

Created:
4 years, 11 months ago by rwlbuis
Modified:
4 years, 10 months ago
Reviewers:
tkent
CC:
blink-reviews, blink-reviews-html_chromium.org, blink-reviews-w3ctests_chromium.org, chromium-reviews, dglazkov+blink, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix behavior of HTMLInputElement.maxLength/minLength getter According to [1], the maxLength/minLength getter should "if the attribute is absent, the default value must be returned instead, or −1 if there is no default value". Since maxLength/minLength do not have a default value indeed -1 should be used. This fixes the imported w3c test: http://w3c-test.org/html/semantics/forms/the-input-element/maxlength.html Behavior matches Firefox. [1] https://html.spec.whatwg.org/multipage/infrastructure.html#limited-to-only-non-negative-numbers BUG=580301 Committed: https://crrev.com/380ad2fc4715faac624a03475fa5c3aa9e6cd7f1 Cr-Commit-Position: refs/heads/master@{#375497}

Patch Set 1 #

Patch Set 2 : V2 #

Total comments: 1

Patch Set 3 : Patch for landing #

Patch Set 4 : Adjust expected result as well #

Patch Set 5 : Plan b #

Patch Set 6 : Try to fix clang build #

Patch Set 7 : Try to fix build #

Patch Set 8 : Another attempt #

Patch Set 9 : Fix more browsertests #

Patch Set 10 : Try to fix browsertests #

Patch Set 11 : #

Patch Set 12 : Try to fix interactive tests #

Total comments: 2

Patch Set 13 : Default m_minLength to -1 #

Patch Set 14 : Undo one change #

Patch Set 15 : Try to fix in a different way #

Patch Set 16 : Add minLength test #

Patch Set 17 : Different approach #

Total comments: 1

Patch Set 18 : Address review comments #

Total comments: 3

Patch Set 19 : Set to -1 for invalid attribute or negative #

Messages

Total messages: 42 (18 generated)
rwlbuis
PTAL.
4 years, 11 months ago (2016-01-21 22:34:46 UTC) #3
tkent
Please file new bug for this bug. The code change LGTM. https://codereview.chromium.org/1615003002/diff/20001/third_party/WebKit/LayoutTests/fast/forms/text/input-maxlength.html File third_party/WebKit/LayoutTests/fast/forms/text/input-maxlength.html (right): ...
4 years, 11 months ago (2016-01-22 05:03:30 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1615003002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1615003002/40001
4 years, 11 months ago (2016-01-22 15:06:04 UTC) #9
rwlbuis
On 2016/01/22 05:03:30, tkent wrote: > Please file new bug for this bug. Ouch, I ...
4 years, 11 months ago (2016-01-22 15:08:46 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/105679)
4 years, 11 months ago (2016-01-22 15:54:35 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1615003002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1615003002/60001
4 years, 11 months ago (2016-01-22 16:04:37 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/105710) linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 11 months ago (2016-01-22 17:00:53 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1615003002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1615003002/60001
4 years, 11 months ago (2016-01-22 17:51:12 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/105749)
4 years, 11 months ago (2016-01-22 18:39:51 UTC) #22
rwlbuis
On 2016/01/22 05:03:30, tkent wrote: > Please file new bug for this bug. > > ...
4 years, 11 months ago (2016-01-22 21:27:15 UTC) #23
tkent
On 2016/01/22 at 21:27:15, rob.buis wrote: > On 2016/01/22 05:03:30, tkent wrote: > > Please ...
4 years, 10 months ago (2016-01-25 01:21:09 UTC) #24
rwlbuis
On 2016/01/25 01:21:09, tkent wrote: > On 2016/01/22 at 21:27:15, rob.buis wrote: > > I ...
4 years, 10 months ago (2016-01-26 22:40:28 UTC) #25
tkent
On 2016/01/26 at 22:40:28, rob.buis wrote: > @tkent it may seem now B is getting ...
4 years, 10 months ago (2016-01-28 00:14:07 UTC) #26
rwlbuis
On 2016/01/28 00:14:07, tkent wrote: > I guess the intention of the code is: > ...
4 years, 10 months ago (2016-02-08 19:16:44 UTC) #28
tkent
> Do you think we should add reviewers for the chromium part? If so, can ...
4 years, 10 months ago (2016-02-08 23:48:21 UTC) #29
rwlbuis
On 2016/02/08 23:48:21, tkent wrote: > > Do you think we should add reviewers for ...
4 years, 10 months ago (2016-02-11 21:58:04 UTC) #31
tkent
> I also made Patch Set #17, which makes the chromium side work as before ...
4 years, 10 months ago (2016-02-12 01:55:10 UTC) #32
rwlbuis
On 2016/02/12 01:55:10, tkent wrote: > > I also made Patch Set #17, which makes ...
4 years, 10 months ago (2016-02-12 19:35:30 UTC) #33
tkent
https://codereview.chromium.org/1615003002/diff/380001/third_party/WebKit/Source/core/html/HTMLInputElement.cpp File third_party/WebKit/Source/core/html/HTMLInputElement.cpp (right): https://codereview.chromium.org/1615003002/diff/380001/third_party/WebKit/Source/core/html/HTMLInputElement.cpp#newcode1685 third_party/WebKit/Source/core/html/HTMLInputElement.cpp:1685: maxLength = maximumLength; Similar to parseMinLengthAttribute(), we need to ...
4 years, 10 months ago (2016-02-14 23:28:12 UTC) #34
rwlbuis
PTAL. https://codereview.chromium.org/1615003002/diff/380001/third_party/WebKit/Source/core/html/HTMLInputElement.cpp File third_party/WebKit/Source/core/html/HTMLInputElement.cpp (right): https://codereview.chromium.org/1615003002/diff/380001/third_party/WebKit/Source/core/html/HTMLInputElement.cpp#newcode1685 third_party/WebKit/Source/core/html/HTMLInputElement.cpp:1685: maxLength = maximumLength; On 2016/02/14 23:28:11, tkent wrote: ...
4 years, 10 months ago (2016-02-15 21:15:12 UTC) #35
tkent
lgtm https://codereview.chromium.org/1615003002/diff/380001/third_party/WebKit/Source/core/html/HTMLInputElement.cpp File third_party/WebKit/Source/core/html/HTMLInputElement.cpp (right): https://codereview.chromium.org/1615003002/diff/380001/third_party/WebKit/Source/core/html/HTMLInputElement.cpp#newcode1685 third_party/WebKit/Source/core/html/HTMLInputElement.cpp:1685: maxLength = maximumLength; On 2016/02/15 at 21:15:10, rwlbuis ...
4 years, 10 months ago (2016-02-15 22:54:07 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1615003002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1615003002/400001
4 years, 10 months ago (2016-02-15 22:54:24 UTC) #38
commit-bot: I haz the power
Committed patchset #19 (id:400001)
4 years, 10 months ago (2016-02-16 00:04:52 UTC) #40
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:50:59 UTC) #42
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/380ad2fc4715faac624a03475fa5c3aa9e6cd7f1
Cr-Commit-Position: refs/heads/master@{#375497}

Powered by Google App Engine
This is Rietveld 408576698