Closed
Bug 876323
Opened 11 years ago
Closed 11 years ago
nsSVGTextFrame2 should avoid recomputing mPositions when COORD_CONTEXT_CHANGED unless percentages were used
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: heycam, Assigned: heycam)
References
Details
(Keywords: perf)
Attachments
(2 files)
880 bytes,
text/html
|
Details | |
6.42 KB,
patch
|
jwatt
:
review+
|
Details | Diff | Splinter Review |
When nsSVGTextFrame2::NotifySVGChanged is called with COORD_CONTEXT_CHANGED, we can avoid calling NotifyGlyphMetricsChange unless we actually did use percentage values in the text positioning attributes.
Assignee | ||
Comment 1•11 years ago
|
||
For example you wouldn't expect this to need to call DoGlyphPositioning on each resize.
Assignee | ||
Comment 2•11 years ago
|
||
Comment 3•11 years ago
|
||
Should use a frame state bit for the flag (as well as mPositioningDirty)
Assignee | ||
Comment 4•11 years ago
|
||
There's bug 865901 for mPositioningDirty. How about we do them both at once over there. (We're at least not increasing the size of the frame object by adding this second one.)
Comment 5•11 years ago
|
||
Comment on attachment 754330 [details] [diff] [review]
patch
Nice.
Regarding "mPositioningUsesPercentages", I think you should put the word "may" in there so that it's clear to readers that it's not a certainty even without reading the doc comment.
Other than that, can you add a reftest along the lines of layout/reftests/svg/stroke-width-percentage-03.xhtml where we check that things work when the content window changes size? (Changing the width/height attributes on an <svg> will cause reflow that may mask bugs with content area resizing which won't necessarily cause reflow.)
Given the "Percentage values beyond the number of addressable characters, however, do not influence mPositioningUsesPercentages" comment, it would also be good to have similar tests that add text after MozReftestInvalidate making an "out of bounds percentage" have something to apply to, and make sure that works.
Attachment #754330 -
Flags: review?(jwatt) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•