Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollbarThemeMac.mm

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 float newPosition) const { 201 float newPosition) const {
202 // ScrollAnimatorMac will invalidate scrollbar parts if necessary. 202 // ScrollAnimatorMac will invalidate scrollbar parts if necessary.
203 return NoPart; 203 return NoPart;
204 } 204 }
205 205
206 void ScrollbarThemeMac::registerScrollbar(ScrollbarThemeClient& scrollbar) { 206 void ScrollbarThemeMac::registerScrollbar(ScrollbarThemeClient& scrollbar) {
207 scrollbarSet().insert(&scrollbar); 207 scrollbarSet().insert(&scrollbar);
208 208
209 bool isHorizontal = scrollbar.orientation() == HorizontalScrollbar; 209 bool isHorizontal = scrollbar.orientation() == HorizontalScrollbar;
210 RetainPtr<ScrollbarPainter> scrollbarPainter( 210 RetainPtr<ScrollbarPainter> scrollbarPainter(
211 AdoptNS, [[NSClassFromString(@"NSScrollerImp") 211 AdoptNS,
212 scrollerImpWithStyle:recommendedScrollerStyle() 212 [[NSClassFromString(@"NSScrollerImp")
213 controlSize:(NSControlSize)scrollbar.controlSize() 213 scrollerImpWithStyle:recommendedScrollerStyle()
214 horizontal:isHorizontal 214 controlSize:(NSControlSize)scrollbar.controlSize()
215 replacingScrollerImp:nil] retain]); 215 horizontal:isHorizontal
216 replacingScrollerImp:nil] retain]);
216 RetainPtr<BlinkScrollbarObserver> observer( 217 RetainPtr<BlinkScrollbarObserver> observer(
217 AdoptNS, 218 AdoptNS,
218 [[BlinkScrollbarObserver alloc] initWithScrollbar:&scrollbar 219 [[BlinkScrollbarObserver alloc] initWithScrollbar:&scrollbar
219 painter:scrollbarPainter]); 220 painter:scrollbarPainter]);
220 221
221 scrollbarPainterMap().insert(&scrollbar, observer); 222 scrollbarPainterMap().insert(&scrollbar, observer);
222 updateEnabledState(scrollbar); 223 updateEnabledState(scrollbar);
223 updateScrollbarOverlayColorTheme(scrollbar); 224 updateScrollbarOverlayColorTheme(scrollbar);
224 } 225 }
225 226
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 410 }
410 411
411 // static 412 // static
412 NSScrollerStyle ScrollbarThemeMac::recommendedScrollerStyle() { 413 NSScrollerStyle ScrollbarThemeMac::recommendedScrollerStyle() {
413 if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) 414 if (RuntimeEnabledFeatures::overlayScrollbarsEnabled())
414 return NSScrollerStyleOverlay; 415 return NSScrollerStyleOverlay;
415 return gPreferredScrollerStyle; 416 return gPreferredScrollerStyle;
416 } 417 }
417 418
418 } // namespace blink 419 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698