There's always a ScrollbarTheme, and we -> them without null checking all the time. Let's make ScrollbarTheme::theme() and Scrollbar::theme() return references.
Created attachment 258047 [details] Patch
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 on attachment 258047 [details] Patch Needs platform fixes.
Created attachment 260472 [details] Patch for landing (if EWS likes)
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 on attachment 260472 [details] Patch for landing (if EWS likes) Clearing flags on attachment: 260472 Committed r189270: <http://trac.webkit.org/changeset/189270>
All reviewed patches have been landed. Closing bug.