Open
Bug 872846
Opened 11 years ago
Updated 2 months ago
Stop FrameNeedsReflow() calls for non-display SVG dirtying displayed ancestors
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
NEW
People
(Reporter: jwatt, Unassigned)
Details
(Keywords: perf, Whiteboard: [jwatt:invalidation])
Attachments
(1 obsolete file)
Right now when style changes etc. cause FrameNeedsReflow() to be called on descendants of non-display SVG, the dirty marking up the ancestor chain continues out of the non-display frames into the displayed frames, resulting in needless reflow work happening. For example, when the font-size changes on a <tspan> in <text> in a <pattern>, nsStyleFont::CalcFontDifference is called under ReResolveStyleContext causing a restyle with the NS_STYLE_HINT_REFLOW hint. We end up in nsCSSFrameConstructor::ProcessRestyledFrames where StyleChangeReflow() is called for the tspan frame, which calls FrameNeedsReflow passing NS_FRAME_IS_DIRTY. That sets NS_FRAME_IS_DIRTY on the tspan and NS_FRAME_HAS_DIRTY_CHILDREN on its ancestors, most likely all the way up to the root frame. We should stop FrameNeedsReflow from doing this.
Reporter | ||
Comment 1•11 years ago
|
||
We could solve this with a bit flag on nsSVGPatternFrame etc. which would make FrameNeedsReflow halt. Note that this would be slightly different to the NS_FRAME_REFLOW_ROOT flag, since we wouldn't actually want to add anything to PresShell::mDirtyRoots.
Reporter | ||
Updated•11 years ago
|
Whiteboard: [jwatt:invalidation]
Comment 2•11 years ago
|
||
Is this kind of like what I have currently in nsSVGTextFrame2::ScheduleReflowSVGNonDisplayText?
Updated•2 years ago
|
Severity: normal → S3
Comment 3•3 months ago
|
||
Updated•3 months ago
|
Assignee: nobody → longsonr
Status: NEW → ASSIGNED
Comment 4•3 months ago
|
||
Updated•2 months ago
|
Attachment #9372713 -
Attachment is obsolete: true
Updated•2 months ago
|
Assignee: longsonr → nobody
Status: ASSIGNED → NEW
You need to log in
before you can comment on or make changes to this bug.
Description
•