| OLD | NEW |
| 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 [[BlinkScrollbarObserver alloc] initWithScrollbar:&scrollbar | 237 [[BlinkScrollbarObserver alloc] initWithScrollbar:&scrollbar |
| 238 painter:scrollbarPainter]); | 238 painter:scrollbarPainter]); |
| 239 scrollbarPainterMap().set(&scrollbar, observer); | 239 scrollbarPainterMap().set(&scrollbar, observer); |
| 240 updateEnabledState(scrollbar); | 240 updateEnabledState(scrollbar); |
| 241 updateScrollbarOverlayColorTheme(scrollbar); | 241 updateScrollbarOverlayColorTheme(scrollbar); |
| 242 } | 242 } |
| 243 | 243 |
| 244 ScrollbarPainter ScrollbarThemeMac::painterForScrollbar( | 244 ScrollbarPainter ScrollbarThemeMac::painterForScrollbar( |
| 245 const ScrollbarThemeClient& scrollbar) const { | 245 const ScrollbarThemeClient& scrollbar) const { |
| 246 return [scrollbarPainterMap() | 246 return [scrollbarPainterMap() |
| 247 .get(const_cast<ScrollbarThemeClient*>(&scrollbar)) | 247 .at(const_cast<ScrollbarThemeClient*>(&scrollbar)) |
| 248 .get() painter]; | 248 .get() painter]; |
| 249 } | 249 } |
| 250 | 250 |
| 251 void ScrollbarThemeMac::paintTrackBackground(GraphicsContext& context, | 251 void ScrollbarThemeMac::paintTrackBackground(GraphicsContext& context, |
| 252 const Scrollbar& scrollbar, | 252 const Scrollbar& scrollbar, |
| 253 const IntRect& rect) { | 253 const IntRect& rect) { |
| 254 if (DrawingRecorder::useCachedDrawingIfPossible( | 254 if (DrawingRecorder::useCachedDrawingIfPossible( |
| 255 context, scrollbar, DisplayItem::kScrollbarTrackBackground)) | 255 context, scrollbar, DisplayItem::kScrollbarTrackBackground)) |
| 256 return; | 256 return; |
| 257 | 257 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 } | 409 } |
| 410 | 410 |
| 411 // static | 411 // static |
| 412 NSScrollerStyle ScrollbarThemeMac::recommendedScrollerStyle() { | 412 NSScrollerStyle ScrollbarThemeMac::recommendedScrollerStyle() { |
| 413 if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) | 413 if (RuntimeEnabledFeatures::overlayScrollbarsEnabled()) |
| 414 return NSScrollerStyleOverlay; | 414 return NSScrollerStyleOverlay; |
| 415 return gPreferredScrollerStyle; | 415 return gPreferredScrollerStyle; |
| 416 } | 416 } |
| 417 | 417 |
| 418 } // namespace blink | 418 } // namespace blink |
| OLD | NEW |