Parse clamped unsigned integer attribute values correctly.
https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#clamped-to-the-range We had a bug that an attribute value greater than 2^32-1 was handled as a parse error, instead of range overflow. We need to clamp such values to a maximum value defined for a attribute. Implementation: The main change is to introduce blink::ParseHTMLClampedNonNegativeInteger(), and use it in HTMLTableCellElement and HTMLTableColElement. This CL introduces WTF::NumberParsingState in order to pass "fail by overflow" information from platform/wtf/StringToNumber code. Bug: 745376 Change-Id: Ie57a0538816f0f508324573cdcda6d96ad51afb2 Reviewed-on: https://chromium-review.googlesource.com/577428Reviewed-by:Takayoshi Kochi <kochi@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#488143}
Showing
Please register or sign in to comment