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 scroll(ScrollDirection, ScrollGranularity, float delta = 1); | 75 virtual bool scroll(ScrollDirectionPhysical, ScrollGranularity, float delta
= 1); |
76 virtual void setScrollPosition(const DoublePoint&, ScrollBehavior = ScrollBe
haviorInstant); | 76 virtual void setScrollPosition(const DoublePoint&, ScrollBehavior = ScrollBe
haviorInstant); |
77 void scrollToOffsetWithoutAnimation(const FloatPoint&, bool cancelProgrammat
icAnimations = true); | 77 void scrollToOffsetWithoutAnimation(const FloatPoint&, bool cancelProgrammat
icAnimations = true); |
78 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset); | 78 void scrollToOffsetWithoutAnimation(ScrollbarOrientation, float offset); |
79 | 79 |
80 // Scrolls the area so that the given rect, given in the document's content
coordinates, such that it's | 80 // Scrolls the area so that the given rect, given in the document's content
coordinates, such that it's |
81 // visible in the area. Returns the new location of the input rect relative
once again to the document. | 81 // visible in the area. Returns the new location of the input rect relative
once again to the document. |
82 // Note, in the case of a Document container, such as FrameView, the output
will always be the input rect | 82 // Note, in the case of a Document container, such as FrameView, the output
will always be the input rect |
83 // since scrolling it can't change the location of content relative to the d
ocument, unlike an overflowing | 83 // since scrolling it can't change the location of content relative to the d
ocument, unlike an overflowing |
84 // element. | 84 // element. |
85 virtual LayoutRect scrollIntoView(const LayoutRect& rectInContent, const Scr
ollAlignment& alignX, const ScrollAlignment& alignY); | 85 virtual LayoutRect scrollIntoView(const LayoutRect& rectInContent, const Scr
ollAlignment& alignX, const ScrollAlignment& alignY); |
(...skipping 272 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 |