Consider merging https://chromium.googlesource.com/chromium/blink/+/ac7e5c0cbc39fa3899dc556af24157e71a7d789b HTML5 defines the "rules for parsing a list of dimensions" in section 2.4.4.6. Those rules are very close to our legacy code with a couple of differences: - For inputs with only leading spaces and a unit, HTML5 return 0 with the specified unit. The old code would return (1, Relative). - HTML5 allow doubles for every units and not just percentage. The 2 new behaviors are more consistent with the author's intent (and are corner cases) so the compatibility risk of this change is small.
Or rather https://chromium.googlesource.com/chromium/blink/+/b27831a7d3ed84d8c71261921519ba05bf630aaf