Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Side by Side Diff: Source/WebCore/platform/ScrollView.h

Issue 13818029: Remove TiledBacking / TileCache code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/WebCore/platform/HostWindow.h ('k') | Source/WebCore/platform/ScrollView.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // By default you only receive paint events for the area that is visible. In the case of using a 109 // By default you only receive paint events for the area that is visible. In the case of using a
110 // tiled backing store, this function can be set, so that the view paints th e entire contents. 110 // tiled backing store, this function can be set, so that the view paints th e entire contents.
111 bool paintsEntireContents() const { return m_paintsEntireContents; } 111 bool paintsEntireContents() const { return m_paintsEntireContents; }
112 void setPaintsEntireContents(bool); 112 void setPaintsEntireContents(bool);
113 113
114 // By default, paint events are clipped to the visible area. If set to 114 // By default, paint events are clipped to the visible area. If set to
115 // false, paint events are no longer clipped. paintsEntireContents() implie s !clipsRepaints(). 115 // false, paint events are no longer clipped. paintsEntireContents() implie s !clipsRepaints().
116 bool clipsRepaints() const { return m_clipsRepaints; } 116 bool clipsRepaints() const { return m_clipsRepaints; }
117 void setClipsRepaints(bool); 117 void setClipsRepaints(bool);
118 118
119 // By default programmatic scrolling is handled by WebCore and not by the UI application.
120 // In the case of using a tiled backing store, this mode can be set, so that the scroll requests
121 // are delegated to the UI application.
122 bool delegatesScrolling() const { return m_delegatesScrolling; }
123 void setDelegatesScrolling(bool);
124
125 // Overridden by FrameView to create custom CSS scrollbars if applicable. 119 // Overridden by FrameView to create custom CSS scrollbars if applicable.
126 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation); 120 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
127 121
128 // If the prohibits scrolling flag is set, then all scrolling in the view (e ven programmatic scrolling) is turned off. 122 // If the prohibits scrolling flag is set, then all scrolling in the view (e ven programmatic scrolling) is turned off.
129 void setProhibitsScrolling(bool b) { m_prohibitsScrolling = b; } 123 void setProhibitsScrolling(bool b) { m_prohibitsScrolling = b; }
130 bool prohibitsScrolling() const { return m_prohibitsScrolling; } 124 bool prohibitsScrolling() const { return m_prohibitsScrolling; }
131 125
132 // Whether or not a scroll view will blit visible contents when it is scroll ed. Blitting is disabled in situations 126 // Whether or not a scroll view will blit visible contents when it is scroll ed. Blitting is disabled in situations
133 // where it would cause rendering glitches (such as with fixed backgrounds o r when the view is partially transparent). 127 // where it would cause rendering glitches (such as with fixed backgrounds o r when the view is partially transparent).
134 void setCanBlitOnScroll(bool); 128 void setCanBlitOnScroll(bool);
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 284
291 protected: 285 protected:
292 ScrollView(); 286 ScrollView();
293 287
294 virtual void repaintContentRectangle(const IntRect&); 288 virtual void repaintContentRectangle(const IntRect&);
295 virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0; 289 virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0;
296 290
297 virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalO verhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect); 291 virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalO verhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect);
298 292
299 virtual void visibleContentsResized() = 0; 293 virtual void visibleContentsResized() = 0;
300 virtual void delegatesScrollingDidChange() { }
301 // These functions are used to create/destroy scrollbars. 294 // These functions are used to create/destroy scrollbars.
302 void setHasHorizontalScrollbar(bool); 295 void setHasHorizontalScrollbar(bool);
303 void setHasVerticalScrollbar(bool); 296 void setHasVerticalScrollbar(bool);
304 297
305 virtual void updateScrollCorner(); 298 virtual void updateScrollCorner();
306 virtual void invalidateScrollCornerRect(const IntRect&) OVERRIDE; 299 virtual void invalidateScrollCornerRect(const IntRect&) OVERRIDE;
307 300
308 // Scroll the content by blitting the pixels. 301 // Scroll the content by blitting the pixels.
309 virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRec t& rectToScroll, const IntRect& clipRect); 302 virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRec t& rectToScroll, const IntRect& clipRect);
310 // Scroll the content by invalidating everything. 303 // Scroll the content by invalidating everything.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 340
348 bool m_inUpdateScrollbars; 341 bool m_inUpdateScrollbars;
349 unsigned m_updateScrollbarsPass; 342 unsigned m_updateScrollbarsPass;
350 343
351 IntPoint m_panScrollIconPoint; 344 IntPoint m_panScrollIconPoint;
352 bool m_drawPanScrollIcon; 345 bool m_drawPanScrollIcon;
353 bool m_useFixedLayout; 346 bool m_useFixedLayout;
354 347
355 bool m_paintsEntireContents; 348 bool m_paintsEntireContents;
356 bool m_clipsRepaints; 349 bool m_clipsRepaints;
357 bool m_delegatesScrolling;
358 350
359 void init(); 351 void init();
360 void destroy(); 352 void destroy();
361 353
362 IntRect rectToCopyOnScroll() const; 354 IntRect rectToCopyOnScroll() const;
363 355
364 // Called when the scroll position within this view changes. FrameView over rides this to generate repaint invalidations. 356 // Called when the scroll position within this view changes. FrameView over rides this to generate repaint invalidations.
365 virtual void repaintFixedElementsAfterScrolling() { } 357 virtual void repaintFixedElementsAfterScrolling() { }
366 virtual void updateFixedElementsAfterScrolling() { } 358 virtual void updateFixedElementsAfterScrolling() { }
367 359
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 ASSERT(!widget || widget->isScrollView()); 401 ASSERT(!widget || widget->isScrollView());
410 return static_cast<const ScrollView*>(widget); 402 return static_cast<const ScrollView*>(widget);
411 } 403 }
412 404
413 // This will catch anyone doing an unnecessary cast. 405 // This will catch anyone doing an unnecessary cast.
414 void toScrollView(const ScrollView*); 406 void toScrollView(const ScrollView*);
415 407
416 } // namespace WebCore 408 } // namespace WebCore
417 409
418 #endif // ScrollView_h 410 #endif // ScrollView_h
OLDNEW
« no previous file with comments | « Source/WebCore/platform/HostWindow.h ('k') | Source/WebCore/platform/ScrollView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698