Closed
Bug 840367
Opened 11 years ago
Closed 11 years ago
nsCSSKeywordList.h violates its rules
Categories
(Core :: CSS Parsing and Computation, defect, P4)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: jruderman, Assigned: dbaron)
References
()
Details
Attachments
(1 file)
7.24 KB,
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
24 Entries are in the form: (name, id). 'id' must always be the same as 'name' 25 except that all hyphens ('-') in 'name' are converted to underscores ('_') 26 in 'id'. This lets us do nice things with the macros without having to 27 copy/convert strings at runtime. These 10 violate the rules, which got in my way when trying to import the "-moz-appearance" list into my fuzzer. I'm not sure what else is supposed to go wrong. CSS_KEY(tab-scroll-arrow-back, tabscrollarrow_back) CSS_KEY(tab-scroll-arrow-forward, tabscrollarrow_forward) CSS_KEY(menulist-button, menulistbutton) CSS_KEY(menulist-text, menulisttext) CSS_KEY(menulist-textfield, menulisttextfield) CSS_KEY(checkbox-container, checkboxcontainer) CSS_KEY(radio-container, radiocontainer) CSS_KEY(checkbox-label, checkboxlabel) CSS_KEY(radio-label, radiolabel) CSS_KEY(button-focus, buttonfocus)
Assignee | ||
Comment 1•11 years ago
|
||
I think the only thing that breaks is that people get confused when adding new items or figuring out whether items exist already.
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #712737 -
Flags: review?(cam)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → dbaron
Assignee | ||
Comment 3•11 years ago
|
||
And my command to check what was misnamed was: diff <(cat nsCSSKeywordList.h | grep CSS_KEY | sed 's,^//,,' | sed 's/CSS_KEY(\([^,]*\), \([^,]*\))/\1/') <(cat nsCSSKeywordList.h | grep CSS_KEY | sed 's,^//,,' | sed 's/CSS_KEY(\([^,]*\), \([^,]*\))/\2/' | sed 's/_/-/g') | less -S
Assignee | ||
Updated•11 years ago
|
OS: Mac OS X → All
Hardware: x86_64 → All
Comment 4•11 years ago
|
||
Comment on attachment 712737 [details] [diff] [review] Fix misnaming of keyword IDs in nsCSSKeywordList.h. Is it worth putting using that comment 3 command to use in a "check" target in layout/style/Makefile.in? Could check the lowercase requirement there, too.
Attachment #712737 -
Flags: review?(cam) → review+
Assignee | ||
Comment 5•11 years ago
|
||
It's not a bad idea, but I tend to think it's probably not worth the effort (and making sure it's all portable across anything that we use for building, etc.).
Assignee | ||
Comment 6•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/9b0d85344d32
Priority: -- → P4
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9b0d85344d32
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in
before you can comment on or make changes to this bug.
Description
•