Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 2623213002: Expand PaintLayer clip to account for hidden URL bar with document.rootScroller (Closed)
Patch Set: Rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698