Closed
Bug 1025691
Opened 10 years ago
Closed 10 years ago
Use C Macros for eAutcompleteField* enums
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: agi, Assigned: agi)
Details
Attachments
(1 file, 1 obsolete file)
14.54 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
From Bug 1009935 Comment 21. We could use C macros to build eAutocompleteField* instead to have the same field in two places. I'll post a small patch for it in this bug.
Assignee | ||
Comment 1•10 years ago
|
||
Olli, could you take a look? Feel free to invalidate the bug if you think it's not worth it. Thanks!
Attachment #8440448 -
Flags: review?(bugs)
Comment 2•10 years ago
|
||
I'll look at this tomorrow.
Assignee | ||
Comment 3•10 years ago
|
||
Thanks! Try: https://tbpl.mozilla.org/?tree=Try&rev=1e298f703866
Comment 4•10 years ago
|
||
Comment on attachment 8440448 [details] [diff] [review] Use Macro for eAutocompleteField* enums >+ * The first argument to AUTOCOMPLETE_* macros will be concatenated >+ * to form the C++ name of the attribute extra spaces before 'to'. But the comment seem to be a bit wrong anyway. It is up to the user to do something with the name. Not sure what would be right... something like "The first argument of AUTOCOMPLETE_* macros is the identifier for the token." >+ * The second argument is the string value of the attribute hmm, "attribute" or should it be token or some such. >+// Contact category types >+AUTOCOMPLETE_CONTACT_FIELD_NAME(TEL, "tel") >+AUTOCOMPLETE_CONTACT_FIELD_NAME(TEL_COUTRY_CODE, "tel-country-code") >+AUTOCOMPLETE_CONTACT_FIELD_NAME(TEL_NATIONAL, "tel-national") >+AUTOCOMPLETE_CONTACT_FIELD_NAME(TEL_AREA_CODE, "tel-area-code") >+AUTOCOMPLETE_CONTACT_FIELD_NAME(TEL_LOCAL, "tel-local") >+// AUTOCOMPLETE_CONTACT_FIELD_NAME(IMPP, "impp") >+AUTOCOMPLETE_CONTACT_FIELD_NAME(TEL_LOCAL_PREFIX, "tel-local-prefix") >+AUTOCOMPLETE_CONTACT_FIELD_NAME(TEL_LOCAL_SUFFIX, "tel-local-suffix") >+AUTOCOMPLETE_CONTACT_FIELD_NAME(TEL_EXTENSION, "tel-extension") >+AUTOCOMPLETE_CONTACT_FIELD_NAME(EMAIL, "email") >+// AUTOCOMPLETE_CONTACT_FIELD_NAME(IMPP, "impp") You have IMPP twice. Remove the first one. >- eAutocompleteFieldName_last, // Dummy to check table sizes >+ #define AUTOCOMPLETE_FIELD_NAME(name_, value_) \ >+ eAutocompleteFieldName_##name_, I think all the #defines should use just 2 spaces for indentation in the next line. (coding style probably doesn't say anything about this kind of rarely used thing) r- just because I'd like to see the final patch before it is pushed to tree.
Attachment #8440448 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 5•10 years ago
|
||
Ok, I addressed your comments and put back the { 0 } at the end of EnumTables so we actually pass tests now. Try: https://tbpl.mozilla.org/?tree=Try&rev=91303e322e5c Thank you!
Assignee: nobody → agi.novanta
Attachment #8440448 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8444021 -
Flags: review?(bugs)
Updated•10 years ago
|
Attachment #8444021 -
Flags: review?(bugs) → review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 6•10 years ago
|
||
Please use the right bug number in future. https://hg.mozilla.org/integration/mozilla-inbound/rev/83d14fd3d739 https://hg.mozilla.org/integration/mozilla-inbound/rev/b563ec69fa02 https://hg.mozilla.org/integration/mozilla-inbound/rev/9d0abd034712
Updated•10 years ago
|
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/9d0abd034712
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•