Closed
Bug 201300
Opened 22 years ago
Closed 22 years ago
Fix dispatching of AttributeChanges to nsGfxScrollFrame
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
People
(Reporter: roc, Assigned: roc)
Details
Attachments
(1 file, 1 obsolete file)
12.10 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
Currently every nsGfxScrollFrame registers a document listener so that it can
see changes to the 'curpos' attribute on both of its scrollbars. This is way
overkill and could be hurting performance a lot in some cases.
Assignee | ||
Comment 1•22 years ago
|
||
My approach to fixing this is to have nsScrollbarFrame forward its frame
attribute change notification to its nsGfxScrollFrame parent (if there is one),
if the attribute is 'curpos'. This eliminates the need for nsGfxScrollFrame to
observe the document. It reduces the number of attribute change notifications to
nsGfxScrollFrame to *zero* for a sequence of normal (non-scrolling) page loads.
Patch coming up.
Assignee | ||
Comment 2•22 years ago
|
||
Assignee | ||
Comment 3•22 years ago
|
||
Assignee | ||
Comment 4•22 years ago
|
||
Comment on attachment 119937 [details] [diff] [review]
fix
wrong patch, sorry
Attachment #119937 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #119938 -
Flags: superreview?(bzbarsky)
Attachment #119938 -
Flags: review?(bzbarsky)
![]() |
||
Comment 5•22 years ago
|
||
Comment on attachment 119938 [details] [diff] [review]
fix
>+ // This gets called when the 'curpos' attribute on one of the scrollbars changes
>+ nsresult CurPosAttributeChanged(nsIPresContext* aPresContext,
Might be nice to make this protected and make nsGfxScrollFrame a friend
class....
>+ parent->QueryInterface(NS_GET_IID(nsIScrollableFrame), (void**)&scrollable);
rv = CallQueryInterface(parent, &scrollable);
r/sr=me with those.
Attachment #119938 -
Flags: superreview?(bzbarsky)
Attachment #119938 -
Flags: superreview+
Attachment #119938 -
Flags: review?(bzbarsky)
Attachment #119938 -
Flags: review+
Assignee | ||
Comment 6•22 years ago
|
||
> Might be nice to make this protected and make nsGfxScrollFrame a friend
> class....
nsGfxScrollFrameInner is only visible in nsGfxScrollFrame.cpp, so this doesn't
seem necessary. (Hence "Inner")
> rv = CallQueryInterface(parent, &scrollable);
Oh yeah. willdo
Assignee | ||
Comment 7•22 years ago
|
||
Checked in. This should be interesting.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•22 years ago
|
||
Hmm. Tp may have gone down by some "in the noise" amount, but that's all. Well
at least we know the Tp slowdown from smooth scrolling was not due to
AttributeChanged callbacks.
Has this anything to do with bug 201435?
You need to log in
before you can comment on or make changes to this bug.
Description
•