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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h

Issue 1422493003: Change Widget subclasses to use a CullRect instead of an IntRect for painting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 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 16 matching lines...) Expand all
27 #define ScrollbarTheme_h 27 #define ScrollbarTheme_h
28 28
29 #include "platform/PlatformExport.h" 29 #include "platform/PlatformExport.h"
30 #include "platform/geometry/IntRect.h" 30 #include "platform/geometry/IntRect.h"
31 #include "platform/graphics/paint/DisplayItem.h" 31 #include "platform/graphics/paint/DisplayItem.h"
32 #include "platform/scroll/ScrollTypes.h" 32 #include "platform/scroll/ScrollTypes.h"
33 #include "public/platform/mac/MacScrollTypes.h" 33 #include "public/platform/mac/MacScrollTypes.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 class CullRect;
37 class GraphicsContext; 38 class GraphicsContext;
38 class PlatformMouseEvent; 39 class PlatformMouseEvent;
39 class ScrollbarThemeClient; 40 class ScrollbarThemeClient;
40 41
41 class PLATFORM_EXPORT ScrollbarTheme { 42 class PLATFORM_EXPORT ScrollbarTheme {
42 WTF_MAKE_NONCOPYABLE(ScrollbarTheme); WTF_MAKE_FAST_ALLOCATED(ScrollbarTheme ); 43 WTF_MAKE_NONCOPYABLE(ScrollbarTheme); WTF_MAKE_FAST_ALLOCATED(ScrollbarTheme );
43 public: 44 public:
44 ScrollbarTheme() { } 45 ScrollbarTheme() { }
45 virtual ~ScrollbarTheme() { } 46 virtual ~ScrollbarTheme() { }
46 47
47 virtual void updateEnabledState(const ScrollbarThemeClient*) { } 48 virtual void updateEnabledState(const ScrollbarThemeClient*) { }
48 49
49 virtual bool paint(const ScrollbarThemeClient*, GraphicsContext*, const IntR ect& damageRect); 50 virtual bool paint(const ScrollbarThemeClient*, GraphicsContext*, const Cull Rect&);
50 51
51 virtual ScrollbarPart hitTest(const ScrollbarThemeClient*, const IntPoint&); 52 virtual ScrollbarPart hitTest(const ScrollbarThemeClient*, const IntPoint&);
52 53
53 virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) { re turn 0; } 54 virtual int scrollbarThickness(ScrollbarControlSize = RegularScrollbar) { re turn 0; }
54 virtual int scrollbarMargin() const { return 0; } 55 virtual int scrollbarMargin() const { return 0; }
55 56
56 virtual ScrollbarButtonsPlacement buttonsPlacement() const { return Scrollba rButtonsPlacementSingle; } 57 virtual ScrollbarButtonsPlacement buttonsPlacement() const { return Scrollba rButtonsPlacementSingle; }
57 58
58 virtual bool supportsControlTints() const { return false; } 59 virtual bool supportsControlTints() const { return false; }
59 virtual bool usesOverlayScrollbars() const { return false; } 60 virtual bool usesOverlayScrollbars() const { return false; }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 static DisplayItem::Type buttonPartToDisplayItemType(ScrollbarPart); 138 static DisplayItem::Type buttonPartToDisplayItemType(ScrollbarPart);
138 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart); 139 static DisplayItem::Type trackPiecePartToDisplayItemType(ScrollbarPart);
139 140
140 private: 141 private:
141 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.
142 static bool gMockScrollbarsEnabled; 143 static bool gMockScrollbarsEnabled;
143 }; 144 };
144 145
145 } 146 }
146 #endif 147 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/scroll/Scrollbar.cpp ('k') | third_party/WebKit/Source/platform/scroll/ScrollbarTheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698