Changeset 271523 in webkit
- Timestamp:
- Jan 15, 2021 8:53:46 AM (18 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/html/tabindex-overwrite-with-non-integer-expected.txt (added)
-
LayoutTests/fast/html/tabindex-overwrite-with-non-integer.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/html/HTMLElement.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r271516 r271523 1 2021-01-15 Tomoki Imai <Tomoki.Imai@sony.com> 2 3 When non-integer tabindex is set, the behavior of element should be same as the tabindex is omitted. 4 https://bugs.webkit.org/show_bug.cgi?id=220648 5 6 Reviewed by Antti Koivisto. 7 8 Add LayoutTest case for tabindex which is overwritten by non-integers. 9 When non-integer tabindex is specified, the element should behave the same way as the tabindex is omitted. 10 https://html.spec.whatwg.org/multipage/interaction.html#attr-tabindex 11 12 * fast/html/tabindex-overwrite-with-non-integer-expected.txt: Added. 13 * fast/html/tabindex-overwrite-with-non-integer.html: Added. 14 1 15 2021-01-15 Zalan Bujtas <zalan@apple.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r271521 r271523 1 2021-01-15 Tomoki Imai <Tomoki.Imai@sony.com> 2 3 When non-integer tabindex is set, the behavior of element should be same as the tabindex is omitted. 4 https://bugs.webkit.org/show_bug.cgi?id=220648 5 6 Reviewed by Antti Koivisto. 7 8 When non-integer tabindex is specified, the element should behave the same way as the tabindex is omitted. 9 https://html.spec.whatwg.org/multipage/interaction.html#attr-tabindex 10 11 WebKit didn't overwrite the internal tabindex value when the new value is non-integer. 12 13 Test: LayoutTests\fast\html\tabindex-overwrite-with-non-integer.html 14 15 * html/HTMLElement.cpp: 16 (WebCore::HTMLElement::parseAttribute): If the new value cannot be parsed as the integer, clear the existing tabindex. 17 1 18 2021-01-15 Rob Buis <rbuis@igalia.com> 2 19 -
trunk/Source/WebCore/html/HTMLElement.cpp
r271011 r271523 453 453 454 454 if (name == tabindexAttr) { 455 if (value.isEmpty()) 455 if (auto optionalTabIndex = parseHTMLInteger(value)) 456 setTabIndexExplicitly(optionalTabIndex.value()); 457 else 456 458 setTabIndexExplicitly(WTF::nullopt); 457 else if (auto optionalTabIndex = parseHTMLInteger(value))458 setTabIndexExplicitly(optionalTabIndex.value());459 459 return; 460 460 }
Note: See TracChangeset
for help on using the changeset viewer.