DescriptionClamp rgba(...) alpha value in the CSS fast-path parser
The general CSS parser will clamp the alpha value to the [0, 1] range,
while the fast-path parser does not. This means that large alpha values
will result in overflow in the cast to int, yielding the wrong color
value.
Add a clamp to the [0, 1] range before converting to the [0, 256) range
and converting to int. Because negative values are handled separately,
we only need to apply the clamp for the range above zero.
BUG=675158
Committed: https://crrev.com/6c6634508a1438f66057dc414af8171be9602e7c
Cr-Commit-Position: refs/heads/master@{#440374}
Patch Set 1 #
Total comments: 2
Messages
Total messages: 16 (9 generated)
|