[webkit-changes] [WebKit/WebKit] 82369f: Index setters of HTMLSelectElement and HTMLOptions...
Ahmad Saleem
noreply at github.com
Sun Dec 4 06:34:00 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 82369f26704dd44dc3908e100cd12d21e270807b
https://github.com/WebKit/WebKit/commit/82369f26704dd44dc3908e100cd12d21e270807b
Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
Date: 2022-12-04 (Sun, 04 Dec 2022)
Changed paths:
M LayoutTests/fast/forms/select-max-length-expected.txt
M LayoutTests/fast/forms/select-max-length.html
M Source/WebCore/html/HTMLSelectElement.cpp
Log Message:
-----------
Index setters of HTMLSelectElement and HTMLOptionsCollection should do nothing if the requested index is too large
Index setters of HTMLSelectElement and HTMLOptionsCollection should do nothing if the requested index is too large
https://bugs.webkit.org/show_bug.cgi?id=247797
Reviewed by Ryosuke Niwa.
This patch is to align Webkit with Gecko / Firefox and Blink / Chromium.
Partial Merge - https://chromium.googlesource.com/chromium/blink/+/e8638d6c3d11996a2b845a31f6c255f7f17b1a89
This patch is to make index setter aligned with length setter. In this
patch following changes are done to "setItem" function:
-> Do not skip processing if an option list has enough size. We don't
limit an option list length if the options were parsed by the
HTML parser. So an option list length can be larger than
maxSelectItems.
There's no reason to skip the processing or shrink the length if
the list already has enough size.
-> Show console warnings when they do nothing due to the length limitation.
* Source/WebCore/html/HTMLSelectElement.cpp:
(HTMLSelectElement::setItem): Add logic for index setter similar to
length setter and console warning message
* LayoutTests/fast/forms/select-max-length.html: Update Test Case
* LayoutTests/fast/forms/select-max-length-expected.txt: Rebaselined
Canonical link: https://commits.webkit.org/257351@main
More information about the webkit-changes
mailing list