Bug 147551 - ScrollbarThemes should be returned by reference.
Summary: ScrollbarThemes should be returned by reference.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-02 20:13 PDT by Andreas Kling
Modified: 2015-09-02 19:58 PDT (History)
1 user (show)

See Also:


Attachments
Patch (46.72 KB, patch)
2015-08-02 20:16 PDT, Andreas Kling
zalan: review+
zalan: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (if EWS likes) (48.33 KB, patch)
2015-09-02 18:48 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.