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

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

Issue 25373006: Correction to layoutOverflowRect in case of direction:rtl (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 | « Source/core/rendering/RenderBox.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 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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 return snapSizeToPixel(m_overflowRect.height(), m_box->clientTop() + m_box-> y()); 507 return snapSizeToPixel(m_overflowRect.height(), m_box->clientTop() + m_box-> y());
508 } 508 }
509 509
510 void RenderLayerScrollableArea::computeScrollDimensions() 510 void RenderLayerScrollableArea::computeScrollDimensions()
511 { 511 {
512 m_scrollDimensionsDirty = false; 512 m_scrollDimensionsDirty = false;
513 513
514 m_overflowRect = m_box->layoutOverflowRect(); 514 m_overflowRect = m_box->layoutOverflowRect();
515 m_box->flipForWritingMode(m_overflowRect); 515 m_box->flipForWritingMode(m_overflowRect);
516 516
517 int scrollableLeftOverflow = m_overflowRect.x() - m_box->borderLeft(); 517 int scrollableLeftOverflow = m_overflowRect.x() - m_box->borderLeft() - (m_b ox->style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft() ? m_box->vertical ScrollbarWidth() : 0);
518 int scrollableTopOverflow = m_overflowRect.y() - m_box->borderTop(); 518 int scrollableTopOverflow = m_overflowRect.y() - m_box->borderTop();
519 setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow)); 519 setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow));
520 } 520 }
521 521
522 void RenderLayerScrollableArea::scrollToOffset(const IntSize& scrollOffset, Scro llOffsetClamping clamp) 522 void RenderLayerScrollableArea::scrollToOffset(const IntSize& scrollOffset, Scro llOffsetClamping clamp)
523 { 523 {
524 IntSize newScrollOffset = clamp == ScrollOffsetClamped ? clampScrollOffset(s crollOffset) : scrollOffset; 524 IntSize newScrollOffset = clamp == ScrollOffsetClamped ? clampScrollOffset(s crollOffset) : scrollOffset;
525 if (newScrollOffset != adjustedScrollOffset()) 525 if (newScrollOffset != adjustedScrollOffset())
526 scrollToOffsetWithoutAnimation(-scrollOrigin() + newScrollOffset); 526 scrollToOffsetWithoutAnimation(-scrollOrigin() + newScrollOffset);
527 } 527 }
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo sitedScrollingMode mode) 1469 void RenderLayerScrollableArea::setForceNeedsCompositedScrolling(ForceNeedsCompo sitedScrollingMode mode)
1470 { 1470 {
1471 if (m_forceNeedsCompositedScrolling == mode) 1471 if (m_forceNeedsCompositedScrolling == mode)
1472 return; 1472 return;
1473 1473
1474 m_forceNeedsCompositedScrolling = mode; 1474 m_forceNeedsCompositedScrolling = mode;
1475 layer()->didUpdateNeedsCompositedScrolling(); 1475 layer()->didUpdateNeedsCompositedScrolling();
1476 } 1476 }
1477 1477
1478 } // Namespace WebCore 1478 } // Namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698