Closed
Bug 500632
Opened 16 years ago
Closed 16 years ago
Unnecessary repainting due to invalidation inside collapsed scrollbars
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
People
(Reporter: roc, Assigned: roc)
Details
Attachments
(1 file)
|
1.05 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
Scrollframes collapse scrollbars by setting their size to 0. However, the thumb and other scrollbar parts retain their preferred size. When something causes scrollbar parts to be invalidated, those invalidations propagate out and cause actual repainting. The simplest way I found to stop that from happening was to explicitly suppress invalidations from collapsed scrollbars in nsHTMLScrollFrame::InvalidateInternal.
Attachment #385355 -
Flags: review?(dbaron)
Attachment #385355 -
Flags: review?(dbaron) → review+
Comment on attachment 385355 [details] [diff] [review]
fix
r=dbaron
However, please document the INVALIDATE_NOTIFY_ONLY flag in nsIFrame.h. (It originated in bug 450930.) (I'm actually not sure why nsGfxScrollFrame::InvalidateInternal currently checks for it.)
Also, if you want (feel free to do this or not), it seems like it might make sense to structure nsGfxScrollFrame::InvalidateInternal as:
if (aForChild == mInner.mScrolledFrame) {
// ... existing code, inside if (!(aFlags & INVALIDATE_NOTIFY_ONLY))
} else if (aForChild == mInner.mHScrollbarBox) {
// your conditional new early return, with your comment
} else if (aForChild == mInner.mVScrollbarBox) {
// same, but with pointer to previous comment
}
nsHTMLContainerFrame::InvalidateInternal(...);
| Assignee | ||
Comment 2•16 years ago
|
||
(In reply to comment #1)
> (From update of attachment 385355 [details] [diff] [review])
> r=dbaron
>
> However, please document the INVALIDATE_NOTIFY_ONLY flag in nsIFrame.h. (It
> originated in bug 450930.) (I'm actually not sure why
> nsGfxScrollFrame::InvalidateInternal currently checks for it.)
Hmm ... actually I think it's not necessary. I'll file a separate bug to get rid of it.
> Also, if you want (feel free to do this or not), it seems like it might make
> sense to structure nsGfxScrollFrame::InvalidateInternal as:
>
> if (aForChild == mInner.mScrolledFrame) {
> // ... existing code, inside if (!(aFlags & INVALIDATE_NOTIFY_ONLY))
> } else if (aForChild == mInner.mHScrollbarBox) {
> // your conditional new early return, with your comment
> } else if (aForChild == mInner.mVScrollbarBox) {
> // same, but with pointer to previous comment
> }
>
> nsHTMLContainerFrame::InvalidateInternal(...);
Good idea, I'll do that.
Whiteboard: [needs landing]
| Assignee | ||
Comment 3•16 years ago
|
||
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
| Assignee | ||
Comment 4•16 years ago
|
||
Filed bug 505667 on the first part of comment #2.
You need to log in
before you can comment on or make changes to this bug.
Description
•