| 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 16 matching lines...) Expand all Loading... |
| 27 #include "RuntimeEnabledFeatures.h" | 27 #include "RuntimeEnabledFeatures.h" |
| 28 #include "platform/scroll/ScrollbarThemeMacCommon.h" | 28 #include "platform/scroll/ScrollbarThemeMacCommon.h" |
| 29 | 29 |
| 30 #include <Carbon/Carbon.h> | 30 #include <Carbon/Carbon.h> |
| 31 #include "platform/PlatformMouseEvent.h" | 31 #include "platform/PlatformMouseEvent.h" |
| 32 #include "platform/graphics/Gradient.h" | 32 #include "platform/graphics/Gradient.h" |
| 33 #include "platform/graphics/GraphicsContext.h" | 33 #include "platform/graphics/GraphicsContext.h" |
| 34 #include "platform/graphics/GraphicsContextStateSaver.h" | 34 #include "platform/graphics/GraphicsContextStateSaver.h" |
| 35 #include "platform/graphics/GraphicsLayer.h" | 35 #include "platform/graphics/GraphicsLayer.h" |
| 36 #include "platform/graphics/ImageBuffer.h" | 36 #include "platform/graphics/ImageBuffer.h" |
| 37 #include "platform/graphics/Pattern.h" |
| 37 #include "platform/mac/ColorMac.h" | 38 #include "platform/mac/ColorMac.h" |
| 38 #include "platform/mac/LocalCurrentGraphicsContext.h" | 39 #include "platform/mac/LocalCurrentGraphicsContext.h" |
| 39 #include "platform/mac/NSScrollerImpDetails.h" | 40 #include "platform/mac/NSScrollerImpDetails.h" |
| 40 #include "platform/mac/ScrollAnimatorMac.h" | 41 #include "platform/mac/ScrollAnimatorMac.h" |
| 41 #include "platform/scroll/ScrollbarThemeClient.h" | 42 #include "platform/scroll/ScrollbarThemeClient.h" |
| 42 #include "platform/scroll/ScrollbarThemeMacNonOverlayAPI.h" | 43 #include "platform/scroll/ScrollbarThemeMacNonOverlayAPI.h" |
| 43 #include "platform/scroll/ScrollbarThemeMacOverlayAPI.h" | 44 #include "platform/scroll/ScrollbarThemeMacOverlayAPI.h" |
| 44 #include "public/platform/WebThemeEngine.h" | 45 #include "public/platform/WebThemeEngine.h" |
| 45 #include "public/platform/Platform.h" | 46 #include "public/platform/Platform.h" |
| 46 #include "public/platform/WebRect.h" | 47 #include "public/platform/WebRect.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 61 namespace WebCore { | 62 namespace WebCore { |
| 62 | 63 |
| 63 typedef HashSet<ScrollbarThemeClient*> ScrollbarSet; | 64 typedef HashSet<ScrollbarThemeClient*> ScrollbarSet; |
| 64 | 65 |
| 65 static ScrollbarSet& scrollbarSet() | 66 static ScrollbarSet& scrollbarSet() |
| 66 { | 67 { |
| 67 DEFINE_STATIC_LOCAL(ScrollbarSet, set, ()); | 68 DEFINE_STATIC_LOCAL(ScrollbarSet, set, ()); |
| 68 return set; | 69 return set; |
| 69 } | 70 } |
| 70 | 71 |
| 71 } | |
| 72 | |
| 73 namespace WebCore { | |
| 74 | |
| 75 static float gInitialButtonDelay = 0.5f; | 72 static float gInitialButtonDelay = 0.5f; |
| 76 static float gAutoscrollButtonDelay = 0.05f; | 73 static float gAutoscrollButtonDelay = 0.05f; |
| 77 static NSScrollerStyle gPreferredScrollerStyle = NSScrollerStyleLegacy; | 74 static NSScrollerStyle gPreferredScrollerStyle = NSScrollerStyleLegacy; |
| 78 | 75 |
| 79 ScrollbarTheme* ScrollbarTheme::nativeTheme() | 76 ScrollbarTheme* ScrollbarTheme::nativeTheme() |
| 80 { | 77 { |
| 81 static ScrollbarThemeMacCommon* theme = NULL; | 78 static ScrollbarThemeMacCommon* theme = NULL; |
| 82 if (theme) | 79 if (theme) |
| 83 return theme; | 80 return theme; |
| 84 if (ScrollbarThemeMacCommon::isOverlayAPIAvailable()) { | 81 if (ScrollbarThemeMacCommon::isOverlayAPIAvailable()) { |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 // static | 355 // static |
| 359 bool ScrollbarThemeMacCommon::isOverlayAPIAvailable() | 356 bool ScrollbarThemeMacCommon::isOverlayAPIAvailable() |
| 360 { | 357 { |
| 361 static bool apiAvailable = | 358 static bool apiAvailable = |
| 362 [NSClassFromString(@"NSScrollerImp") respondsToSelector:@selector(scroll
erImpWithStyle:controlSize:horizontal:replacingScrollerImp:)] | 359 [NSClassFromString(@"NSScrollerImp") respondsToSelector:@selector(scroll
erImpWithStyle:controlSize:horizontal:replacingScrollerImp:)] |
| 363 && [NSClassFromString(@"NSScrollerImpPair") instancesRespondToSelector:@
selector(scrollerStyle)]; | 360 && [NSClassFromString(@"NSScrollerImpPair") instancesRespondToSelector:@
selector(scrollerStyle)]; |
| 364 return apiAvailable; | 361 return apiAvailable; |
| 365 } | 362 } |
| 366 | 363 |
| 367 } // namespace WebCore | 364 } // namespace WebCore |
| OLD | NEW |