OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 212 |
213 IntRect ScrollView::visibleContentRect(VisibleContentRectIncludesScrollbars scol
lbarInclusion) const | 213 IntRect ScrollView::visibleContentRect(VisibleContentRectIncludesScrollbars scol
lbarInclusion) const |
214 { | 214 { |
215 FloatSize visibleContentSize = unscaledVisibleContentSize(scollbarInclusion)
; | 215 FloatSize visibleContentSize = unscaledVisibleContentSize(scollbarInclusion)
; |
216 visibleContentSize.scale(1 / visibleContentScaleFactor()); | 216 visibleContentSize.scale(1 / visibleContentScaleFactor()); |
217 return IntRect(IntPoint(m_scrollOffset), expandedIntSize(visibleContentSize)
); | 217 return IntRect(IntPoint(m_scrollOffset), expandedIntSize(visibleContentSize)
); |
218 } | 218 } |
219 | 219 |
220 IntSize ScrollView::layoutSize() const | 220 IntSize ScrollView::layoutSize() const |
221 { | 221 { |
222 return m_fixedLayoutSize.isEmpty() || !m_useFixedLayout ? unscaledVisibleCon
tentSize(ExcludeScrollbars) : m_fixedLayoutSize; | 222 if (m_useFixedLayout) { |
| 223 ASSERT(!m_fixedLayoutSize.isEmpty()); |
| 224 return m_fixedLayoutSize; |
| 225 } |
| 226 return unscaledVisibleContentSize(ExcludeScrollbars); |
| 227 } |
| 228 |
| 229 IntSize ScrollView::layoutSizeIncludingScrollbars() const |
| 230 { |
| 231 if (m_useFixedLayout) { |
| 232 ASSERT(!m_fixedLayoutSize.isEmpty()); |
| 233 return m_fixedLayoutSize; |
| 234 } |
| 235 return unscaledVisibleContentSize(IncludeScrollbars); |
223 } | 236 } |
224 | 237 |
225 IntSize ScrollView::fixedLayoutSize() const | 238 IntSize ScrollView::fixedLayoutSize() const |
226 { | 239 { |
227 return m_fixedLayoutSize; | 240 return m_fixedLayoutSize; |
228 } | 241 } |
229 | 242 |
230 void ScrollView::setFixedLayoutSize(const IntSize& newSize) | 243 void ScrollView::setFixedLayoutSize(const IntSize& newSize) |
231 { | 244 { |
232 if (fixedLayoutSize() == newSize) | 245 if (fixedLayoutSize() == newSize) |
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 { | 1284 { |
1272 } | 1285 } |
1273 | 1286 |
1274 bool ScrollView::platformIsOffscreen() const | 1287 bool ScrollView::platformIsOffscreen() const |
1275 { | 1288 { |
1276 return false; | 1289 return false; |
1277 } | 1290 } |
1278 | 1291 |
1279 | 1292 |
1280 } | 1293 } |
OLD | NEW |