OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2003, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 23 matching lines...) Expand all Loading... | |
34 * applicable instead of those above. If you wish to allow use of your | 34 * applicable instead of those above. If you wish to allow use of your |
35 * version of this file only under the terms of one of those two | 35 * version of this file only under the terms of one of those two |
36 * licenses (the MPL or the GPL) and not to allow others to use your | 36 * licenses (the MPL or the GPL) and not to allow others to use your |
37 * version of this file under the LGPL, indicate your decision by | 37 * version of this file under the LGPL, indicate your decision by |
38 * deletingthe provisions above and replace them with the notice and | 38 * deletingthe provisions above and replace them with the notice and |
39 * other provisions required by the MPL or the GPL, as the case may be. | 39 * other provisions required by the MPL or the GPL, as the case may be. |
40 * If you do not delete the provisions above, a recipient may use your | 40 * If you do not delete the provisions above, a recipient may use your |
41 * version of this file under any of the LGPL, the MPL or the GPL. | 41 * version of this file under any of the LGPL, the MPL or the GPL. |
42 */ | 42 */ |
43 | 43 |
44 #ifndef ScrollBehavior_h | 44 #ifndef ScrollAlignment_h |
45 #define ScrollBehavior_h | 45 #define ScrollAlignment_h |
46 | 46 |
47 namespace WebCore { | 47 namespace WebCore { |
48 | 48 |
49 enum ScrollBehavior { | 49 enum ScrollAlignmentBehavior { |
50 noScroll, | 50 ScrollAlignmentNoScroll, |
51 alignCenter, | 51 ScrollAlignmentCenter, |
52 alignTop, | 52 ScrollAlignmentTop, |
53 alignBottom, | 53 ScrollAlignmentBottom, |
54 alignLeft, | 54 ScrollAlignmentLeft, |
55 alignRight, | 55 ScrollAlignmentRight, |
56 alignToClosestEdge | 56 ScrollAlignmentClosestEdge |
ajuma
2014/01/09 16:31:10
These values needed to be renamed since their exis
| |
57 }; | 57 }; |
58 | 58 |
59 class LayoutRect; | 59 class LayoutRect; |
60 | 60 |
61 struct ScrollAlignment { | 61 struct ScrollAlignment { |
62 static ScrollBehavior getVisibleBehavior(const ScrollAlignment& s) { return s.m_rectVisible; } | 62 static ScrollAlignmentBehavior getVisibleBehavior(const ScrollAlignment& s) { return s.m_rectVisible; } |
63 static ScrollBehavior getPartialBehavior(const ScrollAlignment& s) { return s.m_rectPartial; } | 63 static ScrollAlignmentBehavior getPartialBehavior(const ScrollAlignment& s) { return s.m_rectPartial; } |
64 static ScrollBehavior getHiddenBehavior(const ScrollAlignment& s) { return s .m_rectHidden; } | 64 static ScrollAlignmentBehavior getHiddenBehavior(const ScrollAlignment& s) { return s.m_rectHidden; } |
65 | 65 |
66 // FIXME: This function should probably go somewhere else but where? | 66 // FIXME: This function should probably go somewhere else but where? |
67 static LayoutRect getRectToExpose(const LayoutRect& visibleRect, const Layou tRect& exposeRect, const ScrollAlignment& alignX, const ScrollAlignment& alignY) ; | 67 static LayoutRect getRectToExpose(const LayoutRect& visibleRect, const Layou tRect& exposeRect, const ScrollAlignment& alignX, const ScrollAlignment& alignY) ; |
68 | 68 |
69 static const ScrollAlignment alignCenterIfNeeded; | 69 static const ScrollAlignment alignCenterIfNeeded; |
70 static const ScrollAlignment alignToEdgeIfNeeded; | 70 static const ScrollAlignment alignToEdgeIfNeeded; |
71 static const ScrollAlignment alignCenterAlways; | 71 static const ScrollAlignment alignCenterAlways; |
72 static const ScrollAlignment alignTopAlways; | 72 static const ScrollAlignment alignTopAlways; |
73 static const ScrollAlignment alignBottomAlways; | 73 static const ScrollAlignment alignBottomAlways; |
74 | 74 |
75 ScrollBehavior m_rectVisible; | 75 ScrollAlignmentBehavior m_rectVisible; |
76 ScrollBehavior m_rectHidden; | 76 ScrollAlignmentBehavior m_rectHidden; |
77 ScrollBehavior m_rectPartial; | 77 ScrollAlignmentBehavior m_rectPartial; |
78 }; | 78 }; |
79 | 79 |
80 | 80 |
81 }; // namespace WebCore | 81 }; // namespace WebCore |
82 | 82 |
83 #endif // ScrollBehavior_h | 83 #endif // ScrollAlignment_h |
OLD | NEW |