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 17 matching lines...) Expand all Loading... | |
28 #define ScrollView_h | 28 #define ScrollView_h |
29 | 29 |
30 #include "platform/PlatformExport.h" | 30 #include "platform/PlatformExport.h" |
31 #include "platform/Widget.h" | 31 #include "platform/Widget.h" |
32 #include "platform/geometry/IntRect.h" | 32 #include "platform/geometry/IntRect.h" |
33 #include "platform/scroll/ScrollTypes.h" | 33 #include "platform/scroll/ScrollTypes.h" |
34 #include "platform/scroll/ScrollableArea.h" | 34 #include "platform/scroll/ScrollableArea.h" |
35 #include "platform/scroll/Scrollbar.h" | 35 #include "platform/scroll/Scrollbar.h" |
36 | 36 |
37 #include "wtf/HashSet.h" | 37 #include "wtf/HashSet.h" |
38 #include "wtf/TemporaryChange.h" | |
38 | 39 |
39 namespace WebCore { | 40 namespace WebCore { |
40 | 41 |
41 class HostWindow; | 42 class HostWindow; |
42 class Scrollbar; | 43 class Scrollbar; |
43 | 44 |
44 class PLATFORM_EXPORT ScrollView : public Widget, public ScrollableArea { | 45 class PLATFORM_EXPORT ScrollView : public Widget, public ScrollableArea { |
45 public: | 46 public: |
46 virtual ~ScrollView(); | 47 virtual ~ScrollView(); |
47 | 48 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
287 Incremental | 288 Incremental |
288 }; | 289 }; |
289 void computeScrollbarExistence(bool& newHasHorizontalScrollbar, bool& newHas VerticalScrollbar, ComputeScrollbarExistenceOption = FirstPass) const; | 290 void computeScrollbarExistence(bool& newHasHorizontalScrollbar, bool& newHas VerticalScrollbar, ComputeScrollbarExistenceOption = FirstPass) const; |
290 void updateScrollbarGeometry(); | 291 void updateScrollbarGeometry(); |
291 | 292 |
292 // Called to update the scrollbars to accurately reflect the state of the vi ew. | 293 // Called to update the scrollbars to accurately reflect the state of the vi ew. |
293 void updateScrollbars(const IntSize& desiredOffset); | 294 void updateScrollbars(const IntSize& desiredOffset); |
294 | 295 |
295 IntSize excludeScrollbars(const IntSize&) const; | 296 IntSize excludeScrollbars(const IntSize&) const; |
296 | 297 |
298 class InUpdateScrollbarsScope { | |
299 public: | |
300 explicit InUpdateScrollbarsScope(ScrollView* view) : m_scope(view->m_inU pdateScrollbars, true) { } | |
esprehn
2014/06/13 05:22:22
ScrollView&, I'd also put the : on the next line l
| |
301 private: | |
302 TemporaryChange<bool> m_scope; | |
303 }; | |
304 | |
297 private: | 305 private: |
298 bool adjustScrollbarExistence(ComputeScrollbarExistenceOption = FirstPass); | 306 bool adjustScrollbarExistence(ComputeScrollbarExistenceOption = FirstPass); |
299 | 307 |
300 RefPtr<Scrollbar> m_horizontalScrollbar; | 308 RefPtr<Scrollbar> m_horizontalScrollbar; |
301 RefPtr<Scrollbar> m_verticalScrollbar; | 309 RefPtr<Scrollbar> m_verticalScrollbar; |
302 ScrollbarMode m_horizontalScrollbarMode; | 310 ScrollbarMode m_horizontalScrollbarMode; |
303 ScrollbarMode m_verticalScrollbarMode; | 311 ScrollbarMode m_verticalScrollbarMode; |
304 | 312 |
305 bool m_horizontalScrollbarLock; | 313 bool m_horizontalScrollbarLock; |
306 bool m_verticalScrollbarLock; | 314 bool m_verticalScrollbarLock; |
(...skipping 23 matching lines...) Expand all Loading... | |
330 | 338 |
331 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR ect& verticalOverhangRect); | 339 void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntR ect& verticalOverhangRect); |
332 void updateOverhangAreas(); | 340 void updateOverhangAreas(); |
333 }; // class ScrollView | 341 }; // class ScrollView |
334 | 342 |
335 DEFINE_TYPE_CASTS(ScrollView, Widget, widget, widget->isScrollView(), widget.isS crollView()); | 343 DEFINE_TYPE_CASTS(ScrollView, Widget, widget, widget->isScrollView(), widget.isS crollView()); |
336 | 344 |
337 } // namespace WebCore | 345 } // namespace WebCore |
338 | 346 |
339 #endif // ScrollView_h | 347 #endif // ScrollView_h |
OLD | NEW |