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

Issue 2362223002: Stop clamping tabIndex to short range (Closed)

Created:
4 years, 3 months ago by rwlbuis
Modified:
4 years, 1 month ago
Reviewers:
tkent, kochi, foolip
CC:
blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, krit, eae+blinkwatch, f(malita), fs, gyuyoung2, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, Stephen Chennney, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Stop clamping tabIndex to short range Stop clamping tabIndex to short range to match the specification [1] and other implementations. Setting this attribute with values in range [INT_MIN, INT_MAX] will be accepted, otherwise rejected. The test fast/events/max-tabindex-focus.html is taken from WebKit and rewritten to use testharness.js. Behavior matches Firefox and Safari. BUG=654860 [1] https://html.spec.whatwg.org/multipage/interaction.html#dom-tabindex Committed: https://crrev.com/dcfa87e4ecf3f9673f642f9292f9a69e50ef6ba4 Cr-Commit-Position: refs/heads/master@{#430080}

Patch Set 1 #

Patch Set 2 : V2 #

Patch Set 3 : V3 #

Patch Set 4 : Update tests #

Patch Set 5 : Fix formatting #

Patch Set 6 : Add test #

Patch Set 7 : Fix test expectation #

Total comments: 4

Patch Set 8 : Try without win expectation #

Patch Set 9 : Add test and comment #

Patch Set 10 : Clear when parsing out-of-range tabIndex attribute #

Patch Set 11 : Rebase #

Patch Set 12 : Try without m_tabIndex #

Patch Set 13 : More optimized #

Total comments: 3

Patch Set 14 : Add a few more subtests to tabindex-clamp.html #

Total comments: 6

Patch Set 15 : Address review comments #

