Bug 118216 - Avoid calling into Objective-C every time we get the scrollbar width
Summary: Avoid calling into Objective-C every time we get the scrollbar width
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-29 11:51 PDT by Simon Fraser (smfr)
Modified: 2013-07-01 11:57 PDT (History)
4 users (show)

See Also:


Attachments
Patch (4.93 KB, patch)
2013-06-29 11:54 PDT, Simon Fraser (smfr)
ggaren: 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) 2013-06-29 11:51:24 PDT
Avoid calling into Objective-C every time we get the scrollbar width
Comment 1 Simon Fraser (smfr) 2013-06-29 11:54:20 PDT
Created attachment 205771 [details]
Patch
Comment 2 Geoffrey Garen 2013-06-29 12:18:53 PDT
Comment on attachment 205771 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=205771&action=review

r=me

> Source/WebCore/ChangeLog:12
> +        is one that gets called when the user changes the setting in System Preferences.

"is the function" maybe?

> Source/WebCore/platform/mac/ScrollbarThemeMac.mm:136
> +static bool gUseOverlayScrollbars = false;

Can we call this gUsesOverlayScrollbars, to match the function name? (I added an 's'.)
Comment 3 Simon Fraser (smfr) 2013-06-29 13:28:06 PDT
https://trac.webkit.org/r152214
Comment 4 Darin Adler 2013-07-01 11:57:31 PDT
Comment on attachment 205771 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=205771&action=review

> Source/WebCore/platform/ScrollbarTheme.h:60
> +    virtual void usesOverlayScrollbarsChanged() { }

This should not have been added. Nobody needs to call this as a virtual function.

> Source/WebCore/platform/mac/ScrollbarThemeMac.h:50
> +    virtual void usesOverlayScrollbarsChanged() OVERRIDE;

This should be a non-virtual function.