OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Holger Hans Peter Freyther | 3 * Copyright (C) 2009 Holger Hans Peter Freyther |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 // we know that we are either not in a window right now or if that window is
not visible. | 190 // we know that we are either not in a window right now or if that window is
not visible. |
191 bool isOffscreen() const; | 191 bool isOffscreen() const; |
192 | 192 |
193 // These functions are used to enable scrollbars to avoid window resizer con
trols that overlap the scroll view. This happens on Mac | 193 // These functions are used to enable scrollbars to avoid window resizer con
trols that overlap the scroll view. This happens on Mac |
194 // for example. | 194 // for example. |
195 virtual IntRect windowResizerRect() const { return IntRect(); } | 195 virtual IntRect windowResizerRect() const { return IntRect(); } |
196 bool containsScrollbarsAvoidingResizer() const; | 196 bool containsScrollbarsAvoidingResizer() const; |
197 void adjustScrollbarsAvoidingResizerCount(int overlapDelta); | 197 void adjustScrollbarsAvoidingResizerCount(int overlapDelta); |
198 void windowResizerRectChanged(); | 198 void windowResizerRectChanged(); |
199 | 199 |
200 virtual void setParent(ScrollView*); // Overridden to update the overlapping
scrollbar count. | 200 virtual void setParent(Widget*) OVERRIDE; // Overridden to update the overla
pping scrollbar count. |
201 | 201 |
202 // Called when our frame rect changes (or the rect/scroll position of an anc
estor changes). | 202 // Called when our frame rect changes (or the rect/scroll position of an anc
estor changes). |
203 virtual void frameRectsChanged(); | 203 virtual void frameRectsChanged(); |
204 | 204 |
205 // Widget override to update our scrollbars and notify our contents of the r
esize. | 205 // Widget override to update our scrollbars and notify our contents of the r
esize. |
206 virtual void setFrameRect(const IntRect&); | 206 virtual void setFrameRect(const IntRect&); |
207 | 207 |
208 // Widget override to notify our contents of a cliprect change. | 208 // Widget override to notify our contents of a cliprect change. |
209 virtual void clipRectChanged() OVERRIDE; | 209 virtual void clipRectChanged() OVERRIDE; |
210 | 210 |
211 // For platforms that need to hit test scrollbars from within the engine's e
vent handlers (like Win32). | 211 // For platforms that need to hit test scrollbars from within the engine's e
vent handlers (like Win32). |
212 Scrollbar* scrollbarAtPoint(const IntPoint& windowPoint); | 212 Scrollbar* scrollbarAtPoint(const IntPoint& windowPoint); |
213 | 213 |
214 IntPoint convertChildToSelf(const Widget* child, const IntPoint& point) cons
t | 214 virtual IntPoint convertChildToSelf(const Widget* child, const IntPoint& poi
nt) const |
215 { | 215 { |
216 IntPoint newPoint = point; | 216 IntPoint newPoint = point; |
217 if (!isScrollViewScrollbar(child)) | 217 if (!isScrollViewScrollbar(child)) |
218 newPoint = point - scrollOffset(); | 218 newPoint = point - scrollOffset(); |
219 newPoint.moveBy(child->location()); | 219 newPoint.moveBy(child->location()); |
220 return newPoint; | 220 return newPoint; |
221 } | 221 } |
222 | 222 |
223 IntPoint convertSelfToChild(const Widget* child, const IntPoint& point) cons
t | 223 virtual IntPoint convertSelfToChild(const Widget* child, const IntPoint& poi
nt) const |
224 { | 224 { |
225 IntPoint newPoint = point; | 225 IntPoint newPoint = point; |
226 if (!isScrollViewScrollbar(child)) | 226 if (!isScrollViewScrollbar(child)) |
227 newPoint = point + scrollOffset(); | 227 newPoint = point + scrollOffset(); |
228 newPoint.moveBy(-child->location()); | 228 newPoint.moveBy(-child->location()); |
229 return newPoint; | 229 return newPoint; |
230 } | 230 } |
231 | 231 |
| 232 // A means to access the AX cache when this object can get a pointer to it. |
| 233 virtual AXObjectCache* axObjectCache() const { return 0; } |
| 234 |
232 // Widget override. Handles painting of the contents of the view as well as
the scrollbars. | 235 // Widget override. Handles painting of the contents of the view as well as
the scrollbars. |
233 virtual void paint(GraphicsContext*, const IntRect&); | 236 virtual void paint(GraphicsContext*, const IntRect&); |
234 void paintScrollbars(GraphicsContext*, const IntRect&); | 237 void paintScrollbars(GraphicsContext*, const IntRect&); |
235 | 238 |
236 // Widget overrides to ensure that our children's visibility status is kept
up to date when we get shown and hidden. | 239 // Widget overrides to ensure that our children's visibility status is kept
up to date when we get shown and hidden. |
237 virtual void show(); | 240 virtual void show(); |
238 virtual void hide(); | 241 virtual void hide(); |
239 virtual void setParentVisible(bool); | 242 virtual void setParentVisible(bool); |
240 | 243 |
241 // Pan scrolling. | 244 // Pan scrolling. |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 ASSERT(!widget || widget->isScrollView()); | 352 ASSERT(!widget || widget->isScrollView()); |
350 return static_cast<const ScrollView*>(widget); | 353 return static_cast<const ScrollView*>(widget); |
351 } | 354 } |
352 | 355 |
353 // This will catch anyone doing an unnecessary cast. | 356 // This will catch anyone doing an unnecessary cast. |
354 void toScrollView(const ScrollView*); | 357 void toScrollView(const ScrollView*); |
355 | 358 |
356 } // namespace WebCore | 359 } // namespace WebCore |
357 | 360 |
358 #endif // ScrollView_h | 361 #endif // ScrollView_h |
OLD | NEW |