Patch Set 16 : Fix tabindex-clamp.html #

Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -1221 lines) Patch
A third_party/WebKit/LayoutTests/fast/dom/tabindex-behavior.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +19 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/tabindex-clamp.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +16 lines, -13 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/tabindex-clamp-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +27 lines, -24 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/events/max-tabindex-focus.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +25 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/wpt/html/dom/reflection-embedded-expected.txt View 1 2 3 4 5 6 7 8 9 10 12 chunks +12 lines, -96 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/wpt/html/dom/reflection-forms-expected.txt View 1 2 3 4 5 6 7 8 9 10 13 chunks +15 lines, -120 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/wpt/html/dom/reflection-grouping-expected.txt View 1 2 3 4 5 6 7 8 9 10 9 chunks +14 lines, -112 lines 0 comments Download
D third_party/WebKit/LayoutTests/imported/wpt/html/dom/reflection-metadata-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -103 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/wpt/html/dom/reflection-misc-expected.txt View 1 2 3 4 5 6 7 8 9 10 9 chunks +10 lines, -80 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/wpt/html/dom/reflection-obsolete-expected.txt View 1 2 3 4 5 6 7 8 9 10 6 chunks +6 lines, -48 lines 0 comments Download
D third_party/WebKit/LayoutTests/imported/wpt/html/dom/reflection-sections-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -231 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/wpt/html/dom/reflection-tabular-expected.txt View 1 2 3 4 5 6 7 8 9 10 10 chunks +10 lines, -80 lines 0 comments Download
M third_party/WebKit/LayoutTests/imported/wpt/html/dom/reflection-text-expected.txt View 1 2 3 4 5 6 7 8 9 10 6 chunks +29 lines, -232 lines 0 comments Download
D third_party/WebKit/LayoutTests/platform/win/fast/dom/tabindex-clamp-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -35 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Element.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +10 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ElementRareData.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +1 line, -8 lines 0 comments Download
M third_party/WebKit/Source/core/dom/ElementRareData.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Node.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Node.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLAnchorElement.h View 1 2 3 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLElement.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLElement.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFieldSetElement.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFieldSetElement.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFormControlElement.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLOutputElement.h View 1 2 3 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLOutputElement.cpp View 1 2 3 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLSlotElement.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLSlotElement.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/page/FocusController.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/svg/SVGAElement.h View 1 2 3 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGAElement.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGElement.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/svg/SVGElement.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 52 (20 generated)
rwlbuis
PTAL.
4 years, 2 months ago (2016-10-10 20:53:39 UTC) #8
tkent
kochi@ should review this. > BUG=490511 Please file a dedicated bug. 490511 isn't good for ...
4 years, 2 months ago (2016-10-11 13:32:45 UTC) #10
rwlbuis
On 2016/10/11 13:32:45, tkent wrote: > Please file a dedicated bug. 490511 isn't good for ...
4 years, 2 months ago (2016-10-11 20:18:02 UTC) #12
kochi
On 2016/10/11 20:18:02, rwlbuis wrote: > On 2016/10/11 13:32:45, tkent wrote: > > Please file ...
4 years, 2 months ago (2016-10-17 08:18:53 UTC) #13
rwlbuis
On 2016/10/17 08:18:53, kochi wrote: > On 2016/10/11 20:18:02, rwlbuis wrote: > > On 2016/10/11 ...
4 years, 2 months ago (2016-10-17 20:24:09 UTC) #14
kochi
On 2016/10/17 20:24:09, rwlbuis wrote: > On 2016/10/17 08:18:53, kochi wrote: > > On 2016/10/11 ...
4 years, 2 months ago (2016-10-18 02:34:21 UTC) #15
kochi
BTW, "Clamp" means saturating to int min/max, so the new behavior (if it overflows int ...
4 years, 2 months ago (2016-10-18 02:37:25 UTC) #16
rwlbuis
https://codereview.chromium.org/2362223002/diff/150001/third_party/WebKit/LayoutTests/platform/win/fast/dom/tabindex-clamp-expected.txt File third_party/WebKit/LayoutTests/platform/win/fast/dom/tabindex-clamp-expected.txt (right): https://codereview.chromium.org/2362223002/diff/150001/third_party/WebKit/LayoutTests/platform/win/fast/dom/tabindex-clamp-expected.txt#newcode3 third_party/WebKit/LayoutTests/platform/win/fast/dom/tabindex-clamp-expected.txt:3: On 2016/10/18 02:37:24, kochi wrote: > (this is not ...
4 years, 2 months ago (2016-10-19 00:43:43 UTC) #19
rwlbuis
On 2016/10/18 02:37:25, kochi wrote: > BTW, "Clamp" means saturating to int min/max, so > ...
4 years, 2 months ago (2016-10-19 00:47:22 UTC) #20
kochi
On 2016/10/19 00:47:22, rwlbuis wrote: > On 2016/10/18 02:37:25, kochi wrote: > > BTW, "Clamp" ...
4 years, 2 months ago (2016-10-19 02:33:23 UTC) #21
rwlbuis
On 2016/10/19 02:33:23, kochi wrote: > On 2016/10/19 00:47:22, rwlbuis wrote: > > On 2016/10/18 ...
4 years, 2 months ago (2016-10-20 00:10:52 UTC) #23
kochi
On 2016/10/20 00:10:52, rwlbuis wrote: > On 2016/10/19 02:33:23, kochi wrote: > > On 2016/10/19 ...
4 years, 2 months ago (2016-10-21 07:21:57 UTC) #24
foolip
https://codereview.chromium.org/2362223002/diff/240001/third_party/WebKit/Source/core/dom/ElementRareData.h File third_party/WebKit/Source/core/dom/ElementRareData.h (right): https://codereview.chromium.org/2362223002/diff/240001/third_party/WebKit/Source/core/dom/ElementRareData.h#newcode64 third_party/WebKit/Source/core/dom/ElementRareData.h:64: setElementFlag(TabIndexWasSetExplicitly, true); Is this flag actually needed? Can't hasAttribute(tabindexAttr) ...
4 years, 1 month ago (2016-11-03 14:17:43 UTC) #26
rwlbuis
https://codereview.chromium.org/2362223002/diff/240001/third_party/WebKit/Source/core/dom/ElementRareData.h File third_party/WebKit/Source/core/dom/ElementRareData.h (right): https://codereview.chromium.org/2362223002/diff/240001/third_party/WebKit/Source/core/dom/ElementRareData.h#newcode64 third_party/WebKit/Source/core/dom/ElementRareData.h:64: setElementFlag(TabIndexWasSetExplicitly, true); On 2016/11/03 14:17:42, foolip wrote: > Is ...
4 years, 1 month ago (2016-11-03 15:33:09 UTC) #27
foolip
https://codereview.chromium.org/2362223002/diff/240001/third_party/WebKit/Source/core/dom/ElementRareData.h File third_party/WebKit/Source/core/dom/ElementRareData.h (right): https://codereview.chromium.org/2362223002/diff/240001/third_party/WebKit/Source/core/dom/ElementRareData.h#newcode64 third_party/WebKit/Source/core/dom/ElementRareData.h:64: setElementFlag(TabIndexWasSetExplicitly, true); On 2016/11/03 15:33:09, rwlbuis wrote: > On ...
4 years, 1 month ago (2016-11-03 16:06:57 UTC) #28
rwlbuis
On 2016/11/03 16:06:57, foolip wrote: > https://codereview.chromium.org/2362223002/diff/240001/third_party/WebKit/Source/core/dom/ElementRareData.h > File third_party/WebKit/Source/core/dom/ElementRareData.h (right): > > https://codereview.chromium.org/2362223002/diff/240001/third_party/WebKit/Source/core/dom/ElementRareData.h#newcode64 > ...
4 years, 1 month ago (2016-11-03 16:11:43 UTC) #29
foolip
On 2016/11/03 16:11:43, rwlbuis wrote: > On 2016/11/03 16:06:57, foolip wrote: > > > https://codereview.chromium.org/2362223002/diff/240001/third_party/WebKit/Source/core/dom/ElementRareData.h ...
4 years, 1 month ago (2016-11-03 16:25:45 UTC) #30
rwlbuis
On 2016/10/21 07:21:57, kochi wrote: > I tried Firefox (49.0.2) and Safari Technology Preview 14. ...
4 years, 1 month ago (2016-11-03 23:18:43 UTC) #31
kochi
https://codereview.chromium.org/2362223002/diff/260001/third_party/WebKit/Source/core/dom/ElementRareData.h File third_party/WebKit/Source/core/dom/ElementRareData.h (left): https://codereview.chromium.org/2362223002/diff/260001/third_party/WebKit/Source/core/dom/ElementRareData.h#oldcode195 third_party/WebKit/Source/core/dom/ElementRareData.h:195: short m_tabindex; Didn't you get any error for SameSizeAsElementRareData? ...
4 years, 1 month ago (2016-11-04 06:49:35 UTC) #32
kochi
Thanks for all the work! On 2016/11/03 23:18:43, rwlbuis wrote: > On 2016/10/21 07:21:57, kochi ...
4 years, 1 month ago (2016-11-04 06:52:04 UTC) #33
kochi
https://codereview.chromium.org/2362223002/diff/260001/third_party/WebKit/Source/core/dom/ElementRareData.h File third_party/WebKit/Source/core/dom/ElementRareData.h (left): https://codereview.chromium.org/2362223002/diff/260001/third_party/WebKit/Source/core/dom/ElementRareData.h#oldcode195 third_party/WebKit/Source/core/dom/ElementRareData.h:195: short m_tabindex; On 2016/11/04 06:49:35, kochi wrote: > Didn't ...
4 years, 1 month ago (2016-11-04 07:17:04 UTC) #34
kochi
On 2016/11/04 07:17:04, kochi wrote: > I figured out. > The last member of NodeRareData ...
4 years, 1 month ago (2016-11-04 08:19:08 UTC) #35
kochi
On 2016/11/04 08:19:08, kochi wrote: > On 2016/11/04 07:17:04, kochi wrote: > > I figured ...
4 years, 1 month ago (2016-11-04 09:20:10 UTC) #36
rwlbuis
https://codereview.chromium.org/2362223002/diff/260001/third_party/WebKit/Source/core/dom/ElementRareData.h File third_party/WebKit/Source/core/dom/ElementRareData.h (left): https://codereview.chromium.org/2362223002/diff/260001/third_party/WebKit/Source/core/dom/ElementRareData.h#oldcode195 third_party/WebKit/Source/core/dom/ElementRareData.h:195: short m_tabindex; On 2016/11/04 06:49:35, kochi wrote: > Didn't ...
4 years, 1 month ago (2016-11-04 13:03:18 UTC) #37
rwlbuis
On 2016/11/04 06:52:04, kochi wrote: > > I am not sure, with my FF nightly ...
4 years, 1 month ago (2016-11-04 13:04:08 UTC) #38
kochi
LGTM!
4 years, 1 month ago (2016-11-04 14:43:16 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2362223002/280001
4 years, 1 month ago (2016-11-04 14:48:33 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/329108)
4 years, 1 month ago (2016-11-04 17:04:51 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2362223002/280001
4 years, 1 month ago (2016-11-04 17:28:27 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2362223002/300001
4 years, 1 month ago (2016-11-04 19:36:48 UTC) #48
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 1 month ago (2016-11-05 00:22:28 UTC) #50
commit-bot: I haz the power
4 years, 1 month ago (2016-11-05 00:25:25 UTC) #52
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/dcfa87e4ecf3f9673f642f9292f9a69e50ef6ba4
Cr-Commit-Position: refs/heads/master@{#430080}

Powered by Google App Engine
This is Rietveld 408576698