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

Side by Side Diff: Source/core/rendering/RenderLayerScrollableArea.cpp

Issue 23819019: Refactor fixed layout mode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: git rebase Created 7 years, 2 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 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 } 320 }
321 321
322 IntPoint RenderLayerScrollableArea::maximumScrollPosition() const 322 IntPoint RenderLayerScrollableArea::maximumScrollPosition() const
323 { 323 {
324 if (!m_box->hasOverflowClip()) 324 if (!m_box->hasOverflowClip())
325 return -scrollOrigin(); 325 return -scrollOrigin();
326 326
327 return -scrollOrigin() + enclosingIntRect(m_overflowRect).size() - enclosing IntRect(m_box->clientBoxRect()).size(); 327 return -scrollOrigin() + enclosingIntRect(m_overflowRect).size() - enclosing IntRect(m_box->clientBoxRect()).size();
328 } 328 }
329 329
330 IntRect RenderLayerScrollableArea::visibleContentRect(VisibleContentRectIncludes Scrollbars scrollbarInclusion) const 330 IntRect RenderLayerScrollableArea::visibleContentRect(IncludeScrollbarsInRect sc rollbarInclusion) const
331 { 331 {
332 int verticalScrollbarWidth = 0; 332 int verticalScrollbarWidth = 0;
333 int horizontalScrollbarHeight = 0; 333 int horizontalScrollbarHeight = 0;
334 if (scrollbarInclusion == IncludeScrollbars) { 334 if (scrollbarInclusion == IncludeScrollbars) {
335 verticalScrollbarWidth = (verticalScrollbar() && !verticalScrollbar()->i sOverlayScrollbar()) ? verticalScrollbar()->width() : 0; 335 verticalScrollbarWidth = (verticalScrollbar() && !verticalScrollbar()->i sOverlayScrollbar()) ? verticalScrollbar()->width() : 0;
336 horizontalScrollbarHeight = (horizontalScrollbar() && !horizontalScrollb ar()->isOverlayScrollbar()) ? horizontalScrollbar()->height() : 0; 336 horizontalScrollbarHeight = (horizontalScrollbar() && !horizontalScrollb ar()->isOverlayScrollbar()) ? horizontalScrollbar()->height() : 0;
337 } 337 }
338 338
339 return IntRect(IntPoint(scrollXOffset(), scrollYOffset()), 339 return IntRect(IntPoint(scrollXOffset(), scrollYOffset()),
340 IntSize(max(0, layer()->size().width() - verticalScrollbarWidth), max(0, layer()->size().height() - horizontalScrollbarHeight))); 340 IntSize(max(0, layer()->size().width() - verticalScrollbarWidth), max(0, layer()->size().height() - horizontalScrollbarHeight)));
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 return true; 889 return true;
890 } 890 }
891 } 891 }
892 892
893 // FIXME: We should hit test the m_scrollCorner and pass it back through the result. 893 // FIXME: We should hit test the m_scrollCorner and pass it back through the result.
894 894
895 return false; 895 return false;
896 } 896 }
897 897
898 } // Namespace WebCore 898 } // Namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698