Bug 147551

Summary: ScrollbarThemes should be returned by reference.
Product: WebKit Reporter: Andreas Kling <kling>
Component: WebCore Misc.Assignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
zalan: review+, zalan: commit-queue-
Patch for landing (if EWS likes) none

Description Andreas Kling 2015-08-02 20:13:12 PDT
There's always a ScrollbarTheme, and we -> them without null checking all the time.
Let's make ScrollbarTheme::theme() and Scrollbar::theme() return references.
Comment 1 Andreas Kling 2015-08-02 20:16:46 PDT
Created attachment 258047 [details]
Patch
Comment 2 WebKit Commit Bot 2015-08-02 20:19:51 PDT
Attachment 258047 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/Scrollbar.cpp:62:  Wrong number of spaces before statement. (expected: 8)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/Scrollbar.cpp:322:  Wrong number of spaces before statement. (expected: 26)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/Scrollbar.cpp:330:  Wrong number of spaces before statement. (expected: 26)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/Scrollbar.cpp:322:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/Scrollbar.cpp:390:  An else if statement should be written as an if statement when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
Total errors found: 5 in 30 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 zalan 2015-08-03 10:04:18 PDT
Comment on attachment 258047 [details]
Patch

Needs platform fixes.
Comment 4 Andreas Kling 2015-09-02 18:48:53 PDT
Created attachment 260472 [details]
Patch for landing (if EWS likes)
Comment 5 WebKit Commit Bot 2015-09-02 18:50:56 PDT
Attachment 260472 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/Scrollbar.cpp:321:  Wrong number of spaces before statement. (expected: 26)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/Scrollbar.cpp:329:  Wrong number of spaces before statement. (expected: 26)  [whitespace/indent] [4]
ERROR: Source/WebCore/platform/Scrollbar.cpp:321:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WebCore/platform/Scrollbar.cpp:389:  An else if statement should be written as an if statement when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
Total errors found: 4 in 32 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 WebKit Commit Bot 2015-09-02 19:58:22 PDT
Comment on attachment 260472 [details]
Patch for landing (if EWS likes)

Clearing flags on attachment: 260472

Committed r189270: <http://trac.webkit.org/changeset/189270>
Comment 7 WebKit Commit Bot 2015-09-02 19:58:26 PDT
All reviewed patches have been landed.  Closing bug.