| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2  * Copyright (C) 2008 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 18 matching lines...) Expand all  Loading... | 
| 29 #include "core/platform/ScrollTypes.h" | 29 #include "core/platform/ScrollTypes.h" | 
| 30 #include "core/platform/graphics/GraphicsContext.h" | 30 #include "core/platform/graphics/GraphicsContext.h" | 
| 31 #include "core/platform/graphics/IntRect.h" | 31 #include "core/platform/graphics/IntRect.h" | 
| 32 | 32 | 
| 33 namespace WebCore { | 33 namespace WebCore { | 
| 34 | 34 | 
| 35 class PlatformMouseEvent; | 35 class PlatformMouseEvent; | 
| 36 class ScrollbarThemeClient; | 36 class ScrollbarThemeClient; | 
| 37 class ScrollView; | 37 class ScrollView; | 
| 38 | 38 | 
| 39 #if ENABLE(RUBBER_BANDING) | 39 #if USE(RUBBER_BANDING) | 
| 40 class GraphicsLayer; | 40 class GraphicsLayer; | 
| 41 #endif | 41 #endif | 
| 42 | 42 | 
| 43 class ScrollbarTheme { | 43 class ScrollbarTheme { | 
| 44     WTF_MAKE_NONCOPYABLE(ScrollbarTheme); WTF_MAKE_FAST_ALLOCATED; | 44     WTF_MAKE_NONCOPYABLE(ScrollbarTheme); WTF_MAKE_FAST_ALLOCATED; | 
| 45 public: | 45 public: | 
| 46     ScrollbarTheme() { } | 46     ScrollbarTheme() { } | 
| 47     virtual ~ScrollbarTheme() { } | 47     virtual ~ScrollbarTheme() { } | 
| 48 | 48 | 
| 49     virtual void updateEnabledState(ScrollbarThemeClient*) { } | 49     virtual void updateEnabledState(ScrollbarThemeClient*) { } | 
| (...skipping 30 matching lines...) Expand all  Loading... | 
| 80     } | 80     } | 
| 81 | 81 | 
| 82     virtual void invalidatePart(ScrollbarThemeClient*, ScrollbarPart); | 82     virtual void invalidatePart(ScrollbarThemeClient*, ScrollbarPart); | 
| 83 | 83 | 
| 84     virtual void paintScrollCorner(ScrollView*, GraphicsContext*, const IntRect&
      cornerRect); | 84     virtual void paintScrollCorner(ScrollView*, GraphicsContext*, const IntRect&
      cornerRect); | 
| 85 | 85 | 
| 86     virtual void paintTickmarks(GraphicsContext*, ScrollbarThemeClient*, const I
     ntRect&) { } | 86     virtual void paintTickmarks(GraphicsContext*, ScrollbarThemeClient*, const I
     ntRect&) { } | 
| 87     virtual void paintOverhangBackground(ScrollView*, GraphicsContext*, const In
     tRect&, const IntRect&, const IntRect&); | 87     virtual void paintOverhangBackground(ScrollView*, GraphicsContext*, const In
     tRect&, const IntRect&, const IntRect&); | 
| 88     virtual void paintOverhangShadows(ScrollView*, GraphicsContext*, const IntRe
     ct&, const IntRect&, const IntRect&) { } | 88     virtual void paintOverhangShadows(ScrollView*, GraphicsContext*, const IntRe
     ct&, const IntRect&, const IntRect&) { } | 
| 89 | 89 | 
| 90 #if ENABLE(RUBBER_BANDING) | 90 #if USE(RUBBER_BANDING) | 
| 91     virtual void setUpOverhangShadowLayer(GraphicsLayer*) { } | 91     virtual void setUpOverhangShadowLayer(GraphicsLayer*) { } | 
| 92     virtual void updateOverhangShadowLayer(GraphicsLayer* shadowLayer, GraphicsL
     ayer* rootContentLayer) { } | 92     virtual void updateOverhangShadowLayer(GraphicsLayer* shadowLayer, GraphicsL
     ayer* rootContentLayer) { } | 
| 93 #endif | 93 #endif | 
| 94 | 94 | 
| 95     virtual bool shouldCenterOnThumb(ScrollbarThemeClient*, const PlatformMouseE
     vent&) { return false; } | 95     virtual bool shouldCenterOnThumb(ScrollbarThemeClient*, const PlatformMouseE
     vent&) { return false; } | 
| 96     virtual bool shouldSnapBackToDragOrigin(ScrollbarThemeClient*, const Platfor
     mMouseEvent&) { return false; } | 96     virtual bool shouldSnapBackToDragOrigin(ScrollbarThemeClient*, const Platfor
     mMouseEvent&) { return false; } | 
| 97     virtual bool shouldDragDocumentInsteadOfThumb(ScrollbarThemeClient*, const P
     latformMouseEvent&) { return false; } | 97     virtual bool shouldDragDocumentInsteadOfThumb(ScrollbarThemeClient*, const P
     latformMouseEvent&) { return false; } | 
| 98 | 98 | 
| 99     // The position of the thumb relative to the track. | 99     // The position of the thumb relative to the track. | 
| 100     virtual int thumbPosition(ScrollbarThemeClient*); | 100     virtual int thumbPosition(ScrollbarThemeClient*); | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 137     virtual bool isMockTheme() const { return false; } | 137     virtual bool isMockTheme() const { return false; } | 
| 138 | 138 | 
| 139     static ScrollbarTheme* theme(); | 139     static ScrollbarTheme* theme(); | 
| 140 | 140 | 
| 141 private: | 141 private: | 
| 142     static ScrollbarTheme* nativeTheme(); // Must be implemented to return the c
     orrect theme subclass. | 142     static ScrollbarTheme* nativeTheme(); // Must be implemented to return the c
     orrect theme subclass. | 
| 143 }; | 143 }; | 
| 144 | 144 | 
| 145 } | 145 } | 
| 146 #endif | 146 #endif | 
| OLD | NEW | 
|---|