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

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

Issue 2074353002: The element's offset isn't relevant when comparing its dimensions with that of its overflow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@621359
Patch Set: bug 619509 Created 4 years, 5 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@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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698