Closed Bug 379709 Opened 17 years ago Closed 12 years ago

During the initial reflow of SVG we should assume scrollbars won't be needed

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

(Keywords: perf)

Attachments

(1 file, 1 obsolete file)

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?
Flags: blocking1.9?
Flags: blocking1.9? → blocking1.9-
Flags: wanted1.9+
Assignee: general → jwatt
Status: NEW → ASSIGNED
QA Contact: ian → general
Attached patch patch (obsolete) — Splinter Review
Was reminded again while debugging that this is still happening.
Attachment #606752 - Flags: review?(bzbarsky)
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...
Attached patch patchSplinter Review
Yeah, good point; I should get more sleep.
Attachment #606752 - Attachment is obsolete: true
Attachment #606866 - Flags: review?(bzbarsky)
Attachment #606752 - Flags: review?(bzbarsky)
Depends on: 736753
Comment on attachment 606866 [details] [diff] [review]
patch

r=me
Attachment #606866 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/b81ec953e4d6
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: