Closed
Bug 968118
Opened 12 years ago
Closed 12 years ago
Make nsCSSProps keyword tables use int16_t instead of int32_t
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: roc, Assigned: roc)
Details
Attachments
(1 file)
|
92.68 KB,
patch
|
heycam
:
review+
|
Details | Diff | Splinter Review |
This should be a small space win.
| Assignee | ||
Comment 1•12 years ago
|
||
Attachment #8370659 -
Flags: review?(cam)
Comment 2•12 years ago
|
||
Comment on attachment 8370659 [details] [diff] [review]
Make nsCSSProps keyword tables be int16_t instead of int32_t for a small space win
Review of attachment 8370659 [details] [diff] [review]:
-----------------------------------------------------------------
Please wrap lines to avoid going over the 80 column limit.
I almost was going to suggest changing the nsCSSProps method arguments for values to KTableValues, but it's probably not worth it; in lieu, the assertions I mention below.
::: layout/style/nsCSSProps.cpp
@@ +1941,1 @@
> {
Add an assertion that aValue can fit within a KTableValue.
@@ +1954,5 @@
> return eCSSKeyword_UNKNOWN;
> }
>
> const nsAFlatCString&
> +nsCSSProps::ValueToKeyword(int32_t aValue, const KTableValue aTable[])
Add an assertion that aValue can fit within a KTableValue.
@@ +1979,5 @@
> nsCSSProps::LookupPropertyValue(nsCSSProperty aProp, int32_t aValue)
> {
> NS_ABORT_IF_FALSE(aProp >= 0 && aProp < eCSSProperty_COUNT,
> "property out of range");
>
Add an assertion that aValue can fit within a KTableValue.
::: layout/style/nsCSSProps.h
@@ +313,3 @@
>
> static const nsStyleStructID kSIDTable[eCSSProperty_COUNT_no_shorthands];
> + static const KTableValue* const kKeywordTableTable[eCSSProperty_COUNT_no_shorthands];
Remove the double space now that the member names don't line up.
Attachment #8370659 -
Flags: review?(cam) → review+
| Assignee | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in
before you can comment on or make changes to this bug.
Description
•