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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 scrollPosition().y(), | 395 scrollPosition().y(), |
396 std::max(0, visibleWidth() + verticalScrollbarWidth), | 396 std::max(0, visibleWidth() + verticalScrollbarWidth), |
397 std::max(0, visibleHeight() + horizontalScrollbarHeight)); | 397 std::max(0, visibleHeight() + horizontalScrollbarHeight)); |
398 } | 398 } |
399 | 399 |
400 IntPoint ScrollableArea::clampScrollPosition(const IntPoint& scrollPosition) con
st | 400 IntPoint ScrollableArea::clampScrollPosition(const IntPoint& scrollPosition) con
st |
401 { | 401 { |
402 return scrollPosition.shrunkTo(maximumScrollPosition()).expandedTo(minimumSc
rollPosition()); | 402 return scrollPosition.shrunkTo(maximumScrollPosition()).expandedTo(minimumSc
rollPosition()); |
403 } | 403 } |
404 | 404 |
| 405 TextDirection ScrollableArea::textDirection() const |
| 406 { |
| 407 return !m_scrollOrigin.x() ? LTR : RTL; |
| 408 } |
| 409 |
405 int ScrollableArea::lineStep(ScrollbarOrientation) const | 410 int ScrollableArea::lineStep(ScrollbarOrientation) const |
406 { | 411 { |
407 return pixelsPerLineStep(); | 412 return pixelsPerLineStep(); |
408 } | 413 } |
409 | 414 |
410 int ScrollableArea::documentStep(ScrollbarOrientation orientation) const | 415 int ScrollableArea::documentStep(ScrollbarOrientation orientation) const |
411 { | 416 { |
412 return scrollSize(orientation); | 417 return scrollSize(orientation); |
413 } | 418 } |
414 | 419 |
415 float ScrollableArea::pixelStep(ScrollbarOrientation) const | 420 float ScrollableArea::pixelStep(ScrollbarOrientation) const |
416 { | 421 { |
417 return 1; | 422 return 1; |
418 } | 423 } |
419 | 424 |
420 } // namespace WebCore | 425 } // namespace WebCore |
OLD | NEW |