| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 ScrollBlockDirectionForward, | 52 ScrollBlockDirectionForward, |
| 53 ScrollInlineDirectionBackward, | 53 ScrollInlineDirectionBackward, |
| 54 ScrollInlineDirectionForward | 54 ScrollInlineDirectionForward |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 enum ScrollDirectionPhysical { ScrollUp, ScrollDown, ScrollLeft, ScrollRight }; | 57 enum ScrollDirectionPhysical { ScrollUp, ScrollDown, ScrollLeft, ScrollRight }; |
| 58 | 58 |
| 59 enum ScrollType { | 59 enum ScrollType { |
| 60 UserScroll, | 60 UserScroll, |
| 61 ProgrammaticScroll, | 61 ProgrammaticScroll, |
| 62 ClampingScroll, |
| 62 CompositorScroll, | 63 CompositorScroll, |
| 63 AnchoringScroll | 64 AnchoringScroll |
| 64 }; | 65 }; |
| 65 | 66 |
| 66 // Convert logical scroll direction to physical. Physical scroll directions are | 67 // Convert logical scroll direction to physical. Physical scroll directions are |
| 67 // unaffected. | 68 // unaffected. |
| 68 inline ScrollDirectionPhysical toPhysicalDirection(ScrollDirection direction, | 69 inline ScrollDirectionPhysical toPhysicalDirection(ScrollDirection direction, |
| 69 bool isVertical, | 70 bool isVertical, |
| 70 bool isFlipped) { | 71 bool isFlipped) { |
| 71 switch (direction) { | 72 switch (direction) { |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 238 |
| 238 return (dir == ScrollLeft || dir == ScrollRight) ? ScrollOffset(delta, 0) | 239 return (dir == ScrollLeft || dir == ScrollRight) ? ScrollOffset(delta, 0) |
| 239 : ScrollOffset(0, delta); | 240 : ScrollOffset(0, delta); |
| 240 } | 241 } |
| 241 | 242 |
| 242 typedef unsigned ScrollbarControlPartMask; | 243 typedef unsigned ScrollbarControlPartMask; |
| 243 | 244 |
| 244 } // namespace blink | 245 } // namespace blink |
| 245 | 246 |
| 246 #endif | 247 #endif |
| OLD | NEW |