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

Side by Side Diff: Source/core/platform/ScrollableArea.cpp

Issue 23734003: Add the text direction to the WebScrollbar interface. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: less memory 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
« no previous file with comments | « Source/core/platform/ScrollableArea.h ('k') | Source/core/platform/Scrollbar.h » ('j') | 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) 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
405 int ScrollableArea::lineStep(ScrollbarOrientation) const 410 int ScrollableArea::lineStep(ScrollbarOrientation) const
406 { 411 {
407 return pixelsPerLineStep(); 412 return pixelsPerLineStep();
408 } 413 }
409 414
410 int ScrollableArea::documentStep(ScrollbarOrientation orientation) const 415 int ScrollableArea::documentStep(ScrollbarOrientation orientation) const
411 { 416 {
412 return scrollSize(orientation); 417 return scrollSize(orientation);
413 } 418 }
414 419
415 float ScrollableArea::pixelStep(ScrollbarOrientation) const 420 float ScrollableArea::pixelStep(ScrollbarOrientation) const
416 { 421 {
417 return 1; 422 return 1;
418 } 423 }
419 424
420 } // namespace WebCore 425 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/platform/ScrollableArea.h ('k') | Source/core/platform/Scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698