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

RESOLVED FIXED in mozilla14

Status

()

Core
SVG
RESOLVED FIXED
10 years ago
6 years ago

People

(Reporter: jwatt, Assigned: jwatt)

Tracking

({perf})

Trunk
mozilla14
Points:
---
Bug Flags:
blocking1.9 -
wanted1.9 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

10 years ago
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?

Updated

10 years ago
Flags: blocking1.9? → blocking1.9-

Updated

10 years ago
Flags: wanted1.9+
(Assignee)

Updated

10 years ago
Assignee: general → jwatt
(Assignee)

Updated

10 years ago
Status: NEW → ASSIGNED
QA Contact: ian → general
(Assignee)

Comment 2

6 years ago
Created attachment 606752 [details] [diff] [review]
patch

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?
(Assignee)

Comment 4

6 years ago
Because then I need to export nsSVGOuterSVGFrame.h, and all headers that in depends on, and all the headers they depend on, etc.

Comment 5

6 years ago
We have a state bit for the outer SVG frame. That's better than a GetType call.
(Assignee)

Comment 6

6 years ago
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...
(Assignee)

Comment 8

6 years ago
Created attachment 606866 [details] [diff] [review]
patch

Yeah, good point; I should get more sleep.
Attachment #606752 - Attachment is obsolete: true
Attachment #606866 - Flags: review?(bzbarsky)
Attachment #606752 - Flags: review?(bzbarsky)
(Assignee)

Updated

6 years ago
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
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.