Bug 36994 - Avoid doing work in FrameView::scrollPositionChanged() if there are no fixed position elements
Summary: Avoid doing work in FrameView::scrollPositionChanged() if there are no fixed ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-01 17:25 PDT by Simon Fraser (smfr)
Modified: 2010-04-02 10:41 PDT (History)
2 users (show)

See Also:


Attachments
Patch (1.97 KB, patch)
2010-04-01 17:47 PDT, Simon Fraser (smfr)
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2010-04-01 17:25:03 PDT
FrameView::scrollPositionChanged() does some widget updating, and compositing layer updating that is unnecessary if there are no fixed position elements. And, thanks to bug 33150, we know if the FrameView contains fixed position objects.
Comment 1 Simon Fraser (smfr) 2010-04-01 17:47:34 PDT
Created attachment 52358 [details]
Patch
Comment 2 Darin Adler 2010-04-01 19:45:03 PDT
Comment on attachment 52358 [details]
Patch

> +    bool hasFixedObjects() const { return m_fixedObjectCount > 0; }

Since this is used only inside the class, can we make the function private? Members generally should be as private as possible. Or maybe just say && m_fixedObjectCount at the call site?

r=me
Comment 3 Simon Fraser (smfr) 2010-04-02 10:41:23 PDT
http://trac.webkit.org/changeset/57009