OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008, 2009, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009, 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } | 206 } |
207 if (scrollbar.height() <= 2 * bs.height()) | 207 if (scrollbar.height() <= 2 * bs.height()) |
208 return IntRect(); | 208 return IntRect(); |
209 return IntRect(scrollbar.x(), scrollbar.y() + bs.height(), scrollbar.width(), | 209 return IntRect(scrollbar.x(), scrollbar.y() + bs.height(), scrollbar.width(), |
210 scrollbar.height() - 2 * bs.height()); | 210 scrollbar.height() - 2 * bs.height()); |
211 } | 211 } |
212 | 212 |
213 int ScrollbarThemeAura::minimumThumbLength( | 213 int ScrollbarThemeAura::minimumThumbLength( |
214 const ScrollbarThemeClient& scrollbar) { | 214 const ScrollbarThemeClient& scrollbar) { |
215 if (scrollbar.orientation() == VerticalScrollbar) { | 215 if (scrollbar.orientation() == VerticalScrollbar) { |
216 return Platform::current() | 216 IntSize size = Platform::current()->themeEngine()->getSize( |
217 ->themeEngine() | 217 WebThemeEngine::PartScrollbarVerticalThumb); |
218 ->getSize(WebThemeEngine::PartScrollbarVerticalThumb) | 218 return size.height(); |
219 .height; | |
220 } | 219 } |
221 | 220 |
222 return Platform::current() | 221 IntSize size = Platform::current()->themeEngine()->getSize( |
223 ->themeEngine() | 222 WebThemeEngine::PartScrollbarHorizontalThumb); |
224 ->getSize(WebThemeEngine::PartScrollbarHorizontalThumb) | 223 return size.width(); |
225 .width; | |
226 } | 224 } |
227 | 225 |
228 void ScrollbarThemeAura::paintTrackBackground(GraphicsContext& context, | 226 void ScrollbarThemeAura::paintTrackBackground(GraphicsContext& context, |
229 const Scrollbar& scrollbar, | 227 const Scrollbar& scrollbar, |
230 const IntRect& rect) { | 228 const IntRect& rect) { |
231 // Just assume a forward track part. We only paint the track as a single piece | 229 // Just assume a forward track part. We only paint the track as a single piece |
232 // when there is no thumb. | 230 // when there is no thumb. |
233 if (!hasThumb(scrollbar) && !rect.isEmpty()) | 231 if (!hasThumb(scrollbar) && !rect.isEmpty()) |
234 paintTrackPiece(context, scrollbar, rect, ForwardTrackPart); | 232 paintTrackPiece(context, scrollbar, rect, ForwardTrackPart); |
235 } | 233 } |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 } | 350 } |
353 | 351 |
354 // HorizontalScrollbar | 352 // HorizontalScrollbar |
355 int squareSize = scrollbar.height(); | 353 int squareSize = scrollbar.height(); |
356 return IntSize( | 354 return IntSize( |
357 scrollbar.width() < 2 * squareSize ? scrollbar.width() / 2 : squareSize, | 355 scrollbar.width() < 2 * squareSize ? scrollbar.width() / 2 : squareSize, |
358 squareSize); | 356 squareSize); |
359 } | 357 } |
360 | 358 |
361 } // namespace blink | 359 } // namespace blink |
OLD | NEW |