LibWeb: Don't allow HTMLTextAreaElement rows and cols to be set to 0

In this case we should fall back to the default value.
This commit is contained in:
Tim Ledbetter 2024-11-28 16:08:14 +00:00 committed by Andreas Kling
commit aafc829e6d
Notes: github-actions[bot] 2024-11-29 08:50:08 +00:00
4 changed files with 40 additions and 12 deletions

View file

@ -11,11 +11,16 @@
println(`${elementName}.${propertyName} after ${elementName}.setAttribute("${attributeName}", "${value}"): ${propertyGetter(element)}`);
element = document.createElement(elementName);
propertySetter(element, value);
println(`${elementName}.getAttribute("${attributeName}") after ${elementName}.${propertyName} = ${value}: ${element.getAttribute(attributeName)}`);
println(`${elementName}.${propertyName} after ${elementName}.${propertyName} = ${value}: ${propertyGetter(element)}`);
try {
propertySetter(element, value);
println(`${elementName}.getAttribute("${attributeName}") after ${elementName}.${propertyName} = ${value}: ${element.getAttribute(attributeName)}`);
println(`${elementName}.${propertyName} after ${elementName}.${propertyName} = ${value}: ${propertyGetter(element)}`);
} catch (e) {
println(`${elementName}.${propertyName} = ${value} threw exception of type ${e.name}`);
}
}
setValue(0);
setValue(1);
setValue(2147483647);
setValue(2147483648);