Closed
Bug 1370458
Opened 6 years ago
Closed 6 years ago
Disallow floats, negative values, and values longer than six characters in the hashless quirk
Categories
(Core :: CSS Parsing and Computation, enhancement)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: manishearth, Assigned: manishearth)
References
Details
Attachments
(1 file)
https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk We were failing a bunch of WPT tests because of this.
Comment hidden (mozreview-request) |
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8874718 [details] Bug 1370458: Disallow floats, negative numbers, and long values in hashless color quirk; https://reviewboard.mozilla.org/r/146096/#review150004 r=me with comments addressed. ::: layout/style/nsCSSParser.cpp:6700 (Diff revision 1) > +static > +int > +numberSize(uint32_t number) { * please put `static` and the return type in the same line * the return type should probably be `uint32_t` rather than impl-dependent sized `int` * function name should be a verb phase and it should start with uppercase, and this seems to be very specific to the color case so probably `CountNumbersForHashlessColor`. ::: layout/style/nsCSSParser.cpp:6718 (Diff revision 1) > + } else if (number < 100000) { > + return 5; > + } else if (number < 1000000) { > + return 6; > + } else { > + return 100; Probably add a comment stating that this is the wrong case, and we don't care the specific number as far as it is larger than 6.
Attachment #8874718 -
Flags: review?(xidorn+moz) → review+
Comment hidden (mozreview-request) |
Comment 4•6 years ago
|
||
> +numberSize(uint32_t number) {
The param should be named aNumber to follow our naming conventions.
Assignee | ||
Comment 5•6 years ago
|
||
Try was at https://treeherder.mozilla.org/#/jobs?repo=try&revision=174011af6f7a4f592f03514b93b2e66f92ad768b
Pushed by manishearth@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f061b418bf20 Disallow floats, negative numbers, and long values in hashless color quirk; r=xidorn
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f061b418bf20
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment 8•6 years ago
|
||
(In reply to Mats Palmgren (:mats) from comment #4) > > +numberSize(uint32_t number) { > > The param should be named aNumber to follow our naming conventions. Yeah, you're right... Sorry for not catching this... Probably I read too much Rust code nowadays :/
You need to log in
before you can comment on or make changes to this bug.
Description
•