add method to get a CSS property's IDL name

RESOLVED FIXED in Firefox 44

Status

()

Core
CSS Parsing and Computation
RESOLVED FIXED
3 years ago
3 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

3 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

3 years ago
Created attachment 8663988 [details] [diff] [review]
Part 1: Move for-Python preprocessor-generated CSS property list header to layout/style/.
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #8663988 - Flags: review?(bzbarsky)
(Assignee)

Comment 2

3 years ago
Created attachment 8663989 [details] [diff] [review]
Part 2: Note internal CSS properties in a way that Python scripts can use.

Happy to make this a real flag with a value.
Attachment #8663989 - Flags: review?(bzbarsky)
(Assignee)

Comment 3

3 years ago
Created attachment 8663990 [details] [diff] [review]
Part 3: Include internal properties in PythonCSSProps.h and annotate each with a type.
Attachment #8663990 - Flags: review?(bzbarsky)
(Assignee)

Comment 4

3 years ago
Created attachment 8663991 [details] [diff] [review]
Part 4: Add method to get a CSS property's IDL name.
Attachment #8663991 - 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

3 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

3 years ago
Blocks: 1207028
https://hg.mozilla.org/mozilla-central/rev/69eb8453d2fc
https://hg.mozilla.org/mozilla-central/rev/54f8cc98e632
https://hg.mozilla.org/mozilla-central/rev/30013b9e1a2a
https://hg.mozilla.org/mozilla-central/rev/3dbdab615328
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox44: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.