Closed Bug 699592 Opened 8 years ago Closed 8 years ago
Would like a way to ask if a property is inherited by default
We're working on a developer tool (similar to firebug's) that shows the css rules that apply to an element. It shows properties from cssText for rules returned from nsIDOMUtils::getCSSStyleRules(). For parent elements, we want to show only properties whose value might be inherited.
Attachment #571788 - Flags: review?(bzbarsky)
Comment on attachment 571788 [details] [diff] [review] maybe this will work >+++ b/layout/inspector/src/inDOMUtils.cpp >+ *_retval = (sid < nsStyleStructID_Reset_Start); How about: *_retval = !nsCachedStyleData::IsReset(sid); ? You'll need to include nsRuleNode.h. r=me with that.
Attachment #571788 - Flags: review?(bzbarsky) → review+
Comment on attachment 571788 [details] [diff] [review] maybe this will work Actually, wait. This will break for shorthands because kSIDTable only goes up to eCSSProperty_COUNT_no_shorthands. You need to handle shorthands specially (e.g by setting |prop| to one of the longhands the shorthand expands to). And please add some tests (including for the above) and a commit message?
Attachment #571788 - Flags: review+ → review-
Comment on attachment 572093 [details] [diff] [review] v2 r=me
Attachment #572093 - Flags: review? → review+
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.