Closed Bug 332321 Opened 16 years ago Closed 4 years ago
The nsRuleNode::GetStructData can be removed -- I've been wanting to remove them for ages. This gets rid of an if-else chain that's a performance issue and also is a step towards making the computation table-driven, which we'll need to do for css3-values features that I'd like to implement.
So it turns out I can't actually do this without doing the whole table-driven thing.
Actually, if the constructors of the nsRuleData* were all equivalent to memset-to-zero (probably true) and the destructors were all no-op (probably not, due to refcounting, but perhaps doable), then this wouldn't need bug 332335. And only part of bug 332335 is really need for the css3-values stuff I want to do.
See bug 360870 for some changes in this area that we may want to partly revert when doing this.
We could probably do this without table-driven stuff, but we'd want to change the ownership model of the data inside nsCSSStruct (to user manages). Also, the nsRuleNode::GetStyleData code would need to look like: nsStyleSet *set = mPresContext->PresShell()->StyleSet(); nsRuleData *ruleData = set->PushWalkingRuleData(); ... WalkRuleTree(...) set->PopWalkingRuleData(); since we can recur into this code.
nsRuleNode is gone.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.