Bug 118216

Summary: Avoid calling into Objective-C every time we get the scrollbar width
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: New BugsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, bdakin, sam, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ggaren: review+

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.