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

Unified Diff: Source/web/PopupListBox.cpp

Issue 341543002: Reland 176261: Fix for select PopupMenuList appearance in rtl mode with overlay-scrollbar enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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/platform/scroll/FramelessScrollView.cpp ('k') | Source/web/tests/PopupMenuTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PopupListBox.cpp
diff --git a/Source/web/PopupListBox.cpp b/Source/web/PopupListBox.cpp
index 02d7957ab75e2ab0159e77d3204c7e4797080b5a..592dd971be3875adb03952993e74d0244a9ff192 100644
--- a/Source/web/PopupListBox.cpp
+++ b/Source/web/PopupListBox.cpp
@@ -349,7 +349,7 @@ void PopupListBox::paint(GraphicsContext* gc, const IntRect& rect)
{
// Adjust coords for scrolled frame.
IntRect r = intersection(rect, frameRect());
- int tx = x() - scrollX() + ((shouldPlaceVerticalScrollbarOnLeft() && verticalScrollbar()) ? verticalScrollbar()->width() : 0);
+ int tx = x() - scrollX() + ((shouldPlaceVerticalScrollbarOnLeft() && verticalScrollbar() && !verticalScrollbar()->isOverlayScrollbar()) ? verticalScrollbar()->width() : 0);
int ty = y() - scrollY();
r.move(-tx, -ty);
@@ -596,7 +596,7 @@ void PopupListBox::invalidateRow(int index)
// Invalidate in the window contents, as FramelessScrollView::invalidateRect
// paints in the window coordinates.
IntRect clipRect = contentsToWindow(getRowBounds(index));
- if (shouldPlaceVerticalScrollbarOnLeft() && verticalScrollbar())
+ if (shouldPlaceVerticalScrollbarOnLeft() && verticalScrollbar() && !verticalScrollbar()->isOverlayScrollbar())
clipRect.move(verticalScrollbar()->width(), 0);
invalidateRect(clipRect);
}
@@ -773,7 +773,8 @@ void PopupListBox::layout()
// Set our widget and scrollable contents sizes.
int scrollbarWidth = 0;
if (m_visibleRows < numItems()) {
- scrollbarWidth = ScrollbarTheme::theme()->scrollbarThickness();
+ if (!ScrollbarTheme::theme()->usesOverlayScrollbars())
+ scrollbarWidth = ScrollbarTheme::theme()->scrollbarThickness();
// Use minEndOfLinePadding when there is a scrollbar so that we use
// as much as (lineEndPaddingWidth - minEndOfLinePadding) padding
« no previous file with comments | « Source/platform/scroll/FramelessScrollView.cpp ('k') | Source/web/tests/PopupMenuTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698