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

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

Issue 14659008: Include scrollbar size in @media width/height (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: layoutSize(VisibleContentRectIncludesScrollbars) 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/platform/ScrollView.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 max(0, height() - horizontalScrollbarHeight)); 210 max(0, height() - horizontalScrollbarHeight));
211 } 211 }
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(VisibleContentRectIncludesScrollbars scrollbarInc lusion) const
221 { 221 {
222 return m_fixedLayoutSize.isEmpty() || !m_useFixedLayout ? unscaledVisibleCon tentSize(ExcludeScrollbars) : m_fixedLayoutSize; 222 return m_fixedLayoutSize.isEmpty() || !m_useFixedLayout ? unscaledVisibleCon tentSize(scrollbarInclusion) : m_fixedLayoutSize;
223 } 223 }
224 224
225 IntSize ScrollView::fixedLayoutSize() const 225 IntSize ScrollView::fixedLayoutSize() const
226 { 226 {
227 return m_fixedLayoutSize; 227 return m_fixedLayoutSize;
228 } 228 }
229 229
230 void ScrollView::setFixedLayoutSize(const IntSize& newSize) 230 void ScrollView::setFixedLayoutSize(const IntSize& newSize)
231 { 231 {
232 if (fixedLayoutSize() == newSize) 232 if (fixedLayoutSize() == newSize)
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 { 1271 {
1272 } 1272 }
1273 1273
1274 bool ScrollView::platformIsOffscreen() const 1274 bool ScrollView::platformIsOffscreen() const
1275 { 1275 {
1276 return false; 1276 return false;
1277 } 1277 }
1278 1278
1279 1279
1280 } 1280 }
OLDNEW
« no previous file with comments | « Source/core/platform/ScrollView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698