Commit e45eada6 authored by yoav@yoav.ws's avatar yoav@yoav.ws

Fix float parsing in srcset

The HTMLSrcsetParser was using a non-compliant float parser (the one used by
WTFString::charactersToFloat which is in wtf/dtoa/double-conversion).
As a result some tests were failing.
This CL switches it to use the decimal parser in HTMLParserIdioms.

BUG=523159

Review URL: https://codereview.chromium.org/1306743003

git-svn-id: svn://svn.chromium.org/blink/trunk@201132 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 65681ac0
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,b
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,b
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,b
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,b
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,b
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,c
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'x' descriptors or a mix of 'x' and 'w'/'h' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'w' descriptors or a mix of 'x' and 'w' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'x' descriptors or a mix of 'x' and 'w'/'h' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'w' descriptors or a mix of 'x' and 'w' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'h' descriptors or a mix of 'x' and 'h' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'x' descriptors or a mix of 'x' and 'w'/'h' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'x' descriptors or a mix of 'x' and 'w'/'h' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'w' descriptors or a mix of 'x' and 'w' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an 'h' descriptor and no 'w' descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'w' descriptors or a mix of 'x' and 'w' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'w' descriptors or a mix of 'x' and 'w' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'w' descriptors or a mix of 'x' and 'w' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'w' descriptors or a mix of 'x' and 'w' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'w' descriptors or a mix of 'x' and 'w' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'w' descriptors or a mix of 'x' and 'w' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'w' descriptors or a mix of 'x' and 'w' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'w' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'x' descriptors or a mix of 'x' and 'w'/'h' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'x' descriptors or a mix of 'x' and 'w'/'h' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'x' descriptors or a mix of 'x' and 'w'/'h' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'x' descriptors or a mix of 'x' and 'w'/'h' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has multiple 'x' descriptors or a mix of 'x' and 'w'/'h' descriptors.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'x' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since it has an unknown descriptor.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
CONSOLE ERROR: Failed parsing 'srcset' attribute value since its 'h' descriptor is invalid.
CONSOLE ERROR: Dropped srcset candidate data:,a
This is a testharness.js-based test.
PASS ""
PASS ","
PASS ",,,"
PASS " data:,a 1x "
PASS "\t\tdata:,a\t\t1x\t\t"
PASS "\n\ndata:,a\n\n1x\n\n"
PASS "\v\vdata:,a\v\v1x\v\v"
PASS "\f\fdata:,a\f\f1x\f\f"
PASS "\r\rdata:,a\r\r1x\r\r"
PASS "\x0e\x0edata:,a\x0e\x0e1x\x0e\x0e"
PASS "\x0f\x0fdata:,a\x0f\x0f1x\x0f\x0f"
PASS "\x10\x10data:,a\x10\x101x\x10\x10"
PASS "data:,a"
PASS "data:,a "
PASS "data:,a ,"
PASS "data:,a,"
PASS "data:,a, "
PASS "data:,a,,,"
PASS "data:,a,, , "
PASS " data:,a"
PASS ",,,data:,a"
PASS " , ,,data:,a"
PASS " data:,a"
PASS "data:,a "
PASS "data:,a 1x"
PASS "data:,a 1x "
PASS "data:,a 1x,"
PASS "data:,a ( , data:,b 1x, ), data:,c"
PASS "data:,a ((( , data:,b 1x, ), data:,c"
PASS "data:,a [ , data:,b 1x, ], data:,c"
PASS "data:,a { , data:,b 1x, }, data:,c"
PASS "data:,a \" , data:,b 1x, \", data:,c"
PASS "data:,a \\,data:;\,b, data:,c"
PASS "data:,a, data:,b ("
PASS "data:,a, data:,b ( "
PASS "data:,a, data:,b (,"
PASS "data:,a, data:,b (x"
PASS "data:,a, data:,b ()"
PASS "data:,a (, data:,b"
PASS "data:,a /*, data:,b, data:,c */"
PASS "data:,a //, data:,b"
PASS "data:,a foo"
PASS "data:,a foo foo"
PASS "data:,a foo 1x"
PASS "data:,a foo 1x foo"
PASS "data:,a foo 1w"
PASS "data:,a foo 1w foo"
PASS "data:,a 1x 1x"
PASS "data:,a 1w 1w"
PASS "data:,a 1w 1x"
PASS "data:,a 1x 1w"
PASS "data:,a 1w 1h"
PASS "data:,a 1h 1w"
PASS "data:,a 1h 1h"
PASS "data:,a 1h 1x"
PASS "data:,a 1h 1w 1x"
PASS "data:,a 1x 1w 1h"
PASS "data:,a 1w"
PASS "data:,a 1h"
PASS "data:,a 1h foo"
PASS "data:,a foo 1h"
PASS "data:,a 0w"
PASS "data:,a -1w"
PASS "data:,a 1w -1w"
PASS "data:,a 1.0w"
PASS "data:,a 1w 1.0w"
PASS "data:,a 1e0w"
PASS "data:,a 1w 1e0w"
PASS "data:,a 1www"
PASS "data:,a 1w 1www"
PASS "data:,a +1w"
PASS "data:,a 1w +1w"
PASS "data:,a 1W"
PASS "data:,a 1w 1W"
PASS "data:,a Infinityw"
PASS "data:,a 1w Infinityw"
PASS "data:,a NaNw"
PASS "data:,a 1w NaNw"
PASS "data:,a 0x1w"
PASS "data:,a 0X1w"
PASS "data:,a 1\x01w" (trailing U+0001)
PASS "data:,a 1 w" (trailing U+00A0)
PASS "data:,a 1 w" (trailing U+1680)
PASS "data:,a 1 w" (trailing U+2000)
PASS "data:,a 1 w" (trailing U+2001)
PASS "data:,a 1 w" (trailing U+2002)
PASS "data:,a 1 w" (trailing U+2003)
PASS "data:,a 1 w" (trailing U+2004)
PASS "data:,a 1 w" (trailing U+2005)
PASS "data:,a 1 w" (trailing U+2006)
PASS "data:,a 1 w" (trailing U+2007)
PASS "data:,a 1 w" (trailing U+2008)
PASS "data:,a 1 w" (trailing U+2009)
PASS "data:,a 1 w" (trailing U+200A)
PASS "data:,a 1‌w" (trailing U+200C)
PASS "data:,a 1‍w" (trailing U+200D)
PASS "data:,a 1 w" (trailing U+202F)
PASS "data:,a 1 w" (trailing U+205F)
PASS "data:,a 1 w" (trailing U+3000)
PASS "data:,a 1w" (trailing U+FEFF)
PASS "data:,a \x011w" (leading U+0001)
PASS "data:,a  1w" (leading U+00A0)
PASS "data:,a  1w" (leading U+1680)
PASS "data:,a  1w" (leading U+2000)
PASS "data:,a  1w" (leading U+2001)
PASS "data:,a  1w" (leading U+2002)
PASS "data:,a  1w" (leading U+2003)
PASS "data:,a  1w" (leading U+2004)
PASS "data:,a  1w" (leading U+2005)
PASS "data:,a  1w" (leading U+2006)
PASS "data:,a  1w" (leading U+2007)
PASS "data:,a  1w" (leading U+2008)
PASS "data:,a  1w" (leading U+2009)
PASS "data:,a  1w" (leading U+200A)
PASS "data:,a ‌1w" (leading U+200C)
PASS "data:,a ‍1w" (leading U+200D)
PASS "data:,a  1w" (leading U+202F)
PASS "data:,a  1w" (leading U+205F)
PASS "data:,a  1w" (leading U+3000)
PASS "data:,a 1w" (leading U+FEFF)
PASS "data:,a 0x"
PASS "data:,a -0x"
PASS "data:,a 1x -0x"
PASS "data:,a -1x"
PASS "data:,a 1x -1x"
PASS "data:,a 1e0x"
PASS "data:,a 1E0x"
PASS "data:,a 1e-1x"
PASS "data:,a 1.5e1x"
PASS "data:,a -x"
PASS "data:,a .x"
PASS "data:,a -.x"
FAIL "data:,a 1.x" assert_equals: expected "" but got "data:,a"
PASS "data:,a .5x"
PASS "data:,a .5e1x"
PASS "data:,a 1x 1.5e1x"
PASS "data:,a 1x 1e1.5x"
PASS "data:,a 1.0x"
PASS "data:,a 1x 1.0x"
PASS "data:,a +1x"
PASS "data:,a 1X"
PASS "data:,a Infinityx"
PASS "data:,a NaNx"
PASS "data:,a 0x1x"
PASS "data:,a 0X1x"
PASS "data:,a 1\x01x" (trailing U+0001)
PASS "data:,a 1 x" (trailing U+00A0)
PASS "data:,a 1 x" (trailing U+1680)
PASS "data:,a 1 x" (trailing U+2000)
PASS "data:,a 1 x" (trailing U+2001)
PASS "data:,a 1 x" (trailing U+2002)
PASS "data:,a 1 x" (trailing U+2003)
PASS "data:,a 1 x" (trailing U+2004)
PASS "data:,a 1 x" (trailing U+2005)
PASS "data:,a 1 x" (trailing U+2006)
PASS "data:,a 1 x" (trailing U+2007)
PASS "data:,a 1 x" (trailing U+2008)
PASS "data:,a 1 x" (trailing U+2009)
PASS "data:,a 1 x" (trailing U+200A)
PASS "data:,a 1‌x" (trailing U+200C)
PASS "data:,a 1‍x" (trailing U+200D)
PASS "data:,a 1 x" (trailing U+202F)
PASS "data:,a 1 x" (trailing U+205F)
PASS "data:,a 1 x" (trailing U+3000)
PASS "data:,a 1x" (trailing U+FEFF)
PASS "data:,a \x011x" (leading U+0001)
PASS "data:,a  1x" (leading U+00A0)
PASS "data:,a  1x" (leading U+1680)
PASS "data:,a  1x" (leading U+2000)
PASS "data:,a  1x" (leading U+2001)
PASS "data:,a  1x" (leading U+2002)
PASS "data:,a  1x" (leading U+2003)
PASS "data:,a  1x" (leading U+2004)
PASS "data:,a  1x" (leading U+2005)
PASS "data:,a  1x" (leading U+2006)
PASS "data:,a  1x" (leading U+2007)
PASS "data:,a  1x" (leading U+2008)
PASS "data:,a  1x" (leading U+2009)
PASS "data:,a  1x" (leading U+200A)
PASS "data:,a ‌1x" (leading U+200C)
PASS "data:,a ‍1x" (leading U+200D)
PASS "data:,a  1x" (leading U+202F)
PASS "data:,a  1x" (leading U+205F)
PASS "data:,a  1x" (leading U+3000)
PASS "data:,a 1x" (leading U+FEFF)
PASS "data:,a 1w 0h"
PASS "data:,a 1w -1h"
PASS "data:,a 1w 1.0h"
PASS "data:,a 1w 1e0h"
PASS "data:,a 1w 1hhh"
PASS "data:,a 1w +1h"
PASS "data:,a 1w 1H"
PASS "data:,a 1w Infinityh"
PASS "data:,a 1w NaNh"
PASS "data:,a 0x1h"
PASS "data:,a 0X1h"
PASS "data:,a 1w 1\x01h" (trailing U+0001)
PASS "data:,a 1w 1 h" (trailing U+00A0)
PASS "data:,a 1w 1 h" (trailing U+1680)
PASS "data:,a 1w 1 h" (trailing U+2000)
PASS "data:,a 1w 1 h" (trailing U+2001)
PASS "data:,a 1w 1 h" (trailing U+2002)
PASS "data:,a 1w 1 h" (trailing U+2003)
PASS "data:,a 1w 1 h" (trailing U+2004)
PASS "data:,a 1w 1 h" (trailing U+2005)
PASS "data:,a 1w 1 h" (trailing U+2006)
PASS "data:,a 1w 1 h" (trailing U+2007)
PASS "data:,a 1w 1 h" (trailing U+2008)
PASS "data:,a 1w 1 h" (trailing U+2009)
PASS "data:,a 1w 1 h" (trailing U+200A)
PASS "data:,a 1w 1‌h" (trailing U+200C)
PASS "data:,a 1w 1‍h" (trailing U+200D)
PASS "data:,a 1w 1 h" (trailing U+202F)
PASS "data:,a 1w 1 h" (trailing U+205F)
PASS "data:,a 1w 1 h" (trailing U+3000)
PASS "data:,a 1w 1h" (trailing U+FEFF)
PASS "data:,a 1w \x011h" (leading U+0001)
PASS "data:,a 1w  1h" (leading U+00A0)
PASS "data:,a 1w  1h" (leading U+1680)
PASS "data:,a 1w  1h" (leading U+2000)
PASS "data:,a 1w  1h" (leading U+2001)
PASS "data:,a 1w  1h" (leading U+2002)
PASS "data:,a 1w  1h" (leading U+2003)
PASS "data:,a 1w  1h" (leading U+2004)
PASS "data:,a 1w  1h" (leading U+2005)
PASS "data:,a 1w  1h" (leading U+2006)
PASS "data:,a 1w  1h" (leading U+2007)
PASS "data:,a 1w  1h" (leading U+2008)
PASS "data:,a 1w  1h" (leading U+2009)
PASS "data:,a 1w  1h" (leading U+200A)
PASS "data:,a 1w ‌1h" (leading U+200C)
PASS "data:,a 1w ‍1h" (leading U+200D)
PASS "data:,a 1w  1h" (leading U+202F)
PASS "data:,a 1w  1h" (leading U+205F)
PASS "data:,a 1w  1h" (leading U+3000)
PASS "data:,a 1w 1h" (leading U+FEFF)
Harness: the test ran to completion.
......@@ -97,7 +97,11 @@ struct DescriptorToken {
isValid = false;
return 0;
}
return charactersToFloat(attribute + start, lengthExcludingDescriptor, &isValid);
Decimal result = parseToDecimalForNumberType(String(attribute + start, lengthExcludingDescriptor));
isValid = result.isFinite();
if (!isValid)
return 0;
return static_cast<float>(result.toDouble());
}
};
......
......@@ -100,6 +100,7 @@ TEST(HTMLSrcsetParserTest, Basic)
{1.0, 0, "", "400.gif 400w, 6000.gif 6000w", "400.gif", std::numeric_limits<float>::infinity(), 400},
{2.0, -1, "", ", 1x.gif 1x, 2x.gif 2x", "2x.gif", 2.0, -1},
{1.0, -1, "", ",1x.gif 1x, 2x.gif 2x", "1x.gif", 1.0, -1},
{1.0, -1, "", ",1x.gif 1.x , 2x.gif 2x", "2x.gif", 2.0, -1},
{1.2, -1, "", ",1x.gif 1x, 1.4x.gif 1.4x, 2x.gif 2x", "1.4x.gif", 1.4, -1},
{1.0, -1, "", "inf.gif 0.00000000001x", "inf.gif", 1e-11, -1},
{1.0, -1, "", "data:,a ( , data:,b 1x, ), data:,c", "data:,c", 1.0, -1},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment