Summary: | Align quirky number parsing with other browsers | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||
Component: | CSS | Assignee: | Ali Juma <ajuma> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ajuma, commit-queue, dino, eoconnor, hyatt, koivisto, simon.fraser, webkit-bug-importer, zcorpan | ||||||
Priority: | P2 | Keywords: | InRadar, WebExposed | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 155870 | ||||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2016-03-24 22:55:57 PDT
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); } 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. |