Dynamic change to marker style causes it to continuously repaint forever
Categories
(Core :: SVG, defect)
Tracking
()
People
(Reporter: dholbert, Assigned: longsonr)
References
Details
(Keywords: perf:resource-use, regression)
Attachments
(3 files, 1 obsolete file)
STR:
0. Make sure you have web render disabled and paint flashing enabled:
gfx.webrender.all = false
nglayout.debug.paint_flashing = true
- View attached testcase.
EXPECTED RESULTS:
One second after loading, when the text becomes bold, its background-color should flash once (indicating a single repaint).
ACTUAL RESULTS:
When the text becomes bold, the background starts flashing continuously and never stops. It looks like we get into a never-ending "invalidate/repaint/invalidate/etc." loop.
Reporter | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
Is the <text> element required? If so did this work properly before Cam's <text> element rewrite?
Reporter | ||
Comment 2•6 years ago
|
||
Hmm, good thoughts!
- the text element does indeed seem to be required
- I can't reproduce flashing in a build from 2013-01-01
So this is a regression from some point (perhaps Cam's text rewrite).
Reporter | ||
Comment 3•6 years ago
|
||
Reporter | ||
Comment 4•6 years ago
|
||
Also: in a build from 2015-07-11, the text continuously repaints even before I've made a dynamic style change.
Reporter | ||
Comment 5•6 years ago
|
||
Here's the fix range, for where we went from immediate continuous-repaints (comment 4) to only repainting once a dynamic style change has been made (the current behavior):
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=30ea2905130e85f9e1d8d56fa3097901eec6514b&tochange=67cd1ee26f2661fa5efe3d952485ab3c89af4271
Assignee | ||
Comment 6•6 years ago
|
||
For text we'll end up in SVGTextFrame::ScheduleReflowSVGNonDisplayText somehow we're triggering that again and again I assume.
Reporter | ||
Comment 7•6 years ago
•
|
||
The original regression range here (going from "no continuous paint flashing" to "immediate & continuous flashing" per comment 4, for text) was:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2114ef80f6ae&tochange=b62ccf3228ba
Looks like probably a regression from bug 1090936.
Assignee | ||
Comment 8•6 years ago
|
||
I suspect the SVGTextFrame::ReflowSVGNonDisplayText change was wrong and should be reverted then.
Assignee | ||
Comment 9•6 years ago
|
||
Assignee | ||
Comment 10•6 years ago
|
||
Revert the invalid part of bug 1090936 as SVGTextFrame::ReflowSVGNonDisplayText is already asynchronous
as callers invoke it via SVGTextFrame::ScheduleReflowSVGNonDisplayText
Assignee | ||
Comment 11•6 years ago
|
||
I checked that we get one update on the style change and no continuous paint flashing now.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 12•6 years ago
|
||
Thanks for the help figuring it out Daniel, comment 2 and the bug causing the regression really pinpointed the error.
Reporter | ||
Updated•6 years ago
|
Assignee | ||
Comment 13•6 years ago
|
||
Assignee | ||
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
Comment 16•6 years ago
|
||
bugherder |
Comment 17•6 years ago
|
||
It would've been nice to land a test for this...
Assignee | ||
Comment 18•6 years ago
|
||
Any ideas how one would write such a test?
Assignee | ||
Updated•6 years ago
|
Comment 19•6 years ago
|
||
We should be able to use nsIDOMWindowUtils.checkAndClearPaintedState() to ensure that we don't paint the frame in two consecutive frames without any change.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•3 years ago
|
Description
•