Bug 220648

Summary: When non-integer tabindex is set, the behavior of element should be same as the tabindex is omitted
Product: WebKit Reporter: Tomoki Imai <tomoki.imai>
Component: DOMAssignee: Tomoki Imai <tomoki.imai>
Status: CLOSED FIXED    
Severity: Normal CC: cdumez, changseok, don.olmstead, esprehn+autocc, ews-watchlist, gyuyoung.kim, koivisto, tomoki.imai, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
LayoutTest testcase to overwrite tabindex with non-integer value
none
patch none

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!