| OLD | NEW |
| 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 Loading... |
| 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 ¶ms); | 217 ¶ms); |
| 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 Loading... |
| 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 |
| OLD | NEW |