Closed Bug 458010 Opened 16 years ago Closed 16 years ago

textPath should use nsReferencedElement instead of nsSVGUtils::GetReferencedFrame

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: roc, Assigned: longsonr)

Details

(Keywords: fixed1.9.1)

Attachments

(2 files, 2 obsolete files)

Then it can track changes to the ID-element-map, and it can also work with external document URLs (when bz's external-documents work lands). And we can get rid of nsSVGUtils::GetReferencedFrame, which is something that no-one should use.

Although we might want to use nsSVGRenderingObserver instead of a plain nsReferencedElement, I'm not sure.
We should do this for 1.9.1 since it's really required for incremental XML loading.
Flags: wanted1.9.1?
Attached patch patch (obsolete) — Splinter Review
Needs a follow-up to blow away nsSVGUtils::GetReferenced frame (or alternatively bug 399363 could be morphed into doing that).
Assignee: nobody → longsonr
Attachment #341467 - Flags: superreview?(roc)
Attachment #341467 - Flags: review?(roc)
Attachment #341467 - Attachment is obsolete: true
Attachment #341467 - Flags: superreview?(roc)
Attachment #341467 - Flags: review?(roc)
Comment on attachment 341467 [details] [diff] [review]
patch

Wow that was easy!

Would be nice to have a test.
Attachment #341467 - Flags: superreview+
Attachment #341467 - Flags: review+
Hmm, why did you remove the review request? Did the patch not work?
Hmm, doesn't a change to the path require an update of the covered region?
Attached patch updated patch (obsolete) — Splinter Review
Almost the same thought at exactly the same time.

In fact its worse than the covered region getting out of date. All the text of which the text path is part of needs to be recalculated in case the path has got longer/shorter and can therefore accommodate more/fewer glyphs. Text after the text path may also need to move about.

I've also tidied things up by removing the remains of the old style href code since its in the same function.
Attachment #341510 - Flags: superreview?(roc)
Attachment #341510 - Flags: review?(roc)
Comment on attachment 341510 [details] [diff] [review]
updated patch

+  if (mFrame->IsFrameOfType(nsIFrame::eSVG)) {

I think you should just assert this. There's no way for a non-SVG frame act as a text-path.
Attachment #341510 - Flags: superreview?(roc)
Attachment #341510 - Flags: superreview+
Attachment #341510 - Flags: review?(roc)
Attachment #341510 - Flags: review+
Attachment #341510 - Attachment is obsolete: true
checked in fc63a8402196
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Attached patch reftestSplinter Review
reftest checked in 86089606be35
Flags: in-testsuite? → in-testsuite+
Flags: wanted1.9.1? → wanted1.9.1+
Keywords: fixed1.9.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: