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

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

Issue 2824263002: Replace getBaseLayerSize() with the size passed to DrawingRecorder. (Closed)
Patch Set: scrollbarbaselayer: . Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | 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) 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 part = WebThemeEngine::kPartScrollbarVerticalThumb; 202 part = WebThemeEngine::kPartScrollbarVerticalThumb;
203 203
204 blink::WebThemeEngine::ExtraParams params; 204 blink::WebThemeEngine::ExtraParams params;
205 params.scrollbar_thumb.scrollbar_theme = 205 params.scrollbar_thumb.scrollbar_theme =
206 static_cast<WebScrollbarOverlayColorTheme>( 206 static_cast<WebScrollbarOverlayColorTheme>(
207 scrollbar.GetScrollbarOverlayColorTheme()); 207 scrollbar.GetScrollbarOverlayColorTheme());
208 208
209 // Horizontally flip the canvas if it is left vertical scrollbar. 209 // Horizontally flip the canvas if it is left vertical scrollbar.
210 if (scrollbar.IsLeftSideVerticalScrollbar()) { 210 if (scrollbar.IsLeftSideVerticalScrollbar()) {
211 canvas->save(); 211 canvas->save();
212 canvas->translate(canvas->getBaseLayerSize().width(), 0); 212 canvas->translate(rect.Width(), 0);
213 canvas->scale(-1, 1); 213 canvas->scale(-1, 1);
214 } 214 }
215 215
216 Platform::Current()->ThemeEngine()->Paint(canvas, part, state, WebRect(rect), 216 Platform::Current()->ThemeEngine()->Paint(canvas, part, state, WebRect(rect),
217 &params); 217 &params);
218 218
219 if (scrollbar.IsLeftSideVerticalScrollbar()) 219 if (scrollbar.IsLeftSideVerticalScrollbar())
220 canvas->restore(); 220 canvas->restore();
221 } 221 }
222 222
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 .height; 290 .height;
291 } 291 }
292 292
293 return Platform::Current() 293 return Platform::Current()
294 ->ThemeEngine() 294 ->ThemeEngine()
295 ->GetSize(WebThemeEngine::kPartScrollbarHorizontalThumb) 295 ->GetSize(WebThemeEngine::kPartScrollbarHorizontalThumb)
296 .width; 296 .width;
297 } 297 }
298 298
299 } // namespace blink 299 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698