Closed Bug 331481 Opened 20 years ago Closed 20 years ago

Don't create unnecessary CSS rules

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: tor, Assigned: tor)

Details

Attachments

(2 files)

Attachment #216025 - Flags: review?(roc)
Comment on attachment 216025 [details] [diff] [review] only create rule when presentation attribute present When you call RuleAbort, can you comment that this deletes the declaration? That API sucks. if (mAttrsAndChildren.AttrCount() == 0) return; Not really needed anymore, I think. Elements with no attributes are likely to be rare, and now we won't be doing much work for such elements anyway.
Attachment #216025 - Flags: superreview+
Attachment #216025 - Flags: review?(roc)
Attachment #216025 - Flags: review+
By the way, shouldn't nsSVGElement::UnsetAttr have if (aNamespaceID == kNameSpaceID_None && IsAttributeMapped(aName)) { mContentStyleRule = nsnull; } like BeforeSetAttr does? It seems like right now we should have a bug where removing a presentational attribute will fire NS_ASSERTION(!mContentStyleRule), and if we remove the last attribute, and it's presentational, then we won't update the style rule.
Both bits checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: