add method to get a CSS property's IDL name

RESOLVED FIXED in Firefox 44

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: heycam, Assigned: heycam)

Tracking

Trunk
mozilla44
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox43 affected, firefox44 fixed)

Details

Attachments

(4 attachments)

Assignee

Description

4 years ago
For KeyframeEffect.getFrames(), we need to set JS properties on the returned Keyframe dictionary objects for the CSS properties in the keyframe, whose names are the corresponding CSS2Properties names.  This bug is to add a method to nsCSSProps to get a property's IDL name.
Assignee

Comment 1

4 years ago
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #8663988 - Flags: review?(bzbarsky)
Assignee

Comment 2

4 years ago
Happy to make this a real flag with a value.
Attachment #8663989 - Flags: review?(bzbarsky)
Comment on attachment 8663988 [details] [diff] [review]
Part 1: Move for-Python preprocessor-generated CSS property list header to layout/style/.

r=me
Attachment #8663988 - Flags: review?(bzbarsky) → review+
Comment on attachment 8663989 [details] [diff] [review]
Part 2: Note internal CSS properties in a way that Python scripts can use.

>+// the DOM style code defines this).  All properties defined in an
>+// #ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL section must have the
>+// CSS_PROPERTY_INTERNAL flag set.

Could we assert that somewhere?  Maybe some array where we set all the elements to true while including all props, then to false while excluding internal ones, then walk that array?

I guess that would require making this a real flag....

r=me either way.
Attachment #8663989 - Flags: review?(bzbarsky) → review+
Comment on attachment 8663990 [details] [diff] [review]
Part 3: Include internal properties in PythonCSSProps.h and annotate each with a type.

r=me
Attachment #8663990 - Flags: review?(bzbarsky) → review+
Comment on attachment 8663991 [details] [diff] [review]
Part 4: Add method to get a CSS property's IDL name.

r=me, though this all seems like a lot of complexity compared to just putting this into the property table.... :(  That's just time-consuming and annoying to do.
Attachment #8663991 - Flags: review?(bzbarsky) → review+
Assignee

Comment 10

4 years ago
(In reply to Boris Zbarsky [:bz] from comment #7)
> Could we assert that somewhere?  Maybe some array where we set all the
> elements to true while including all props, then to false while excluding
> internal ones, then walk that array?
> 
> I guess that would require making this a real flag....

Yeah, it would.  I think I'll just do that (in case someone tries to use it as a real flag from C++ without reading the comment).  Then I'll add some static_asserts like you suggest at the bottom of nsCSSProps.cpp.

(In reply to Boris Zbarsky [:bz] from comment #9)
> r=me, though this all seems like a lot of complexity compared to just
> putting this into the property table.... :(  That's just time-consuming and
> annoying to do.

True.  Oh well, it's done now.  (And I will extend GenerateCSSPropsGenerated.py with another table that isn't as easy to add to nsCSSPropList.h, soon.)
Assignee

Updated

4 years ago
Blocks: 1207028
You need to log in before you can comment on or make changes to this bug.