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

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

Issue 23480037: Fix RTL scroll bars being misrendered on Android. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: isLeftSideVerticalScrollbar Created 7 years, 3 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 | Annotate | Revision Log
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 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 ASSERT(box); 1382 ASSERT(box);
1383 1383
1384 if (box->isIntristicallyScrollable(orientation)) 1384 if (box->isIntristicallyScrollable(orientation))
1385 return true; 1385 return true;
1386 1386
1387 EOverflow overflowStyle = (orientation == HorizontalScrollbar) ? 1387 EOverflow overflowStyle = (orientation == HorizontalScrollbar) ?
1388 renderer()->style()->overflowX() : renderer()->style()->overflowY(); 1388 renderer()->style()->overflowX() : renderer()->style()->overflowY();
1389 return (overflowStyle == OSCROLL || overflowStyle == OAUTO || overflowStyle == OOVERLAY); 1389 return (overflowStyle == OSCROLL || overflowStyle == OAUTO || overflowStyle == OOVERLAY);
1390 } 1390 }
1391 1391
1392 bool RenderLayer::shouldPlaceVerticalScrollbarOnLeft() const
1393 {
1394 return renderer()->style()->shouldPlaceBlockDirectionScrollbarOnLogicalLeft( );
1395 }
1396
1392 int RenderLayer::pageStep(ScrollbarOrientation orientation) const 1397 int RenderLayer::pageStep(ScrollbarOrientation orientation) const
1393 { 1398 {
1394 RenderBox* box = renderBox(); 1399 RenderBox* box = renderBox();
1395 ASSERT(box); 1400 ASSERT(box);
1396 1401
1397 int length = (orientation == HorizontalScrollbar) ? 1402 int length = (orientation == HorizontalScrollbar) ?
1398 box->pixelSnappedClientWidth() : box->pixelSnappedClientHeight(); 1403 box->pixelSnappedClientWidth() : box->pixelSnappedClientHeight();
1399 int minPageStep = static_cast<float>(length) * ScrollableArea::minFractionTo StepWhenPaging(); 1404 int minPageStep = static_cast<float>(length) * ScrollableArea::minFractionTo StepWhenPaging();
1400 int pageStep = max(minPageStep, length - ScrollableArea::maxOverlapBetweenPa ges()); 1405 int pageStep = max(minPageStep, length - ScrollableArea::maxOverlapBetweenPa ges());
1401 1406
(...skipping 4947 matching lines...) Expand 10 before | Expand all | Expand 10 after
6349 } 6354 }
6350 } 6355 }
6351 6356
6352 void showLayerTree(const WebCore::RenderObject* renderer) 6357 void showLayerTree(const WebCore::RenderObject* renderer)
6353 { 6358 {
6354 if (!renderer) 6359 if (!renderer)
6355 return; 6360 return;
6356 showLayerTree(renderer->enclosingLayer()); 6361 showLayerTree(renderer->enclosingLayer());
6357 } 6362 }
6358 #endif 6363 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698