Closed Bug 699592 Opened 13 years ago Closed 13 years ago

Would like a way to ask if a property is inherited by default

Categories

(Core :: CSS Parsing and Computation, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10

People

(Reporter: dcamp, Assigned: dcamp)

Details

(Whiteboard: [fixed-in-fx-team])

Attachments

(1 file, 1 obsolete file)

Attached patch maybe this will work (obsolete) — Splinter Review
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-
Attached patch v2Splinter Review
Assignee: nobody → dcamp
Attachment #571788 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #572093 - Flags: review?
Attachment #572093 - Flags: review? → review+
Whiteboard: [fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: