WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 82083
Too many ScrollAnimators are allocated on pages with frames
https://bugs.webkit.org/show_bug.cgi?id=82083
Summary
Too many ScrollAnimators are allocated on pages with frames
Beth Dakin
Reported
2012-03-23 13:15:09 PDT
Currently, ScrollableArea::scrollAnimator() will create a ScrollAnimator to return if m_scrollAnimator is null. Because of this, we end up creating a ScrollAnimator for nearly every frame on webpages. For example, we allocate 22 ScrollAnimators on
http://www.disboards.com/showthread.php?t=2512881
even though only the main document needs one. <
rdar://problem/11070121
> Patch forthcoming.
Attachments
Patch
(9.13 KB, patch)
2012-03-23 13:22 PDT
,
Beth Dakin
ggaren
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Beth Dakin
Comment 1
2012-03-23 13:22:11 PDT
Created
attachment 133547
[details]
Patch
Geoffrey Garen
Comment 2
2012-03-23 13:25:17 PDT
Comment on
attachment 133547
[details]
Patch nepotism=me
Beth Dakin
Comment 3
2012-03-23 13:37:08 PDT
Thanks Geoff! Committed
http://trac.webkit.org/changeset/111896
Simon Fraser (smfr)
Comment 4
2012-03-23 13:41:16 PDT
Comment on
attachment 133547
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=133547&action=review
> Source/WebCore/platform/ScrollableArea.h:99 > + ScrollAnimator* getExistingScrollAnimator() const { return m_scrollAnimator.get(); }
We usually avoid 'get' in accessors like this.
Beth Dakin
Comment 5
2012-03-23 13:42:14 PDT
(In reply to
comment #4
)
> (From update of
attachment 133547
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=133547&action=review
> > > Source/WebCore/platform/ScrollableArea.h:99 > > + ScrollAnimator* getExistingScrollAnimator() const { return m_scrollAnimator.get(); } > > We usually avoid 'get' in accessors like this.
Would you prefer existingScrollAnmator()?
Beth Dakin
Comment 6
2012-03-23 14:03:21 PDT
Changed the name to existingScrollAnimator() :
http://trac.webkit.org/changeset/111901
Nikolas Zimmermann
Comment 7
2012-03-24 01:58:07 PDT
(In reply to
comment #6
)
> Changed the name to existingScrollAnimator() :
http://trac.webkit.org/changeset/111901
Hm, I'm still confused by your terminology. I would have suggested to rename scrollAnimator() to ensureScrollAnimator(), and existingScrollAnimator() to scrollAnimator() - that's how we do it in numerous other places in WebCore. scrollAnimator() sounds just like a simple accessor, anyone not reading the comment in the header, won't know it creates something. Would you want to prepare another patch? :-)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug