So if the content changes dynamically (via scripted "setAttribute") in a way that affects the intrinsic ratio, we handle it here in nsSVGOuterSVGFrame::AttributeChanged (correctly, based on some testing): https://searchfox.org/mozilla-central/rev/15be167a5b436b57fef944b84eef061d24c1af8c/layout/svg/nsSVGOuterSVGFrame.cpp#695-707 Notably, the inner doc notifies the host frame that it needs a reflow here: ```c++ embeddingFrame->PresShell()->FrameNeedsReflow( embeddingFrame, IntrinsicDirty::StyleChange, NS_FRAME_IS_DIRTY); ``` I would imagine that same codepath is supposed to be triggered for slowly-loading SVG content as well, but I'll need to check that.
Bug 1565384 Comment 5 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
So if the content changes dynamically (via scripted "setAttribute") in a way that affects the intrinsic ratio, we handle it here in nsSVGOuterSVGFrame::AttributeChanged (correctly, based on some testing [EDIT: not correctly after all, see comment 6]): https://searchfox.org/mozilla-central/rev/15be167a5b436b57fef944b84eef061d24c1af8c/layout/svg/nsSVGOuterSVGFrame.cpp#695-707 Notably, the inner doc notifies the host frame that it needs a reflow here: ```c++ embeddingFrame->PresShell()->FrameNeedsReflow( embeddingFrame, IntrinsicDirty::StyleChange, NS_FRAME_IS_DIRTY); ``` I would imagine that same codepath is supposed to be triggered for slowly-loading SVG content as well, but I'll need to check that.