| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010, Google Inc. All rights reserved. | 2 * Copyright (c) 2010, Google Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. | 3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 m_scrollOrigin = origin; | 115 m_scrollOrigin = origin; |
| 116 m_scrollOriginChanged = true; | 116 m_scrollOriginChanged = true; |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 | 119 |
| 120 GraphicsLayer* ScrollableArea::layerForContainer() const | 120 GraphicsLayer* ScrollableArea::layerForContainer() const |
| 121 { | 121 { |
| 122 return layerForScrolling() ? layerForScrolling()->parent() : 0; | 122 return layerForScrolling() ? layerForScrolling()->parent() : 0; |
| 123 } | 123 } |
| 124 | 124 |
| 125 bool ScrollableArea::scroll(ScrollDirection direction, ScrollGranularity granula
rity, float delta) | 125 bool ScrollableArea::scroll(ScrollDirectionPhysical direction, ScrollGranularity
granularity, float delta) |
| 126 { | 126 { |
| 127 ASSERT(!isLogical(direction)); | |
| 128 | |
| 129 ScrollbarOrientation orientation; | 127 ScrollbarOrientation orientation; |
| 130 if (direction == ScrollUp || direction == ScrollDown) | 128 if (direction == ScrollUp || direction == ScrollDown) |
| 131 orientation = VerticalScrollbar; | 129 orientation = VerticalScrollbar; |
| 132 else | 130 else |
| 133 orientation = HorizontalScrollbar; | 131 orientation = HorizontalScrollbar; |
| 134 | 132 |
| 135 if (!userInputScrollable(orientation)) | 133 if (!userInputScrollable(orientation)) |
| 136 return false; | 134 return false; |
| 137 | 135 |
| 138 cancelProgrammaticScrollAnimation(); | 136 cancelProgrammaticScrollAnimation(); |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 { | 580 { |
| 583 return scrollSize(orientation); | 581 return scrollSize(orientation); |
| 584 } | 582 } |
| 585 | 583 |
| 586 float ScrollableArea::pixelStep(ScrollbarOrientation) const | 584 float ScrollableArea::pixelStep(ScrollbarOrientation) const |
| 587 { | 585 { |
| 588 return 1; | 586 return 1; |
| 589 } | 587 } |
| 590 | 588 |
| 591 } // namespace blink | 589 } // namespace blink |
| OLD | NEW |