LibWeb: Limit HTMLTextAreaElement attributes to allowed values

If `HTMLTextAreaElement.rows` or `HTMLTextAreaElement.cols`
is set to a value larger than 2147483647, then it should be set to its
default value.
This commit is contained in:
Tim Ledbetter 2024-11-26 21:14:32 +00:00 committed by Andreas Kling
commit 7fe3bf07e2
Notes: github-actions[bot] 2024-11-27 10:03:52 +00:00
3 changed files with 42 additions and 2 deletions

View file

@ -46,3 +46,35 @@ marquee.getAttribute("scrolldelay") after marquee.setAttribute("scrollDelay", "4
marquee.scrollDelay after marquee.setAttribute("scrolldelay", "4294967295"): 85
marquee.getAttribute("scrolldelay") after marquee.scrollDelay = 4294967295: 85
marquee.scrollDelay after marquee.scrollDelay = 4294967295: 85
textarea.getAttribute("rows") after textarea.setAttribute("rows", "1"): 1
textarea.rows after textarea.setAttribute("rows", "1"): 1
textarea.getAttribute("rows") after textarea.rows = 1: 1
textarea.rows after textarea.rows = 1: 1
textarea.getAttribute("rows") after textarea.setAttribute("rows", "2147483647"): 2147483647
textarea.rows after textarea.setAttribute("rows", "2147483647"): 2147483647
textarea.getAttribute("rows") after textarea.rows = 2147483647: 2147483647
textarea.rows after textarea.rows = 2147483647: 2147483647
textarea.getAttribute("rows") after textarea.setAttribute("rows", "2147483648"): 2147483648
textarea.rows after textarea.setAttribute("rows", "2147483648"): 2
textarea.getAttribute("rows") after textarea.rows = 2147483648: 2
textarea.rows after textarea.rows = 2147483648: 2
textarea.getAttribute("rows") after textarea.setAttribute("rows", "4294967295"): 4294967295
textarea.rows after textarea.setAttribute("rows", "4294967295"): 2
textarea.getAttribute("rows") after textarea.rows = 4294967295: 2
textarea.rows after textarea.rows = 4294967295: 2
textarea.getAttribute("cols") after textarea.setAttribute("cols", "1"): 1
textarea.cols after textarea.setAttribute("cols", "1"): 1
textarea.getAttribute("cols") after textarea.cols = 1: 1
textarea.cols after textarea.cols = 1: 1
textarea.getAttribute("cols") after textarea.setAttribute("cols", "2147483647"): 2147483647
textarea.cols after textarea.setAttribute("cols", "2147483647"): 2147483647
textarea.getAttribute("cols") after textarea.cols = 2147483647: 2147483647
textarea.cols after textarea.cols = 2147483647: 2147483647
textarea.getAttribute("cols") after textarea.setAttribute("cols", "2147483648"): 2147483648
textarea.cols after textarea.setAttribute("cols", "2147483648"): 20
textarea.getAttribute("cols") after textarea.cols = 2147483648: 20
textarea.cols after textarea.cols = 2147483648: 20
textarea.getAttribute("cols") after textarea.setAttribute("cols", "4294967295"): 4294967295
textarea.cols after textarea.setAttribute("cols", "4294967295"): 20
textarea.getAttribute("cols") after textarea.cols = 4294967295: 20
textarea.cols after textarea.cols = 4294967295: 20