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

Unified Diff: Source/core/platform/ScrollView.cpp

Issue 59333002: Make select drop down popup RTL aware (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 | « no previous file | Source/core/platform/chromium/FramelessScrollView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/ScrollView.cpp
diff --git a/Source/core/platform/ScrollView.cpp b/Source/core/platform/ScrollView.cpp
index f809a8e7005a5ee482e535398171e1ad384c425d..07edc99d5fa9483a6b8cfa19122ad8f55cbb9c6a 100644
--- a/Source/core/platform/ScrollView.cpp
+++ b/Source/core/platform/ScrollView.cpp
@@ -432,7 +432,7 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset)
if (m_horizontalScrollbar) {
int clientWidth = visibleWidth();
IntRect oldRect(m_horizontalScrollbar->frameRect());
- IntRect hBarRect(0,
+ IntRect hBarRect((shouldPlaceVerticalScrollbarOnLeft() && m_verticalScrollbar) ? m_verticalScrollbar->width() : 0,
height() - m_horizontalScrollbar->height(),
width() - (m_verticalScrollbar ? m_verticalScrollbar->width() : 0),
m_horizontalScrollbar->height());
@@ -451,7 +451,7 @@ void ScrollView::updateScrollbars(const IntSize& desiredOffset)
if (m_verticalScrollbar) {
int clientHeight = visibleHeight();
IntRect oldRect(m_verticalScrollbar->frameRect());
- IntRect vBarRect(width() - m_verticalScrollbar->width(),
+ IntRect vBarRect(shouldPlaceVerticalScrollbarOnLeft() ? 0 : (width() - m_verticalScrollbar->width()),
eseidel 2013/11/13 18:00:53 ScrollView is also a parent of FrameView. I'm cur
0,
m_verticalScrollbar->width(),
height() - (m_horizontalScrollbar ? m_horizontalScrollbar->height() : 0));
@@ -498,7 +498,7 @@ const int panIconSizeLength = 16;
IntRect ScrollView::rectToCopyOnScroll() const
{
- IntRect scrollViewRect = convertToRootView(IntRect(0, 0, visibleWidth(), visibleHeight()));
+ IntRect scrollViewRect = convertToRootView(IntRect((shouldPlaceVerticalScrollbarOnLeft() && verticalScrollbar()) ? verticalScrollbar()->width() : 0, 0, visibleWidth(), visibleHeight()));
if (hasOverlayScrollbars()) {
int verticalScrollbarWidth = (verticalScrollbar() && !hasLayerForVerticalScrollbar()) ? verticalScrollbar()->width() : 0;
int horizontalScrollbarHeight = (horizontalScrollbar() && !hasLayerForHorizontalScrollbar()) ? horizontalScrollbar()->height() : 0;
@@ -792,14 +792,14 @@ IntRect ScrollView::scrollCornerRect() const
return cornerRect;
if (m_horizontalScrollbar && width() - m_horizontalScrollbar->width() > 0) {
- cornerRect.unite(IntRect(m_horizontalScrollbar->width(),
+ cornerRect.unite(IntRect(shouldPlaceVerticalScrollbarOnLeft() ? 0 : m_horizontalScrollbar->width(),
height() - m_horizontalScrollbar->height(),
width() - m_horizontalScrollbar->width(),
m_horizontalScrollbar->height()));
}
if (m_verticalScrollbar && height() - m_verticalScrollbar->height() > 0) {
- cornerRect.unite(IntRect(width() - m_verticalScrollbar->width(),
+ cornerRect.unite(IntRect(shouldPlaceVerticalScrollbarOnLeft() ? 0 : (width() - m_verticalScrollbar->width()),
m_verticalScrollbar->height(),
m_verticalScrollbar->width(),
height() - m_verticalScrollbar->height()));
« no previous file with comments | « no previous file | Source/core/platform/chromium/FramelessScrollView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698