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

Side by Side Diff: third_party/WebKit/Source/platform/scroll/ScrollbarThemeOverlay.cpp

Issue 2763373002: Overlay scrollbars flush with window edge (Closed)
Patch Set: bokan comment addressed Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 WebCanvas* canvas = context.canvas(); 197 WebCanvas* canvas = context.canvas();
198 198
199 WebThemeEngine::Part part = WebThemeEngine::PartScrollbarHorizontalThumb; 199 WebThemeEngine::Part part = WebThemeEngine::PartScrollbarHorizontalThumb;
200 if (scrollbar.orientation() == VerticalScrollbar) 200 if (scrollbar.orientation() == VerticalScrollbar)
201 part = WebThemeEngine::PartScrollbarVerticalThumb; 201 part = WebThemeEngine::PartScrollbarVerticalThumb;
202 202
203 blink::WebThemeEngine::ExtraParams params; 203 blink::WebThemeEngine::ExtraParams params;
204 params.scrollbarThumb.scrollbarTheme = 204 params.scrollbarThumb.scrollbarTheme =
205 static_cast<WebScrollbarOverlayColorTheme>( 205 static_cast<WebScrollbarOverlayColorTheme>(
206 scrollbar.getScrollbarOverlayColorTheme()); 206 scrollbar.getScrollbarOverlayColorTheme());
207 params.scrollbarThumb.isLeftVerticalScrollbar =
208 scrollbar.isLeftSideVerticalScrollbar();
207 209
208 Platform::current()->themeEngine()->paint(canvas, part, state, WebRect(rect), 210 Platform::current()->themeEngine()->paint(canvas, part, state, WebRect(rect),
209 &params); 211 &params);
210 } 212 }
211 213
212 ScrollbarPart ScrollbarThemeOverlay::hitTest( 214 ScrollbarPart ScrollbarThemeOverlay::hitTest(
213 const ScrollbarThemeClient& scrollbar, 215 const ScrollbarThemeClient& scrollbar,
214 const IntPoint& position) { 216 const IntPoint& position) {
215 if (m_allowHitTest == DisallowHitTest) 217 if (m_allowHitTest == DisallowHitTest)
216 return NoPart; 218 return NoPart;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 266
265 WebThemeEngine::Part part = WebThemeEngine::PartScrollbarHorizontalThumb; 267 WebThemeEngine::Part part = WebThemeEngine::PartScrollbarHorizontalThumb;
266 if (scrollbar.orientation() == VerticalScrollbar) 268 if (scrollbar.orientation() == VerticalScrollbar)
267 part = WebThemeEngine::PartScrollbarVerticalThumb; 269 part = WebThemeEngine::PartScrollbarVerticalThumb;
268 270
269 DCHECK(Platform::current()->themeEngine()); 271 DCHECK(Platform::current()->themeEngine());
270 return Platform::current()->themeEngine()->ninePatchAperture(part); 272 return Platform::current()->themeEngine()->ninePatchAperture(part);
271 } 273 }
272 274
273 } // namespace blink 275 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698