OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
6 * | 6 * |
7 * Other contributors: | 7 * Other contributors: |
8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
10 * Christian Biesinger <cbiesinger@gmail.com> | 10 * Christian Biesinger <cbiesinger@gmail.com> |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 | 510 |
511 FrameHost* host = layoutBox()->document().frameHost(); | 511 FrameHost* host = layoutBox()->document().frameHost(); |
512 DCHECK(host); | 512 DCHECK(host); |
513 TopDocumentRootScrollerController& controller = | 513 TopDocumentRootScrollerController& controller = |
514 host->globalRootScrollerController(); | 514 host->globalRootScrollerController(); |
515 | 515 |
516 // The global root scroller should be clipped by the top FrameView rather | 516 // The global root scroller should be clipped by the top FrameView rather |
517 // than it's overflow clipping box. This is to ensure that content exposed by | 517 // than it's overflow clipping box. This is to ensure that content exposed by |
518 // hiding the URL bar at the bottom of the screen is visible. | 518 // hiding the URL bar at the bottom of the screen is visible. |
519 if (this == controller.rootScrollerArea()) | 519 if (this == controller.rootScrollerArea()) |
520 visibleSize = controller.rootScrollerVisibleArea(); | 520 visibleSize = controller.visibleContentRect(ExcludeScrollbars).size(); |
521 | 521 |
522 // TODO(skobes): We should really ASSERT that contentSize >= visibleSize | 522 // TODO(skobes): We should really ASSERT that contentSize >= visibleSize |
523 // when we are not the root layer, but we can't because contentSize is | 523 // when we are not the root layer, but we can't because contentSize is |
524 // based on stale layout overflow data (http://crbug.com/576933). | 524 // based on stale layout overflow data (http://crbug.com/576933). |
525 contentSize = contentSize.expandedTo(visibleSize); | 525 contentSize = contentSize.expandedTo(visibleSize); |
526 | 526 |
527 return toIntSize(-scrollOrigin() + (contentSize - visibleSize)); | 527 return toIntSize(-scrollOrigin() + (contentSize - visibleSize)); |
528 } | 528 } |
529 | 529 |
530 IntRect PaintLayerScrollableArea::visibleContentRect( | 530 IntRect PaintLayerScrollableArea::visibleContentRect( |
(...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2105 | 2105 |
2106 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: | 2106 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
2107 clampScrollableAreas() { | 2107 clampScrollableAreas() { |
2108 for (auto& scrollableArea : *s_needsClamp) | 2108 for (auto& scrollableArea : *s_needsClamp) |
2109 scrollableArea->clampScrollOffsetAfterOverflowChange(); | 2109 scrollableArea->clampScrollOffsetAfterOverflowChange(); |
2110 delete s_needsClamp; | 2110 delete s_needsClamp; |
2111 s_needsClamp = nullptr; | 2111 s_needsClamp = nullptr; |
2112 } | 2112 } |
2113 | 2113 |
2114 } // namespace blink | 2114 } // namespace blink |
OLD | NEW |