| 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@gmail.com> | 9 * Christian Biesinger <cbiesinger@gmail.com> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 return m_overflowRect.width(); | 579 return m_overflowRect.width(); |
| 580 } | 580 } |
| 581 | 581 |
| 582 LayoutUnit PaintLayerScrollableArea::scrollHeight() const | 582 LayoutUnit PaintLayerScrollableArea::scrollHeight() const |
| 583 { | 583 { |
| 584 return m_overflowRect.height(); | 584 return m_overflowRect.height(); |
| 585 } | 585 } |
| 586 | 586 |
| 587 int PaintLayerScrollableArea::pixelSnappedScrollWidth() const | 587 int PaintLayerScrollableArea::pixelSnappedScrollWidth() const |
| 588 { | 588 { |
| 589 return snapSizeToPixel(scrollWidth(), box().clientLeft() + box().location().
x()); | 589 return snapSizeToPixel(scrollWidth(), box().clientLeft()); |
| 590 } | 590 } |
| 591 | 591 |
| 592 int PaintLayerScrollableArea::pixelSnappedScrollHeight() const | 592 int PaintLayerScrollableArea::pixelSnappedScrollHeight() const |
| 593 { | 593 { |
| 594 return snapSizeToPixel(scrollHeight(), box().clientTop() + box().location().
y()); | 594 return snapSizeToPixel(scrollHeight(), box().clientTop()); |
| 595 } | 595 } |
| 596 | 596 |
| 597 void PaintLayerScrollableArea::updateScrollOrigin() | 597 void PaintLayerScrollableArea::updateScrollOrigin() |
| 598 { | 598 { |
| 599 // This should do nothing prior to first layout; the if-clause will catch th
at. | 599 // This should do nothing prior to first layout; the if-clause will catch th
at. |
| 600 if (overflowRect().isEmpty()) | 600 if (overflowRect().isEmpty()) |
| 601 return; | 601 return; |
| 602 LayoutPoint scrollableOverflow = m_overflowRect.location() - LayoutSize(box(
).borderLeft(), box().borderTop()); | 602 LayoutPoint scrollableOverflow = m_overflowRect.location() - LayoutSize(box(
).borderLeft(), box().borderTop()); |
| 603 setScrollOrigin(flooredIntPoint(-scrollableOverflow) + box().originAdjustmen
tForScrollbars()); | 603 setScrollOrigin(flooredIntPoint(-scrollableOverflow) + box().originAdjustmen
tForScrollbars()); |
| 604 } | 604 } |
| (...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1753 | 1753 |
| 1754 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre
as() | 1754 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre
as() |
| 1755 { | 1755 { |
| 1756 for (auto& scrollableArea : *s_needsClamp) | 1756 for (auto& scrollableArea : *s_needsClamp) |
| 1757 scrollableArea->clampScrollPositionsAfterLayout(); | 1757 scrollableArea->clampScrollPositionsAfterLayout(); |
| 1758 delete s_needsClamp; | 1758 delete s_needsClamp; |
| 1759 s_needsClamp = nullptr; | 1759 s_needsClamp = nullptr; |
| 1760 } | 1760 } |
| 1761 | 1761 |
| 1762 } // namespace blink | 1762 } // namespace blink |
| OLD | NEW |