Bug 220648 - When non-integer tabindex is set, the behavior of element should be same as the tabindex is omitted
Summary: When non-integer tabindex is set, the behavior of element should be same as t...
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Tomoki Imai
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-01-14 23:55 PST by Tomoki Imai
Modified: 2021-01-18 18:11 PST (History)
9 users (show)

See Also:


Attachments
LayoutTest testcase to overwrite tabindex with non-integer value (621 bytes, text/html)
2021-01-14 23:55 PST, Tomoki Imai
no flags Details
patch (3.96 KB, patch)
2021-01-15 00:08 PST, Tomoki Imai
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomoki Imai 2021-01-14 23:55:50 PST
Created attachment 417680 [details]
LayoutTest testcase to overwrite tabindex with non-integer value

According to the spec, non-integer and omitted tabindex have the same behavior.
https://html.spec.whatwg.org/multipage/interaction.html#attr-tabindex

Current WebKit implementation doesn't overwrite the internal tabindex value when new tabindex is non-integer.
As a result, its behavior is not changed from the previous tabindex.

Attached testcase shows the compatibility problem the other browsers.
If it's opened in WinCairo MiniBrowser/Safari TP 118, it shows "FAIL".
But on Firefox/Chrome, it shows "PASS".

I already created the patch, so we'll post another attachment soon.
Comment 1 Tomoki Imai 2021-01-15 00:08:45 PST
Created attachment 417681 [details]
patch

Patch
Comment 2 Antti Koivisto 2021-01-15 08:16:46 PST
Seems sensible.
Comment 3 EWS 2021-01-15 08:53:51 PST
Committed r271523: <https://trac.webkit.org/changeset/271523>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 417681 [details].
Comment 4 Radar WebKit Bug Importer 2021-01-15 08:54:14 PST
<rdar://problem/73250245>
Comment 5 Tomoki Imai 2021-01-18 18:11:19 PST
Thanks for your review and merging!