OLD | NEW |
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 static int maxOverlapBetweenPages(); | 65 static int maxOverlapBetweenPages(); |
66 | 66 |
67 // Convert a non-finite scroll value (Infinity, -Infinity, NaN) to 0 as | 67 // Convert a non-finite scroll value (Infinity, -Infinity, NaN) to 0 as |
68 // per http://dev.w3.org/csswg/cssom-view/#normalize-non_finite-values. | 68 // per http://dev.w3.org/csswg/cssom-view/#normalize-non_finite-values. |
69 static double normalizeNonFiniteScroll(double value) { return std::isfinite(
value) ? value : 0.0; } | 69 static double normalizeNonFiniteScroll(double value) { return std::isfinite(
value) ? value : 0.0; } |
70 | 70 |
71 // The window that hosts the ScrollableArea. The ScrollableArea will communi
cate scrolls and repaints to the | 71 // The window that hosts the ScrollableArea. The ScrollableArea will communi
cate scrolls and repaints to the |
72 // host window in the window's coordinate space. | 72 // host window in the window's coordinate space. |
73 virtual HostWindow* hostWindow() const { return 0; }; | 73 virtual HostWindow* hostWindow() const { return 0; }; |
74 | 74 |
75 virtual bool userScroll(ScrollDirectionPhysical, ScrollGranularity, float de
lta = 1); | 75 virtual ScrollResultOneDimensional userScroll(ScrollDirectionPhysical, Scrol
lGranularity, float delta = 1); |
76 virtual void setScrollPosition(const DoublePoint&, ScrollBehavior = ScrollBe
haviorInstant); | 76 virtual void setScrollPosition(const DoublePoint&, ScrollBehavior = ScrollBe
haviorInstant); |
77 | 77 |
78 void scrollToOffsetWithoutAnimation(const FloatPoint&, bool cancelProgrammat
icAnimations = true); | 78 void scrollToOffsetWithoutAnimation(const FloatPoint&, bool cancelProgrammat
icAnimations = true); |
79 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset); | 79 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset); |
80 | 80 |
81 // Scrolls the area so that the given rect, given in the document's content
coordinates, such that it's | 81 // Scrolls the area so that the given rect, given in the document's content
coordinates, such that it's |
82 // visible in the area. Returns the new location of the input rect relative
once again to the document. | 82 // visible in the area. Returns the new location of the input rect relative
once again to the document. |
83 // Note, in the case of a Document container, such as FrameView, the output
will always be the input rect | 83 // Note, in the case of a Document container, such as FrameView, the output
will always be the input rect |
84 // since scrolling it can't change the location of content relative to the d
ocument, unlike an overflowing | 84 // since scrolling it can't change the location of content relative to the d
ocument, unlike an overflowing |
85 // element. | 85 // element. |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 // vertical-lr / ltr NO NO | 363 // vertical-lr / ltr NO NO |
364 // vertical-lr / rtl NO YES | 364 // vertical-lr / rtl NO YES |
365 // vertical-rl / ltr YES NO | 365 // vertical-rl / ltr YES NO |
366 // vertical-rl / rtl YES YES | 366 // vertical-rl / rtl YES YES |
367 IntPoint m_scrollOrigin; | 367 IntPoint m_scrollOrigin; |
368 }; | 368 }; |
369 | 369 |
370 } // namespace blink | 370 } // namespace blink |
371 | 371 |
372 #endif // ScrollableArea_h | 372 #endif // ScrollableArea_h |
OLD | NEW |