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.)
Created attachment 755160 [details] [diff] [review] patch Like this. WDYT?
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #755160 - Flags: review?(longsonr)
Green try run: https://tbpl.mozilla.org/?tree=Try&rev=2ac9669992bb
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+
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.