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

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, 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 424
425 void RenderLayerScrollableArea::computeScrollDimensions() 425 void RenderLayerScrollableArea::computeScrollDimensions()
426 { 426 {
427 RenderBox* box = toRenderBox(renderer()); 427 RenderBox* box = toRenderBox(renderer());
428 428
429 m_scrollDimensionsDirty = false; 429 m_scrollDimensionsDirty = false;
430 430
431 m_overflowRect = box->layoutOverflowRect(); 431 m_overflowRect = box->layoutOverflowRect();
432 box->flipForWritingMode(m_overflowRect); 432 box->flipForWritingMode(m_overflowRect);
433 433
434 int scrollableLeftOverflow = m_overflowRect.x() - box->borderLeft(); 434 int scrollableLeftOverflow = m_overflowRect.x() - box->borderLeft() - (box-> style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft() ? box->verticalScroll barWidth() : 0);
435 int scrollableTopOverflow = m_overflowRect.y() - box->borderTop(); 435 int scrollableTopOverflow = m_overflowRect.y() - box->borderTop();
436 setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow)); 436 setScrollOrigin(IntPoint(-scrollableLeftOverflow, -scrollableTopOverflow));
437 } 437 }
438 438
439 void RenderLayerScrollableArea::scrollToOffset(const IntSize& scrollOffset, Scro llOffsetClamping clamp) 439 void RenderLayerScrollableArea::scrollToOffset(const IntSize& scrollOffset, Scro llOffsetClamping clamp)
440 { 440 {
441 IntSize newScrollOffset = clamp == ScrollOffsetClamped ? clampScrollOffset(s crollOffset) : scrollOffset; 441 IntSize newScrollOffset = clamp == ScrollOffsetClamped ? clampScrollOffset(s crollOffset) : scrollOffset;
442 if (newScrollOffset != adjustedScrollOffset()) 442 if (newScrollOffset != adjustedScrollOffset())
443 scrollToOffsetWithoutAnimation(-scrollOrigin() + newScrollOffset); 443 scrollToOffsetWithoutAnimation(-scrollOrigin() + newScrollOffset);
444 } 444 }
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 return true; 918 return true;
919 } 919 }
920 } 920 }
921 921
922 // FIXME: We should hit test the m_scrollCorner and pass it back through the result. 922 // FIXME: We should hit test the m_scrollCorner and pass it back through the result.
923 923
924 return false; 924 return false;
925 } 925 }
926 926
927 } // Namespace WebCore 927 } // Namespace WebCore
OLDNEW
« Source/core/rendering/RenderBox.h ('K') | « Source/core/rendering/RenderBox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698