Closed Bug 877035 Opened 11 years ago Closed 11 years ago

remove nsSVGTextFrame2::UpdateGlyphPositioning's aForceGlobalTransform argument

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: heycam, Assigned: heycam)

Details

Attachments

(1 file)

The use of nsSVGTextFrame2::UpdateGlyphPositioning's aForceGlobalTransform argument is confusing.  I wonder if we could get the same behaviour -- not calling GetCanvasTM() on the nsSVGTextFrame2's parent when the frame is non-display and we're not painting or hit testing -- by a means that doesn't require us to pass this argument.

Specifically I'm wondering if we can just look at mGetCanvasTMForFlag, since that records for us whether we're painting or hit testing.  I think that if mGetCanvasTMForFlag == FOR_OUTERSVG_TM and the frame is non-display, then we do not not want to call GetCanvasTM(), and otherwise we do.
(Similarly for nsSVGTextFrame, but that code will go away at some point in the future, so it's probably not worth fixing there.)
Attached patch patchSplinter Review
Like this.  WDYT?
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #755160 - Flags: review?(longsonr)
And this try run checked that the "mGetCanvasTMForFlag == FOR_OUTERSVG_TM && is_non_display" condition from comment 0 will result in the same branching in that if-statement in UpdateFontSizeScaleFactor.  At least for the test coverage that we have.  https://tbpl.mozilla.org/?tree=Try&rev=fa8fbd761472
Attachment #755160 - Flags: review?(longsonr) → review+
https://hg.mozilla.org/mozilla-central/rev/fe83fd612679
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: