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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 virtual void setCanHaveScrollbars(bool); | 100 virtual void setCanHaveScrollbars(bool); |
101 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb
arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } | 101 bool canHaveScrollbars() const { return horizontalScrollbarMode() != Scrollb
arAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } |
102 | 102 |
103 // By default you only receive paint events for the area that is visible. In
the case of using a | 103 // By default you only receive paint events for the area that is visible. In
the case of using a |
104 // tiled backing store, this function can be set, so that the view paints th
e entire contents. | 104 // tiled backing store, this function can be set, so that the view paints th
e entire contents. |
105 bool paintsEntireContents() const { return m_paintsEntireContents; } | 105 bool paintsEntireContents() const { return m_paintsEntireContents; } |
106 void setPaintsEntireContents(bool); | 106 void setPaintsEntireContents(bool); |
107 | 107 |
108 // By default, paint events are clipped to the visible area. If set to | 108 // By default, paint events are clipped to the visible area. If set to |
109 // false, paint events are no longer clipped. paintsEntireContents() implie
s !clipsRepaints(). | 109 // false, paint events are no longer clipped. paintsEntireContents() implie
s !clipsRepaints(). |
110 bool clipsRepaints() const { return m_clipsRepaints; } | 110 bool clipsPaintInvalidations() const { return m_clipsRepaints; } |
111 void setClipsRepaints(bool); | 111 void setClipsRepaints(bool); |
112 | 112 |
113 // Overridden by FrameView to create custom CSS scrollbars if applicable. | 113 // Overridden by FrameView to create custom CSS scrollbars if applicable. |
114 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation); | 114 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation); |
115 | 115 |
116 virtual bool shouldAttemptToScrollUsingFastPath() const; | 116 virtual bool shouldAttemptToScrollUsingFastPath() const; |
117 | 117 |
118 // The visible content rect has a location that is the scrolled offset of th
e document. The width and height are the viewport width | 118 // The visible content rect has a location that is the scrolled offset of th
e document. The width and height are the viewport width |
119 // and height. By default the scrollbars themselves are excluded from this r
ectangle, but an optional boolean argument allows them to be | 119 // and height. By default the scrollbars themselves are excluded from this r
ectangle, but an optional boolean argument allows them to be |
120 // included. | 120 // included. |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons
t IntPoint&) const OVERRIDE; | 249 virtual IntPoint convertFromContainingViewToScrollbar(const Scrollbar*, cons
t IntPoint&) const OVERRIDE; |
250 | 250 |
251 void calculateAndPaintOverhangAreas(GraphicsContext*, const IntRect& dirtyRe
ct); | 251 void calculateAndPaintOverhangAreas(GraphicsContext*, const IntRect& dirtyRe
ct); |
252 void calculateAndPaintOverhangBackground(GraphicsContext*, const IntRect& di
rtyRect); | 252 void calculateAndPaintOverhangBackground(GraphicsContext*, const IntRect& di
rtyRect); |
253 | 253 |
254 virtual bool isScrollView() const OVERRIDE FINAL { return true; } | 254 virtual bool isScrollView() const OVERRIDE FINAL { return true; } |
255 | 255 |
256 protected: | 256 protected: |
257 ScrollView(); | 257 ScrollView(); |
258 | 258 |
259 virtual void repaintContentRectangle(const IntRect&); | 259 virtual void invalidatedContentRectangleForPaint(const IntRect&); |
260 virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0; | 260 virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0; |
261 | 261 |
262 virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalO
verhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect); | 262 virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalO
verhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect); |
263 | 263 |
264 virtual void scrollbarExistenceDidChange() = 0; | 264 virtual void scrollbarExistenceDidChange() = 0; |
265 // These functions are used to create/destroy scrollbars. | 265 // These functions are used to create/destroy scrollbars. |
266 void setHasHorizontalScrollbar(bool); | 266 void setHasHorizontalScrollbar(bool); |
267 void setHasVerticalScrollbar(bool); | 267 void setHasVerticalScrollbar(bool); |
268 | 268 |
269 virtual void updateScrollCorner(); | 269 virtual void updateScrollCorner(); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 | 321 |
322 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR
ect& verticalOverhangRect); | 322 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR
ect& verticalOverhangRect); |
323 void updateOverhangAreas(); | 323 void updateOverhangAreas(); |
324 }; // class ScrollView | 324 }; // class ScrollView |
325 | 325 |
326 DEFINE_TYPE_CASTS(ScrollView, Widget, widget, widget->isScrollView(), widget.isS
crollView()); | 326 DEFINE_TYPE_CASTS(ScrollView, Widget, widget, widget->isScrollView(), widget.isS
crollView()); |
327 | 327 |
328 } // namespace WebCore | 328 } // namespace WebCore |
329 | 329 |
330 #endif // ScrollView_h | 330 #endif // ScrollView_h |
OLD | NEW |