In bug 378975 the initial reflow of documents was changed to assume that a scrollbar would be needed, and if not, documents are reflowed a second time. This change is intended to improve performance for long documents in HTML that require scrollbars (the common case in HTML) but in SVG documents don't get longer the more complex they are. Scrollbars are the rare case. It would be good to make this optimization conditional so SVG isn't penalized (maybe even check the SVG root element in advance to _know_ if we need scrollbars).
Sure. Feel free to tweak nsHTMLScrollFrame::InInitialReflow(). I guess you're want to see whether the scrolled frame is an SVG outer frame when mInner.mIsRoot?
10 years ago
Created attachment 606752 [details] [diff] [review] patch Was reminded again while debugging that this is still happening.
Comment on attachment 606752 [details] [diff] [review] patch Why is the nsLayoutUtils method needed? Why not just put that code inline in the scrollframe code?
Because then I need to export nsSVGOuterSVGFrame.h, and all headers that in depends on, and all the headers they depend on, etc.
We have a state bit for the outer SVG frame. That's better than a GetType call.
To use that I need to check that the frame is an SVG frame first, which just makes the code more verbose for no real win.
> Because then I need to export nsSVGOuterSVGFrame.h Export in what sense? You just need to add the relevant directory to LOCAL_INCLUDES in layout/generic, no? That's why it works in layout/base...
Created attachment 606866 [details] [diff] [review] patch Yeah, good point; I should get more sleep.
Comment on attachment 606866 [details] [diff] [review] patch r=me