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

Unified Diff: Source/core/platform/Scrollbar.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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/platform/Scrollbar.h ('k') | Source/core/platform/chromium/support/WebScrollbarImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/Scrollbar.cpp
diff --git a/Source/core/platform/Scrollbar.cpp b/Source/core/platform/Scrollbar.cpp
index 8e640cc5ff04afe7a6fb3fdde0831f1f39960c87..bcc23679c69bae731eb30f61c57dde17dfede991 100644
--- a/Source/core/platform/Scrollbar.cpp
+++ b/Source/core/platform/Scrollbar.cpp
@@ -55,8 +55,7 @@ PassRefPtr<Scrollbar> Scrollbar::createNativeScrollbar(ScrollableArea* scrollabl
return adoptRef(new Scrollbar(scrollableArea, orientation, size));
}
-Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize,
- ScrollbarTheme* theme)
+Scrollbar::Scrollbar(ScrollableArea* scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize, ScrollbarTheme* theme)
: m_scrollableArea(scrollableArea)
, m_orientation(orientation)
, m_controlSize(controlSize)
@@ -122,6 +121,13 @@ bool Scrollbar::isScrollViewScrollbar() const
return parent() && parent()->isFrameView() && toFrameView(parent())->isScrollViewScrollbar(this);
}
+TextDirection Scrollbar::textDirection() const
+{
+ if (m_orientation == VerticalScrollbar && m_scrollableArea)
+ return m_scrollableArea->textDirection();
+ return LTR;
+}
+
void Scrollbar::offsetDidChange()
{
ASSERT(m_scrollableArea);
« no previous file with comments | « Source/core/platform/Scrollbar.h ('k') | Source/core/platform/chromium/support/WebScrollbarImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698