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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollableArea.h

Issue 1672973002: ScrollableArea::pixelsPerLine should return viewport pixels in use-zoom-for-dsf mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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) 2008, 2011 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2011 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // problematic non-Oilpan as the type expands to DummyBase, exporting it 66 // problematic non-Oilpan as the type expands to DummyBase, exporting it
67 // also from 'platform' as a result. Bringing about duplicate DummyBases 67 // also from 'platform' as a result. Bringing about duplicate DummyBases
68 // as core also exports same; with component build linking fails as a 68 // as core also exports same; with component build linking fails as a
69 // result. Hence the workaround of not using a transition type. 69 // result. Hence the workaround of not using a transition type.
70 class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin { 70 class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin {
71 #else 71 #else
72 class PLATFORM_EXPORT ScrollableArea { 72 class PLATFORM_EXPORT ScrollableArea {
73 #endif 73 #endif
74 WTF_MAKE_NONCOPYABLE(ScrollableArea); 74 WTF_MAKE_NONCOPYABLE(ScrollableArea);
75 public: 75 public:
76 static int pixelsPerLineStep(); 76 static int pixelsPerLineStep(HostWindow*);
77 static float minFractionToStepWhenPaging(); 77 static float minFractionToStepWhenPaging();
78 static int maxOverlapBetweenPages(); 78 static int maxOverlapBetweenPages();
79 79
80 // Convert a non-finite scroll value (Infinity, -Infinity, NaN) to 0 as 80 // Convert a non-finite scroll value (Infinity, -Infinity, NaN) to 0 as
81 // per http://dev.w3.org/csswg/cssom-view/#normalize-non_finite-values. 81 // per http://dev.w3.org/csswg/cssom-view/#normalize-non_finite-values.
82 static double normalizeNonFiniteScroll(double value) { return std::isfinite( value) ? value : 0.0; } 82 static double normalizeNonFiniteScroll(double value) { return std::isfinite( value) ? value : 0.0; }
83 83
84 // The window that hosts the ScrollableArea. The ScrollableArea will communi cate scrolls and repaints to the 84 // The window that hosts the ScrollableArea. The ScrollableArea will communi cate scrolls and repaints to the
85 // host window in the window's coordinate space. 85 // host window in the window's coordinate space.
86 virtual HostWindow* hostWindow() const { return 0; } 86 virtual HostWindow* hostWindow() const { return 0; }
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 // vertical-lr / ltr NO NO 358 // vertical-lr / ltr NO NO
359 // vertical-lr / rtl NO YES 359 // vertical-lr / rtl NO YES
360 // vertical-rl / ltr YES NO 360 // vertical-rl / ltr YES NO
361 // vertical-rl / rtl YES YES 361 // vertical-rl / rtl YES YES
362 IntPoint m_scrollOrigin; 362 IntPoint m_scrollOrigin;
363 }; 363 };
364 364
365 } // namespace blink 365 } // namespace blink
366 366
367 #endif // ScrollableArea_h 367 #endif // ScrollableArea_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698