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

Side by Side Diff: Source/core/platform/Scrollbar.h

Issue 23734003: Add the text direction to the WebScrollbar interface. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: less memory Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/platform/ScrollableArea.cpp ('k') | Source/core/platform/Scrollbar.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2006 Apple Computer, 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 12 matching lines...) Expand all
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef Scrollbar_h 26 #ifndef Scrollbar_h
27 #define Scrollbar_h 27 #define Scrollbar_h
28 28
29 #include "core/platform/ScrollTypes.h" 29 #include "core/platform/ScrollTypes.h"
30 #include "core/platform/ScrollbarThemeClient.h" 30 #include "core/platform/ScrollbarThemeClient.h"
31 #include "core/platform/Timer.h" 31 #include "core/platform/Timer.h"
32 #include "core/platform/Widget.h" 32 #include "core/platform/Widget.h"
33 #include "core/platform/text/TextDirection.h"
33 #include "wtf/MathExtras.h" 34 #include "wtf/MathExtras.h"
34 #include "wtf/PassRefPtr.h" 35 #include "wtf/PassRefPtr.h"
35 36
36 namespace WebCore { 37 namespace WebCore {
37 38
38 class GraphicsContext; 39 class GraphicsContext;
39 class IntRect; 40 class IntRect;
40 class PlatformGestureEvent; 41 class PlatformGestureEvent;
41 class PlatformMouseEvent; 42 class PlatformMouseEvent;
42 class ScrollableArea; 43 class ScrollableArea;
43 class ScrollbarTheme; 44 class ScrollbarTheme;
44 45
45 class Scrollbar : public Widget, 46 class Scrollbar : public Widget,
46 public ScrollbarThemeClient { 47 public ScrollbarThemeClient {
47 48
48 public: 49 public:
49 // Must be implemented by platforms that can't simply use the Scrollbar base class. Right now the only platform that is not using the base class is GTK. 50 // Must be implemented by platforms that can't simply use the Scrollbar base class. Right now the only platform that is not using the base class is GTK.
50 static PassRefPtr<Scrollbar> createNativeScrollbar(ScrollableArea*, Scrollba rOrientation orientation, ScrollbarControlSize size); 51 static PassRefPtr<Scrollbar> createNativeScrollbar(ScrollableArea*, Scrollba rOrientation, ScrollbarControlSize);
51 52
52 virtual ~Scrollbar(); 53 virtual ~Scrollbar();
53 54
54 // ScrollbarThemeClient implementation. 55 // ScrollbarThemeClient implementation.
55 virtual int x() const { return Widget::x(); } 56 virtual int x() const { return Widget::x(); }
56 virtual int y() const { return Widget::y(); } 57 virtual int y() const { return Widget::y(); }
57 virtual int width() const { return Widget::width(); } 58 virtual int width() const { return Widget::width(); }
58 virtual int height() const { return Widget::height(); } 59 virtual int height() const { return Widget::height(); }
59 virtual IntSize size() const { return Widget::size(); } 60 virtual IntSize size() const { return Widget::size(); }
60 virtual IntPoint location() const { return Widget::location(); } 61 virtual IntPoint location() const { return Widget::location(); }
61 62
62 virtual ScrollView* parent() const { return Widget::parent(); } 63 virtual ScrollView* parent() const { return Widget::parent(); }
63 virtual ScrollView* root() const { return Widget::root(); } 64 virtual ScrollView* root() const { return Widget::root(); }
64 65
65 virtual void setFrameRect(const IntRect&); 66 virtual void setFrameRect(const IntRect&);
66 virtual IntRect frameRect() const { return Widget::frameRect(); } 67 virtual IntRect frameRect() const { return Widget::frameRect(); }
67 68
68 virtual void invalidate() { Widget::invalidate(); } 69 virtual void invalidate() { Widget::invalidate(); }
69 virtual void invalidateRect(const IntRect&); 70 virtual void invalidateRect(const IntRect&);
70 71
71 virtual ScrollbarOverlayStyle scrollbarOverlayStyle() const; 72 virtual ScrollbarOverlayStyle scrollbarOverlayStyle() const;
72 virtual void getTickmarks(Vector<IntRect>&) const; 73 virtual void getTickmarks(Vector<IntRect>&) const;
73 virtual bool isScrollableAreaActive() const; 74 virtual bool isScrollableAreaActive() const;
74 virtual bool isScrollViewScrollbar() const; 75 virtual bool isScrollViewScrollbar() const;
75 76
76 virtual IntPoint convertFromContainingWindow(const IntPoint& windowPoint) { return Widget::convertFromContainingWindow(windowPoint); } 77 virtual IntPoint convertFromContainingWindow(const IntPoint& windowPoint) { return Widget::convertFromContainingWindow(windowPoint); }
77 78
78 virtual bool isCustomScrollbar() const { return false; } 79 virtual bool isCustomScrollbar() const { return false; }
79 virtual ScrollbarOrientation orientation() const { return m_orientation; } 80 virtual ScrollbarOrientation orientation() const { return m_orientation; }
81 TextDirection textDirection() const;
80 82
81 virtual int value() const { return lroundf(m_currentPos); } 83 virtual int value() const { return lroundf(m_currentPos); }
82 virtual float currentPos() const { return m_currentPos; } 84 virtual float currentPos() const { return m_currentPos; }
83 virtual int visibleSize() const { return m_visibleSize; } 85 virtual int visibleSize() const { return m_visibleSize; }
84 virtual int totalSize() const { return m_totalSize; } 86 virtual int totalSize() const { return m_totalSize; }
85 virtual int maximum() const { return m_totalSize - m_visibleSize; } 87 virtual int maximum() const { return m_totalSize - m_visibleSize; }
86 virtual ScrollbarControlSize controlSize() const { return m_controlSize; } 88 virtual ScrollbarControlSize controlSize() const { return m_controlSize; }
87 89
88 virtual ScrollbarPart pressedPart() const { return m_pressedPart; } 90 virtual ScrollbarPart pressedPart() const { return m_pressedPart; }
89 virtual ScrollbarPart hoveredPart() const { return m_hoveredPart; } 91 virtual ScrollbarPart hoveredPart() const { return m_hoveredPart; }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 private: 190 private:
189 virtual bool isScrollbar() const { return true; } 191 virtual bool isScrollbar() const { return true; }
190 virtual AXObjectCache* existingAXObjectCache() const; 192 virtual AXObjectCache* existingAXObjectCache() const;
191 193
192 float scrollableAreaCurrentPos() const; 194 float scrollableAreaCurrentPos() const;
193 }; 195 };
194 196
195 } // namespace WebCore 197 } // namespace WebCore
196 198
197 #endif // Scrollbar_h 199 #endif // Scrollbar_h
OLDNEW
« no previous file with comments | « Source/core/platform/ScrollableArea.cpp ('k') | Source/core/platform/Scrollbar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698