Bug 134406 - Custom scrollbars should not create ScrollbarPainters on Mac
Summary: Custom scrollbars should not create ScrollbarPainters on Mac
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-06-27 12:06 PDT by Beth Dakin
Modified: 2014-06-27 14:05 PDT (History)
12 users (show)

See Also:


Attachments
Patch (6.08 KB, patch)
2014-06-27 12:13 PDT, Beth Dakin
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Beth Dakin 2014-06-27 12:06:32 PDT
Pages with custom scrollbars are still creating NSScrollerImps for those scrollbars on Mac. This should not be happening.

<rdar://problem/16178301>
Comment 1 Beth Dakin 2014-06-27 12:13:55 PDT
Created attachment 234005 [details]
Patch
Comment 2 WebKit Commit Bot 2014-06-27 12:16:32 PDT
Attachment 234005 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/Scrollbar.cpp:59:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/Scrollbar.cpp:82:  Wrong number of spaces before statement. (expected: 25)  [whitespace/indent] [4]
Total errors found: 2 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Beth Dakin 2014-06-27 12:24:36 PDT
Thanks Tim http://trac.webkit.org/changeset/170546
Comment 4 Darin Adler 2014-06-27 13:29:34 PDT
Comment on attachment 234005 [details]
Patch

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

> Source/WebCore/platform/Scrollbar.h:201
> +    bool m_isCustomScrollbar;

Why protected instead of private?

> Source/WebCore/rendering/RenderScrollbar.cpp:45
> +    : Scrollbar(scrollableArea, orientation, RegularScrollbar, RenderScrollbarTheme::renderScrollbarTheme(), true)

Makes me think we should use an enum instead of a bool for readability.
Comment 5 Beth Dakin 2014-06-27 14:05:16 PDT
(In reply to comment #4)
> (From update of attachment 234005 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=234005&action=review
> 
> > Source/WebCore/platform/Scrollbar.h:201
> > +    bool m_isCustomScrollbar;
> 
> Why protected instead of private?
> 

Oh, that was very silly. This should definitely be private, I just failed to notice that all of the other member variables were protected when I put this one next to them.

> > Source/WebCore/rendering/RenderScrollbar.cpp:45
> > +    : Scrollbar(scrollableArea, orientation, RegularScrollbar, RenderScrollbarTheme::renderScrollbarTheme(), true)
> 
> Makes me think we should use an enum instead of a bool for readability.

That would definitely look nicer. 

I'll do a follow-up cleanup here.