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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 virtual void setParent(Widget*) OVERRIDE; // Overridden to update the overla
pping scrollbar count. | 198 virtual void setParent(Widget*) OVERRIDE; // Overridden to update the overla
pping scrollbar count. |
199 | 199 |
200 // Called when our frame rect changes (or the rect/scroll position of an anc
estor changes). | 200 // Called when our frame rect changes (or the rect/scroll position of an anc
estor changes). |
201 virtual void frameRectsChanged() OVERRIDE; | 201 virtual void frameRectsChanged() OVERRIDE; |
202 | 202 |
203 // Widget override to update our scrollbars and notify our contents of the r
esize. | 203 // Widget override to update our scrollbars and notify our contents of the r
esize. |
204 virtual void setFrameRect(const IntRect&) OVERRIDE; | 204 virtual void setFrameRect(const IntRect&) OVERRIDE; |
205 | 205 |
206 // For platforms that need to hit test scrollbars from within the engine's e
vent handlers (like Win32). | 206 // For platforms that need to hit test scrollbars from within the engine's e
vent handlers (like Win32). |
207 Scrollbar* scrollbarAtPoint(const IntPoint& windowPoint); | 207 Scrollbar* scrollbarAtWindowPoint(const IntPoint& windowPoint); |
| 208 Scrollbar* scrollbarAtViewPoint(const IntPoint& viewPoint); |
208 | 209 |
209 virtual IntPoint convertChildToSelf(const Widget* child, const IntPoint& poi
nt) const OVERRIDE | 210 virtual IntPoint convertChildToSelf(const Widget* child, const IntPoint& poi
nt) const OVERRIDE |
210 { | 211 { |
211 IntPoint newPoint = point; | 212 IntPoint newPoint = point; |
212 if (!isScrollViewScrollbar(child)) | 213 if (!isScrollViewScrollbar(child)) |
213 newPoint = point - scrollOffset(); | 214 newPoint = point - scrollOffset(); |
214 newPoint.moveBy(child->location()); | 215 newPoint.moveBy(child->location()); |
215 return newPoint; | 216 return newPoint; |
216 } | 217 } |
217 | 218 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 | 342 |
342 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR
ect& verticalOverhangRect); | 343 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR
ect& verticalOverhangRect); |
343 void updateOverhangAreas(); | 344 void updateOverhangAreas(); |
344 }; // class ScrollView | 345 }; // class ScrollView |
345 | 346 |
346 DEFINE_TYPE_CASTS(ScrollView, Widget, widget, widget->isScrollView(), widget.isS
crollView()); | 347 DEFINE_TYPE_CASTS(ScrollView, Widget, widget, widget->isScrollView(), widget.isS
crollView()); |
347 | 348 |
348 } // namespace blink | 349 } // namespace blink |
349 | 350 |
350 #endif // ScrollView_h | 351 #endif // ScrollView_h |
OLD | NEW |