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

Side by Side Diff: Source/core/platform/ScrollableArea.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) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved. 3 * Copyright (C) 2008, 2011 Apple Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 scrollPosition().y(), 395 scrollPosition().y(),
396 std::max(0, visibleWidth() + verticalScrollbarWidth), 396 std::max(0, visibleWidth() + verticalScrollbarWidth),
397 std::max(0, visibleHeight() + horizontalScrollbarHeight)); 397 std::max(0, visibleHeight() + horizontalScrollbarHeight));
398 } 398 }
399 399
400 IntPoint ScrollableArea::clampScrollPosition(const IntPoint& scrollPosition) con st 400 IntPoint ScrollableArea::clampScrollPosition(const IntPoint& scrollPosition) con st
401 { 401 {
402 return scrollPosition.shrunkTo(maximumScrollPosition()).expandedTo(minimumSc rollPosition()); 402 return scrollPosition.shrunkTo(maximumScrollPosition()).expandedTo(minimumSc rollPosition());
403 } 403 }
404 404
405 TextDirection ScrollableArea::textDirection() const
406 {
407 return !m_scrollOrigin.x() ? LTR : RTL;
408 }
409
410 int ScrollableArea::lineStep(ScrollbarOrientation) const 405 int ScrollableArea::lineStep(ScrollbarOrientation) const
411 { 406 {
412 return pixelsPerLineStep(); 407 return pixelsPerLineStep();
413 } 408 }
414 409
415 int ScrollableArea::documentStep(ScrollbarOrientation orientation) const 410 int ScrollableArea::documentStep(ScrollbarOrientation orientation) const
416 { 411 {
417 return scrollSize(orientation); 412 return scrollSize(orientation);
418 } 413 }
419 414
420 float ScrollableArea::pixelStep(ScrollbarOrientation) const 415 float ScrollableArea::pixelStep(ScrollbarOrientation) const
421 { 416 {
422 return 1; 417 return 1;
423 } 418 }
424 419
425 } // namespace WebCore 420 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698