Closed Bug 233370 Opened 21 years ago Closed 21 years ago

Make attribute mapping into style happier

Categories

(Core :: SVG, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: alex)

Details

Attachments

(2 obsolete files)

This is spun off bug 182533 (see comment 42 on IsPresentationAttribute).
Attached patch A start (obsolete) (deleted) — Splinter Review
Alex, does this patch work (that is, do dynamic attr changes take effect properly)? If so, we can just remove nsISVGContent altogether. This is a little rough; in particular, I've done nothing to reduce the codesize by having shared attribute tables (which looks like it should be done).
This looks good to me! I'm guessing that the SVG code could have use for the mapped-attributes stuff that lives in the nsAttrAndChildArray and nsMappedAttributes classes, but that's more work since those classes arn't used for svg yet.
Right. That's independent of this patch (and something I don't know much about, of course ;) ).
Attached patch More like this (checked in) (obsolete) (deleted) — Splinter Review
This basically makes nsISVGContent unused (and to be cvs removed, unless there is reason to keep it about). The nsSVGDocument part is random cleanup that can be done now that referrer is on nsDocument.
Attachment #140818 - Attachment is obsolete: true
Comment on attachment 140851 [details] [diff] [review] More like this (checked in) jst, would you review the changes in general? Alex, could you take a look at the svg part in particular?
Attachment #140851 - Flags: superreview?(jst)
Attachment #140851 - Flags: review?(alex)
Comment on attachment 140851 [details] [diff] [review] More like this (checked in) This looks great. Just one request: To make it easier to correlate the code with the SVG specsCould you please add comments to the effect that the maps correspond to presentation attribute entities in the SVG DTD. (The entities are PresentationAttributes-FillStroke, PresentationAttributes-Graphics, etc.)
Attachment #140851 - Flags: review?(alex) → review+
Alex, do you want those comments in the nsSVGElement header or in the subclasses where the maps are actually used?
(In reply to comment #7) > Alex, do you want those comments in the nsSVGElement header or in the subclasses > where the maps are actually used? I don't mind. Personally I'd probably just put a line above the definitions: // PresentationAttributes-FillStroke /* static */ const nsGenericElement::AttributeDependenceEntry nsSVGElement::sFillStrokeMap[] = { { &nsSVGAtoms::fill }, { &nsSVGAtoms::fill_opacity }, { &nsSVGAtoms::fill_rule }, ...
Comment on attachment 140851 [details] [diff] [review] More like this (checked in) You're cvs removing nsISVGContent.h as well, right? sr=jst
Attachment #140851 - Flags: superreview?(jst) → superreview+
Comment on attachment 140851 [details] [diff] [review] More like this (checked in) Yes, naturally. Peace and short life to it. ;) Patch checked in, nsISVGContent CVS removed. Leaving this open for whatever changes sicking and afri want to make to the way the actual nsIStyleRule objects are handled.
Attachment #140851 - Attachment description: More like this → More like this (checked in)
Attachment #140851 - Attachment is obsolete: true
QA Contact: ian
Lets mark this one fixed and open a new code if/when we make svg use the mapped-attributes code in nsAttrAndChildArray.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: