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

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: patch for review Created 7 years, 6 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 207
208 IntRect ScrollView::visibleContentRect(VisibleContentRectIncludesScrollbars scol lbarInclusion) const 208 IntRect ScrollView::visibleContentRect(VisibleContentRectIncludesScrollbars scol lbarInclusion) const
209 { 209 {
210 FloatSize visibleContentSize = unscaledVisibleContentSize(scollbarInclusion) ; 210 FloatSize visibleContentSize = unscaledVisibleContentSize(scollbarInclusion) ;
211 visibleContentSize.scale(1 / visibleContentScaleFactor()); 211 visibleContentSize.scale(1 / visibleContentScaleFactor());
212 return IntRect(IntPoint(m_scrollOffset), expandedIntSize(visibleContentSize) ); 212 return IntRect(IntPoint(m_scrollOffset), expandedIntSize(visibleContentSize) );
213 } 213 }
214 214
215 IntSize ScrollView::layoutSize(VisibleContentRectIncludesScrollbars scrollbarInc lusion) const 215 IntSize ScrollView::layoutSize(VisibleContentRectIncludesScrollbars scrollbarInc lusion) const
216 { 216 {
217 return m_fixedLayoutSize.isEmpty() || !m_useFixedLayout ? unscaledVisibleCon tentSize(scrollbarInclusion) : m_fixedLayoutSize; 217 if (m_useFixedLayout) {
218 ASSERT(!m_fixedLayoutSize.isEmpty());
aelias_OOO_until_Jul13 2013/05/29 18:47:28 This subtly changes the behavior in a way that mig
219 return m_fixedLayoutSize;
220 }
221 return unscaledVisibleContentSize(scrollbarInclusion);
218 } 222 }
219 223
220 IntSize ScrollView::fixedLayoutSize() const 224 IntSize ScrollView::fixedLayoutSize() const
221 { 225 {
222 return m_fixedLayoutSize; 226 return m_fixedLayoutSize;
223 } 227 }
224 228
225 void ScrollView::setFixedLayoutSize(const IntSize& newSize) 229 void ScrollView::setFixedLayoutSize(const IntSize& newSize)
226 { 230 {
227 if (fixedLayoutSize() == newSize) 231 if (fixedLayoutSize() == newSize)
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 { 1259 {
1256 } 1260 }
1257 1261
1258 bool ScrollView::platformIsOffscreen() const 1262 bool ScrollView::platformIsOffscreen() const
1259 { 1263 {
1260 return false; 1264 return false;
1261 } 1265 }
1262 1266
1263 1267
1264 } 1268 }
OLDNEW
« Source/core/page/FrameView.cpp ('K') | « Source/core/page/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698