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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 virtual bool shouldUseIntegerScrollOffset() const { return !RuntimeEnabledFe
atures::fractionalScrollOffsetsEnabled(); } | 146 virtual bool shouldUseIntegerScrollOffset() const { return !RuntimeEnabledFe
atures::fractionalScrollOffsetsEnabled(); } |
147 | 147 |
148 virtual bool isActive() const = 0; | 148 virtual bool isActive() const = 0; |
149 virtual int scrollSize(ScrollbarOrientation) const = 0; | 149 virtual int scrollSize(ScrollbarOrientation) const = 0; |
150 void setScrollbarNeedsPaintInvalidation(Scrollbar*); | 150 void setScrollbarNeedsPaintInvalidation(Scrollbar*); |
151 virtual bool isScrollCornerVisible() const = 0; | 151 virtual bool isScrollCornerVisible() const = 0; |
152 virtual IntRect scrollCornerRect() const = 0; | 152 virtual IntRect scrollCornerRect() const = 0; |
153 void setScrollCornerNeedsPaintInvalidation(); | 153 void setScrollCornerNeedsPaintInvalidation(); |
154 virtual void getTickmarks(Vector<IntRect>&) const { } | 154 virtual void getTickmarks(Vector<IntRect>&) const { } |
155 | 155 |
156 // Convert points and rects between the scrollbar and its containing view. | 156 // Convert points and rects between the scrollbar and its containing Widget. |
157 // The client needs to implement these in order to be aware of layout effect
s | 157 // The client needs to implement these in order to be aware of layout effect
s |
158 // like CSS transforms. | 158 // like CSS transforms. |
159 virtual IntRect convertFromScrollbarToContainingView(const Scrollbar* scroll
bar, const IntRect& scrollbarRect) const | 159 virtual IntRect convertFromScrollbarToContainingWidget(const Scrollbar* scro
llbar, const IntRect& scrollbarRect) const |
160 { | 160 { |
161 return scrollbar->Widget::convertToContainingView(scrollbarRect); | 161 return scrollbar->Widget::convertToContainingWidget(scrollbarRect); |
162 } | 162 } |
163 virtual IntRect convertFromContainingViewToScrollbar(const Scrollbar* scroll
bar, const IntRect& parentRect) const | 163 virtual IntRect convertFromContainingWidgetToScrollbar(const Scrollbar* scro
llbar, const IntRect& parentRect) const |
164 { | 164 { |
165 return scrollbar->Widget::convertFromContainingView(parentRect); | 165 return scrollbar->Widget::convertFromContainingWidget(parentRect); |
166 } | 166 } |
167 virtual IntPoint convertFromScrollbarToContainingView(const Scrollbar* scrol
lbar, const IntPoint& scrollbarPoint) const | 167 virtual IntPoint convertFromScrollbarToContainingWidget(const Scrollbar* scr
ollbar, const IntPoint& scrollbarPoint) const |
168 { | 168 { |
169 return scrollbar->Widget::convertToContainingView(scrollbarPoint); | 169 return scrollbar->Widget::convertToContainingWidget(scrollbarPoint); |
170 } | 170 } |
171 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar* scrol
lbar, const IntPoint& parentPoint) const | 171 virtual IntPoint convertFromContainingWidgetToScrollbar(const Scrollbar* scr
ollbar, const IntPoint& parentPoint) const |
172 { | 172 { |
173 return scrollbar->Widget::convertFromContainingView(parentPoint); | 173 return scrollbar->Widget::convertFromContainingWidget(parentPoint); |
174 } | 174 } |
175 | 175 |
176 virtual Scrollbar* horizontalScrollbar() const { return 0; } | 176 virtual Scrollbar* horizontalScrollbar() const { return 0; } |
177 virtual Scrollbar* verticalScrollbar() const { return 0; } | 177 virtual Scrollbar* verticalScrollbar() const { return 0; } |
178 | 178 |
179 // scrollPosition is relative to the scrollOrigin. i.e. If the page is RTL | 179 // scrollPosition is relative to the scrollOrigin. i.e. If the page is RTL |
180 // then scrollPosition will be negative. By default, scrollPositionDouble() | 180 // then scrollPosition will be negative. By default, scrollPositionDouble() |
181 // just call into scrollPosition(). Subclass can override scrollPositionDoub
le() | 181 // just call into scrollPosition(). Subclass can override scrollPositionDoub
le() |
182 // to return floating point precision scrolloffset. | 182 // to return floating point precision scrolloffset. |
183 // FIXME: Remove scrollPosition(). crbug.com/414283. | 183 // FIXME: Remove scrollPosition(). crbug.com/414283. |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 // vertical-lr / ltr NO NO | 352 // vertical-lr / ltr NO NO |
353 // vertical-lr / rtl NO YES | 353 // vertical-lr / rtl NO YES |
354 // vertical-rl / ltr YES NO | 354 // vertical-rl / ltr YES NO |
355 // vertical-rl / rtl YES YES | 355 // vertical-rl / rtl YES YES |
356 IntPoint m_scrollOrigin; | 356 IntPoint m_scrollOrigin; |
357 }; | 357 }; |
358 | 358 |
359 } // namespace blink | 359 } // namespace blink |
360 | 360 |
361 #endif // ScrollableArea_h | 361 #endif // ScrollableArea_h |
OLD | NEW |