Closed
Bug 1006595
Opened 11 years ago
Closed 10 years ago
Add domUtils.GetCSSSubPropertiesForProperty, getCSSPropertyIsShorthand, CSSPropertySupportsType (Color, Gradient etc.)
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: miker, Assigned: bzbarsky)
References
Details
(Keywords: dev-doc-needed)
Attachments
(1 file, 1 obsolete file)
We would like a few extra utility methods in DOMUtils that allow us to gather a little extra information about CSS properties.
These are:
void getCSSSubPropertiesForProperty(in AString aProperty,
[optional] out unsigned long aLength,
[array, size_is(aLength), retval] out wstring aValues);
bool getCSSPropertySupportsColor(in AString aProperty);
bool getCSSPropertySupportsGradient(in AString aProperty);
bool getCSSPropertyIsShorthand(in AString aProperty);
Ideally, we would use getCSSPropertySupportsType instead of getCSSPropertySupportsColor and getCSSPropertySupportsGradient but I couldn't find a simple way to get that to expose the variants from nsCSSProps.h to JS.
Probably 'cos I am a JS hacker.
Can somebody have a quick look over the code, suggest any improvements and let me know how to expose the variants?
Reporter | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
Those variants are a bit of an implementation detail that I think we'd rather not expose...
Assignee | ||
Comment 3•11 years ago
|
||
That said, the implementations could obviously be shared internally, with a utility function that takes a variant id.
Reporter | ||
Updated•11 years ago
|
Summary: Add domUtils.getCSSSubPropertiesForProperty, CSSValuesForProperty, CSSPropertySupportsColor & GetCSSPropertySupportsGradient → Add domUtils.getCSSSubPropertiesForProperty, CSSValuesForProperty, CSSPropertySupportsType (Color, Gradient etc.)
Reporter | ||
Comment 5•10 years ago
|
||
API:
bool GetCSSSubPropertiesForProperty(in AString aProperty); // Already in patch
bool getCSSPropertyIsShorthand(in AString aProperty); // Already in patch
bool getCSSPropertySupportsType(variant bits from idl);
Reporter | ||
Updated•10 years ago
|
Summary: Add domUtils.getCSSSubPropertiesForProperty, CSSValuesForProperty, CSSPropertySupportsType (Color, Gradient etc.) → Add domUtilsGetCSSSubPropertiesForProperty, getCSSPropertyIsShorthand, CSSPropertySupportsType (Color, Gradient etc.)
Reporter | ||
Updated•10 years ago
|
Summary: Add domUtilsGetCSSSubPropertiesForProperty, getCSSPropertyIsShorthand, CSSPropertySupportsType (Color, Gradient etc.) → Add domUtils.GetCSSSubPropertiesForProperty, getCSSPropertyIsShorthand, CSSPropertySupportsType (Color, Gradient etc.)
Assignee | ||
Comment 6•10 years ago
|
||
Mike, please double-check the behavior of NUMBER/INTEGER and see if it's the one you want
Attachment #8445930 -
Flags: review?(dbaron)
Attachment #8445930 -
Flags: feedback?(mratcliffe)
Assignee | ||
Updated•10 years ago
|
Assignee: mratcliffe → bzbarsky
Status: NEW → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Whiteboard: [need review]
Reporter | ||
Comment 7•10 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #6)
> Mike, please double-check the behavior of NUMBER/INTEGER and see if it's the
> one you want
This is exactly what we need... thanks.
Reporter | ||
Updated•10 years ago
|
Attachment #8445930 -
Flags: feedback?(mratcliffe) → feedback+
Comment on attachment 8445930 [details] [diff] [review]
Add some APIs on inIDOMUtils to allow determining the subproperties of a CSS shorthand, whether a property is a shorthand, and whether a given property supports a given type of value
r=dbaron
Attachment #8445930 -
Flags: review?(dbaron) → review+
Reporter | ||
Updated•10 years ago
|
Attachment #8418104 -
Attachment is obsolete: true
Assignee | ||
Comment 9•10 years ago
|
||
Added the missing IID rev and https://hg.mozilla.org/integration/mozilla-inbound/rev/cc0c09414a1c
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla33
Comment 10•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 11•10 years ago
|
||
Please document this at https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/inIDOMUtils.
Sebastian
Assignee | ||
Updated•10 years ago
|
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•