| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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; } |
| 87 | 87 |
| 88 virtual ScrollResultOneDimensional userScroll(ScrollDirectionPhysical, Scrol
lGranularity, float delta = 1); | 88 virtual ScrollResult userScroll(ScrollGranularity, const FloatSize&); |
| 89 | 89 |
| 90 virtual void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavio
r = ScrollBehaviorInstant); | 90 virtual void setScrollPosition(const DoublePoint&, ScrollType, ScrollBehavio
r = ScrollBehaviorInstant); |
| 91 virtual void scrollBy(const DoubleSize&, ScrollType, ScrollBehavior = Scroll
BehaviorInstant); | 91 virtual void scrollBy(const DoubleSize&, ScrollType, ScrollBehavior = Scroll
BehaviorInstant); |
| 92 void setScrollPositionSingleAxis(ScrollbarOrientation, double, ScrollType, S
crollBehavior = ScrollBehaviorInstant); | 92 void setScrollPositionSingleAxis(ScrollbarOrientation, double, ScrollType, S
crollBehavior = ScrollBehaviorInstant); |
| 93 | 93 |
| 94 // Scrolls the area so that the given rect, given in the document's content
coordinates, such that it's | 94 // Scrolls the area so that the given rect, given in the document's content
coordinates, such that it's |
| 95 // visible in the area. Returns the new location of the input rect relative
once again to the document. | 95 // visible in the area. Returns the new location of the input rect relative
once again to the document. |
| 96 // Note, in the case of a Document container, such as FrameView, the output
will always be the input rect | 96 // Note, in the case of a Document container, such as FrameView, the output
will always be the input rect |
| 97 // since scrolling it can't change the location of content relative to the d
ocument, unlike an overflowing | 97 // since scrolling it can't change the location of content relative to the d
ocument, unlike an overflowing |
| 98 // element. | 98 // element. |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |