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

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

Issue 2416453006: Use the pixelSnappedScrollWidth/Height for contentsSize (Closed)
Patch Set: Spv2 expectations Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 513
514 int PaintLayerScrollableArea::visibleHeight() const { 514 int PaintLayerScrollableArea::visibleHeight() const {
515 return layer()->size().height(); 515 return layer()->size().height();
516 } 516 }
517 517
518 int PaintLayerScrollableArea::visibleWidth() const { 518 int PaintLayerScrollableArea::visibleWidth() const {
519 return layer()->size().width(); 519 return layer()->size().width();
520 } 520 }
521 521
522 IntSize PaintLayerScrollableArea::contentsSize() const { 522 IntSize PaintLayerScrollableArea::contentsSize() const {
523 return IntSize(scrollWidth().toInt(), scrollHeight().toInt()); 523 return IntSize(pixelSnappedScrollWidth(), pixelSnappedScrollHeight());
524 } 524 }
525 525
526 IntPoint PaintLayerScrollableArea::lastKnownMousePosition() const { 526 IntPoint PaintLayerScrollableArea::lastKnownMousePosition() const {
527 return box().frame() ? box().frame()->eventHandler().lastKnownMousePosition() 527 return box().frame() ? box().frame()->eventHandler().lastKnownMousePosition()
528 : IntPoint(); 528 : IntPoint();
529 } 529 }
530 530
531 bool PaintLayerScrollableArea::scrollAnimatorEnabled() const { 531 bool PaintLayerScrollableArea::scrollAnimatorEnabled() const {
532 if (Settings* settings = box().frame()->settings()) 532 if (Settings* settings = box().frame()->settings())
533 return settings->scrollAnimatorEnabled(); 533 return settings->scrollAnimatorEnabled();
(...skipping 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1978 1978
1979 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: 1979 void PaintLayerScrollableArea::DelayScrollOffsetClampScope::
1980 clampScrollableAreas() { 1980 clampScrollableAreas() {
1981 for (auto& scrollableArea : *s_needsClamp) 1981 for (auto& scrollableArea : *s_needsClamp)
1982 scrollableArea->clampScrollOffsetsAfterLayout(); 1982 scrollableArea->clampScrollOffsetsAfterLayout();
1983 delete s_needsClamp; 1983 delete s_needsClamp;
1984 s_needsClamp = nullptr; 1984 s_needsClamp = nullptr;
1985 } 1985 }
1986 1986
1987 } // namespace blink 1987 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698