We currently parse unit-less, non-zero numbers as valid time values, which breaks things like animation shorthand parsing (bug 155870). We should align with other browsers.
<rdar://problem/25354495>
Here's the current code: inline bool CSSParser::shouldAcceptUnitLessValues(CSSParserValue& value, Units unitFlags, CSSParserMode cssParserMode) { // Qirks mode and svg presentation attributes accept unit less values. return (unitFlags & (FLength | FAngle | FTime)) && (!value.fValue || cssParserMode == CSSQuirksMode || cssParserMode == SVGAttributeMode); }
https://quirks.spec.whatwg.org/#the-unitless-length-quirk
Currently, the only properties this affects are transition-duration, animation-duration, and -webkit-marquee-speed. -webkit-marquee-speed is a bit of a special case though, since the marquee element's scrolldelay attribute (which is unit-less) gets converted to -webkit-marquee-speed using the CSS parser (in quirks mode, even when the document itself is not in quirks mode). It's also not supported by any other browser (Blink removed this property a while ago), so there's no concern about aligning with other browsers. So I'd be inclined to fix transition-duration and animation-duration, and leave -webkit-marquee-speed alone.
I think it's fine to treat -webkit-marquee-speed as not web-exposed, and just fix them all if it's easier.
Created attachment 315853 [details] Patch
(In reply to Simon Fraser (smfr) from comment #5) > I think it's fine to treat -webkit-marquee-speed as not web-exposed, and > just fix them all if it's easier. Leaving -webkit-marquee-speed as-is turned out to be easier, since fixing that would have required making HTMLMarqueeElement::collectStyleForPresentationAttribute append a unit to the value of the scrolldelay attribute before it gets converted to a -webkit-marquee-speed value.
Created attachment 315855 [details] Patch
Comment on attachment 315855 [details] Patch Clearing flags on attachment: 315855 Committed r219642: <http://trac.webkit.org/changeset/219642>
All reviewed patches have been landed. Closing bug.