OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 | 424 |
425 void RenderLayerScrollableArea::computeScrollDimensions() | 425 void RenderLayerScrollableArea::computeScrollDimensions() |
426 { | 426 { |
427 RenderBox* box = toRenderBox(renderer()); | 427 RenderBox* box = toRenderBox(renderer()); |
428 | 428 |
429 m_scrollDimensionsDirty = false; | 429 m_scrollDimensionsDirty = false; |
430 | 430 |
431 m_overflowRect = box->layoutOverflowRect(); | 431 m_overflowRect = box->layoutOverflowRect(); |
432 box->flipForWritingMode(m_overflowRect); | 432 box->flipForWritingMode(m_overflowRect); |
433 | 433 |
434 int scrollableLeftOverflow = m_overflowRect.x() - box->borderLeft(); | 434 int scrollableLeftOverflow = m_overflowRect.x() - box->borderLeft() - (box->
style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft() ? box->verticalScroll
barWidth() : 0); |
435 int scrollableTopOverflow = m_overflowRect.y() - box->borderTop(); | 435 int scrollableTopOverflow = m_overflowRect.y() - box->borderTop(); |
436 setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow)); | 436 setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow)); |
437 } | 437 } |
438 | 438 |
439 void RenderLayerScrollableArea::scrollToOffset(const IntSize& scrollOffset, Scro
llOffsetClamping clamp) | 439 void RenderLayerScrollableArea::scrollToOffset(const IntSize& scrollOffset, Scro
llOffsetClamping clamp) |
440 { | 440 { |
441 IntSize newScrollOffset = clamp == ScrollOffsetClamped ? clampScrollOffset(s
crollOffset) : scrollOffset; | 441 IntSize newScrollOffset = clamp == ScrollOffsetClamped ? clampScrollOffset(s
crollOffset) : scrollOffset; |
442 if (newScrollOffset != adjustedScrollOffset()) | 442 if (newScrollOffset != adjustedScrollOffset()) |
443 scrollToOffsetWithoutAnimation(-scrollOrigin() + newScrollOffset); | 443 scrollToOffsetWithoutAnimation(-scrollOrigin() + newScrollOffset); |
444 } | 444 } |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 return true; | 918 return true; |
919 } | 919 } |
920 } | 920 } |
921 | 921 |
922 // FIXME: We should hit test the m_scrollCorner and pass it back through the
result. | 922 // FIXME: We should hit test the m_scrollCorner and pass it back through the
result. |
923 | 923 |
924 return false; | 924 return false; |
925 } | 925 } |
926 | 926 |
927 } // Namespace WebCore | 927 } // Namespace WebCore |
OLD | NEW |