| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2006 Apple Computer, 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 kScrollDown, | 69 kScrollDown, |
| 70 kScrollLeft, | 70 kScrollLeft, |
| 71 kScrollRight | 71 kScrollRight |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 enum ScrollType { | 74 enum ScrollType { |
| 75 kUserScroll, | 75 kUserScroll, |
| 76 kProgrammaticScroll, | 76 kProgrammaticScroll, |
| 77 kClampingScroll, | 77 kClampingScroll, |
| 78 kCompositorScroll, | 78 kCompositorScroll, |
| 79 kAnchoringScroll | 79 kAnchoringScroll, |
| 80 kSequencedSmoothScroll |
| 80 }; | 81 }; |
| 81 | 82 |
| 82 // An explicit scroll is one that was requested by the user or the webpage. | 83 // An explicit scroll is one that was requested by the user or the webpage. |
| 83 // An implicit scroll is a side effect of a layout change. | 84 // An implicit scroll is a side effect of a layout change. |
| 84 inline bool IsExplicitScrollType(ScrollType scroll_type) { | 85 inline bool IsExplicitScrollType(ScrollType scroll_type) { |
| 85 return scroll_type == kUserScroll || scroll_type == kProgrammaticScroll || | 86 return scroll_type == kUserScroll || scroll_type == kProgrammaticScroll || |
| 86 scroll_type == kCompositorScroll; | 87 scroll_type == kCompositorScroll || |
| 88 scroll_type == kSequencedSmoothScroll; |
| 87 } | 89 } |
| 88 | 90 |
| 89 // Convert logical scroll direction to physical. Physical scroll directions are | 91 // Convert logical scroll direction to physical. Physical scroll directions are |
| 90 // unaffected. | 92 // unaffected. |
| 91 inline ScrollDirectionPhysical ToPhysicalDirection(ScrollDirection direction, | 93 inline ScrollDirectionPhysical ToPhysicalDirection(ScrollDirection direction, |
| 92 bool is_vertical, | 94 bool is_vertical, |
| 93 bool is_flipped) { | 95 bool is_flipped) { |
| 94 switch (direction) { | 96 switch (direction) { |
| 95 case kScrollBlockDirectionBackward: { | 97 case kScrollBlockDirectionBackward: { |
| 96 if (is_vertical) { | 98 if (is_vertical) { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 }; | 176 }; |
| 175 | 177 |
| 176 enum ScrollInertialPhase { | 178 enum ScrollInertialPhase { |
| 177 kScrollInertialPhaseUnknown, | 179 kScrollInertialPhaseUnknown, |
| 178 kScrollInertialPhaseNonMomentum, | 180 kScrollInertialPhaseNonMomentum, |
| 179 kScrollInertialPhaseMomentum | 181 kScrollInertialPhaseMomentum |
| 180 }; | 182 }; |
| 181 | 183 |
| 182 enum ScrollbarOrientation { kHorizontalScrollbar, kVerticalScrollbar }; | 184 enum ScrollbarOrientation { kHorizontalScrollbar, kVerticalScrollbar }; |
| 183 | 185 |
| 186 enum ScrollOrientation { kHorizontalScroll, kVerticalScroll }; |
| 187 |
| 184 enum ScrollbarMode { kScrollbarAuto, kScrollbarAlwaysOff, kScrollbarAlwaysOn }; | 188 enum ScrollbarMode { kScrollbarAuto, kScrollbarAlwaysOff, kScrollbarAlwaysOn }; |
| 185 | 189 |
| 186 enum ScrollbarControlSize { kRegularScrollbar, kSmallScrollbar }; | 190 enum ScrollbarControlSize { kRegularScrollbar, kSmallScrollbar }; |
| 187 | 191 |
| 188 typedef unsigned ScrollbarControlState; | 192 typedef unsigned ScrollbarControlState; |
| 189 | 193 |
| 190 enum ScrollbarControlStateMask { | 194 enum ScrollbarControlStateMask { |
| 191 kActiveScrollbarState = 1, | 195 kActiveScrollbarState = 1, |
| 192 kEnabledScrollbarState = 1 << 1, | 196 kEnabledScrollbarState = 1 << 1, |
| 193 kPressedScrollbarState = 1 << 2 | 197 kPressedScrollbarState = 1 << 2 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 NOTREACHED(); | 278 NOTREACHED(); |
| 275 return ScrollGranularity::kScrollByPrecisePixel; | 279 return ScrollGranularity::kScrollByPrecisePixel; |
| 276 } | 280 } |
| 277 } | 281 } |
| 278 | 282 |
| 279 typedef unsigned ScrollbarControlPartMask; | 283 typedef unsigned ScrollbarControlPartMask; |
| 280 | 284 |
| 281 } // namespace blink | 285 } // namespace blink |
| 282 | 286 |
| 283 #endif | 287 #endif |
| OLD | NEW |