| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 }; | 80 }; |
| 81 | 81 |
| 82 inline bool ScrollTypeClearsFragmentAnchor(ScrollType scroll_type) { | 82 // 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 inline bool IsExplicitScrollType(ScrollType scroll_type) { |
| 83 return scroll_type == kUserScroll || scroll_type == kProgrammaticScroll || | 85 return scroll_type == kUserScroll || scroll_type == kProgrammaticScroll || |
| 84 scroll_type == kCompositorScroll; | 86 scroll_type == kCompositorScroll; |
| 85 } | 87 } |
| 86 | 88 |
| 87 // Convert logical scroll direction to physical. Physical scroll directions are | 89 // Convert logical scroll direction to physical. Physical scroll directions are |
| 88 // unaffected. | 90 // unaffected. |
| 89 inline ScrollDirectionPhysical ToPhysicalDirection(ScrollDirection direction, | 91 inline ScrollDirectionPhysical ToPhysicalDirection(ScrollDirection direction, |
| 90 bool is_vertical, | 92 bool is_vertical, |
| 91 bool is_flipped) { | 93 bool is_flipped) { |
| 92 switch (direction) { | 94 switch (direction) { |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 NOTREACHED(); | 274 NOTREACHED(); |
| 273 return ScrollGranularity::kScrollByPrecisePixel; | 275 return ScrollGranularity::kScrollByPrecisePixel; |
| 274 } | 276 } |
| 275 } | 277 } |
| 276 | 278 |
| 277 typedef unsigned ScrollbarControlPartMask; | 279 typedef unsigned ScrollbarControlPartMask; |
| 278 | 280 |
| 279 } // namespace blink | 281 } // namespace blink |
| 280 | 282 |
| 281 #endif | 283 #endif |
| OLD | NEW |