| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // ScrollableArea functions. | 48 // ScrollableArea functions. |
| 49 virtual int scrollSize(ScrollbarOrientation) const OVERRIDE; | 49 virtual int scrollSize(ScrollbarOrientation) const OVERRIDE; |
| 50 virtual void setScrollOffset(const IntPoint&) OVERRIDE; | 50 virtual void setScrollOffset(const IntPoint&) OVERRIDE; |
| 51 virtual bool isScrollCornerVisible() const OVERRIDE; | 51 virtual bool isScrollCornerVisible() const OVERRIDE; |
| 52 virtual void scrollbarStyleChanged() OVERRIDE; | 52 virtual void scrollbarStyleChanged() OVERRIDE; |
| 53 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE; | 53 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE; |
| 54 virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE; | 54 virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE; |
| 55 | 55 |
| 56 virtual void notifyPageThatContentAreaWillPaint() const; | 56 virtual void notifyPageThatContentAreaWillPaint() const; |
| 57 | 57 |
| 58 // NOTE: This should only be called by the overriden setScrollOffset from Sc
rollableArea. | |
| 59 virtual void scrollTo(const IntSize& newOffset); | |
| 60 | |
| 61 // The window that hosts the ScrollView. The ScrollView will communicate scr
olls and repaints to the | 58 // The window that hosts the ScrollView. The ScrollView will communicate scr
olls and repaints to the |
| 62 // host window in the window's coordinate space. | 59 // host window in the window's coordinate space. |
| 63 virtual HostWindow* hostWindow() const = 0; | 60 virtual HostWindow* hostWindow() const = 0; |
| 64 | 61 |
| 65 // Returns a clip rect in host window coordinates. Used to clip the blit on
a scroll. | 62 // Returns a clip rect in host window coordinates. Used to clip the blit on
a scroll. |
| 66 virtual IntRect windowClipRect(IncludeScrollbarsInRect = ExcludeScrollbars)
const = 0; | 63 virtual IntRect windowClipRect(IncludeScrollbarsInRect = ExcludeScrollbars)
const = 0; |
| 67 | 64 |
| 68 // Functions for child manipulation and inspection. | 65 // Functions for child manipulation and inspection. |
| 69 const HashSet<RefPtr<Widget> >* children() const { return &m_children; } | 66 const HashSet<RefPtr<Widget> >* children() const { return &m_children; } |
| 70 virtual void addChild(PassRefPtr<Widget>); | 67 virtual void addChild(PassRefPtr<Widget>); |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons
t IntPoint&) const OVERRIDE; | 248 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons
t IntPoint&) const OVERRIDE; |
| 252 | 249 |
| 253 void calculateAndPaintOverhangAreas(GraphicsContext*, const IntRect& dirtyRe
ct); | 250 void calculateAndPaintOverhangAreas(GraphicsContext*, const IntRect& dirtyRe
ct); |
| 254 void calculateAndPaintOverhangBackground(GraphicsContext*, const IntRect& di
rtyRect); | 251 void calculateAndPaintOverhangBackground(GraphicsContext*, const IntRect& di
rtyRect); |
| 255 | 252 |
| 256 virtual bool isScrollView() const OVERRIDE FINAL { return true; } | 253 virtual bool isScrollView() const OVERRIDE FINAL { return true; } |
| 257 | 254 |
| 258 protected: | 255 protected: |
| 259 ScrollView(); | 256 ScrollView(); |
| 260 | 257 |
| 258 // NOTE: This should only be called by the overriden setScrollOffset from Sc
rollableArea. |
| 259 virtual void scrollTo(const IntSize& newOffset); |
| 260 |
| 261 virtual void contentRectangleForPaintInvalidation(const IntRect&); | 261 virtual void contentRectangleForPaintInvalidation(const IntRect&); |
| 262 virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0; | 262 virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0; |
| 263 | 263 |
| 264 virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalO
verhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect); | 264 virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalO
verhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect); |
| 265 | 265 |
| 266 virtual void scrollbarExistenceDidChange() = 0; | 266 virtual void scrollbarExistenceDidChange() = 0; |
| 267 // These functions are used to create/destroy scrollbars. | 267 // These functions are used to create/destroy scrollbars. |
| 268 void setHasHorizontalScrollbar(bool); | 268 void setHasHorizontalScrollbar(bool); |
| 269 void setHasVerticalScrollbar(bool); | 269 void setHasVerticalScrollbar(bool); |
| 270 | 270 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 341 |
| 342 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR
ect& verticalOverhangRect); | 342 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR
ect& verticalOverhangRect); |
| 343 void updateOverhangAreas(); | 343 void updateOverhangAreas(); |
| 344 }; // class ScrollView | 344 }; // class ScrollView |
| 345 | 345 |
| 346 DEFINE_TYPE_CASTS(ScrollView, Widget, widget, widget->isScrollView(), widget.isS
crollView()); | 346 DEFINE_TYPE_CASTS(ScrollView, Widget, widget, widget->isScrollView(), widget.isS
crollView()); |
| 347 | 347 |
| 348 } // namespace blink | 348 } // namespace blink |
| 349 | 349 |
| 350 #endif // ScrollView_h | 350 #endif // ScrollView_h |
| OLD | NEW |