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

Side by Side Diff: Source/core/platform/ScrollView.cpp

Issue 14766010: Clarify the size of a document view (a.k.a layout size) that causes FrameView to emit the resize ev… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add new test: fast/events/resize-events-count.html Created 7 years, 7 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
OLDNEW
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
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
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 }
OLDNEW
« Source/core/platform/ScrollView.h ('K') | « Source/core/platform/ScrollView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698