Closed Bug 343760 Opened 18 years ago Closed 18 years ago

Don't copy nsITextContent into glyph frames

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: longsonr, Assigned: longsonr)

Details

Attachments

(1 file, 2 obsolete files)

The characters in a text node are copied into the glyph frames which means we store each piece of svg text twice.
Attached patch patch (obsolete) — Splinter Review
Get the text from the text content whenever we need it rather than keeping a copy.

Note that this patch changes whitespace handling. Consider the following example:

<text>ab<tspan> cde </tspan>fg</text>

Considering http://www.w3.org/TR/SVG/text.html#WhiteSpace and looking at the xml:space="default" case it seems to me that we should strip out the spaces around the tspan element. Currently we'd not strip either of these spaces.

Also includes an optimisation to get all character advances in one go rather than one at a time. Is the idl correct for that. Surely there is a better way to indicate I want a float ** argument.
Assignee: general → longsonr
Status: NEW → ASSIGNED
Attachment #228296 - Flags: review?(tor)
Comment on attachment 228296 [details] [diff] [review]
patch

nsSVGGlyphFrame::GetCharacterPosition changes submitted under bug 343774
Attachment #228296 - Flags: review?(tor)
Attached patch patch (obsolete) — Splinter Review
Attachment #228296 - Attachment is obsolete: true
Attachment #229806 - Flags: review?(tor)
Comment on attachment 229806 [details] [diff] [review]
patch

Update the uuid for nsISVGGlyphFragmentNode.

Use nsAutoString in GetCharacterData and GetNumberOfCharacters.

File a bug about looking at xml:spac if one doesn't already exist.

With those, r=tor.
Attachment #229806 - Flags: review?(tor) → review+
> Update the uuid for nsISVGGlyphFragmentNode.

Done.

> Use nsAutoString in GetCharacterData and GetNumberOfCharacters.

Done.

> File a bug about looking at xml:spac if one doesn't already exist.

bug 319786 already exists for it.
Attachment #229806 - Attachment is obsolete: true
Attachment #229952 - Flags: superreview?(roc)
Attachment #229952 - Flags: superreview?(roc) → superreview+
Checked in
Status: ASSIGNED → RESOLVED
Closed: 18 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: