| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 // Functions for getting/setting the size webkit should use to layout the co
ntents. By default this is the same as the visible | 132 // Functions for getting/setting the size webkit should use to layout the co
ntents. By default this is the same as the visible |
| 133 // content size. Explicitly setting a layout size value will cause webkit to
layout the contents using this size instead. | 133 // content size. Explicitly setting a layout size value will cause webkit to
layout the contents using this size instead. |
| 134 IntSize layoutSize(VisibleContentRectIncludesScrollbars = ExcludeScrollbars)
const; | 134 IntSize layoutSize(VisibleContentRectIncludesScrollbars = ExcludeScrollbars)
const; |
| 135 int layoutWidth(VisibleContentRectIncludesScrollbars scrollbarInclusion = Ex
cludeScrollbars) const { return layoutSize(scrollbarInclusion).width(); } | 135 int layoutWidth(VisibleContentRectIncludesScrollbars scrollbarInclusion = Ex
cludeScrollbars) const { return layoutSize(scrollbarInclusion).width(); } |
| 136 int layoutHeight(VisibleContentRectIncludesScrollbars scrollbarInclusion = E
xcludeScrollbars) const { return layoutSize(scrollbarInclusion).height(); } | 136 int layoutHeight(VisibleContentRectIncludesScrollbars scrollbarInclusion = E
xcludeScrollbars) const { return layoutSize(scrollbarInclusion).height(); } |
| 137 IntSize fixedLayoutSize() const; | 137 IntSize fixedLayoutSize() const; |
| 138 void setFixedLayoutSize(const IntSize&); | 138 void setFixedLayoutSize(const IntSize&); |
| 139 bool useFixedLayout() const; | 139 bool useFixedLayout() const; |
| 140 void setUseFixedLayout(bool enable); | 140 void setUseFixedLayout(bool enable); |
| 141 void setFixedLayoutSizeLock(bool); |
| 142 bool fixedLayoutSizeLock() const; |
| 141 | 143 |
| 142 // Functions for getting/setting the size of the document contained inside t
he ScrollView (as an IntSize or as individual width and height | 144 // Functions for getting/setting the size of the document contained inside t
he ScrollView (as an IntSize or as individual width and height |
| 143 // values). | 145 // values). |
| 144 virtual IntSize contentsSize() const OVERRIDE; // Always at least as big as
the visibleWidth()/visibleHeight(). | 146 virtual IntSize contentsSize() const OVERRIDE; // Always at least as big as
the visibleWidth()/visibleHeight(). |
| 145 int contentsWidth() const { return contentsSize().width(); } | 147 int contentsWidth() const { return contentsSize().width(); } |
| 146 int contentsHeight() const { return contentsSize().height(); } | 148 int contentsHeight() const { return contentsSize().height(); } |
| 147 virtual void setContentsSize(const IntSize&); | 149 virtual void setContentsSize(const IntSize&); |
| 148 | 150 |
| 149 // Functions for querying the current scrolled position (both as a point, a
size, or as individual X and Y values). | 151 // Functions for querying the current scrolled position (both as a point, a
size, or as individual X and Y values). |
| 150 virtual IntPoint scrollPosition() const OVERRIDE { return visibleContentRect
().location(); } | 152 virtual IntPoint scrollPosition() const OVERRIDE { return visibleContentRect
().location(); } |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 | 320 |
| 319 int m_scrollbarsAvoidingResizer; | 321 int m_scrollbarsAvoidingResizer; |
| 320 bool m_scrollbarsSuppressed; | 322 bool m_scrollbarsSuppressed; |
| 321 | 323 |
| 322 bool m_inUpdateScrollbars; | 324 bool m_inUpdateScrollbars; |
| 323 unsigned m_updateScrollbarsPass; | 325 unsigned m_updateScrollbarsPass; |
| 324 | 326 |
| 325 IntPoint m_panScrollIconPoint; | 327 IntPoint m_panScrollIconPoint; |
| 326 bool m_drawPanScrollIcon; | 328 bool m_drawPanScrollIcon; |
| 327 bool m_useFixedLayout; | 329 bool m_useFixedLayout; |
| 330 bool m_fixedLayoutSizeLock; |
| 328 | 331 |
| 329 bool m_paintsEntireContents; | 332 bool m_paintsEntireContents; |
| 330 bool m_clipsRepaints; | 333 bool m_clipsRepaints; |
| 331 | 334 |
| 332 void init(); | 335 void init(); |
| 333 void destroy(); | 336 void destroy(); |
| 334 | 337 |
| 335 IntRect rectToCopyOnScroll() const; | 338 IntRect rectToCopyOnScroll() const; |
| 336 | 339 |
| 337 // Called when the scroll position within this view changes. FrameView over
rides this to generate repaint invalidations. | 340 // Called when the scroll position within this view changes. FrameView over
rides this to generate repaint invalidations. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 355 ASSERT(!widget || widget->isScrollView()); | 358 ASSERT(!widget || widget->isScrollView()); |
| 356 return static_cast<const ScrollView*>(widget); | 359 return static_cast<const ScrollView*>(widget); |
| 357 } | 360 } |
| 358 | 361 |
| 359 // This will catch anyone doing an unnecessary cast. | 362 // This will catch anyone doing an unnecessary cast. |
| 360 void toScrollView(const ScrollView*); | 363 void toScrollView(const ScrollView*); |
| 361 | 364 |
| 362 } // namespace WebCore | 365 } // namespace WebCore |
| 363 | 366 |
| 364 #endif // ScrollView_h | 367 #endif // ScrollView_h |
| OLD | NEW |