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 IntSize size = Platform::current()->themeEngine()->getSize( | 216 return Platform::current() |
217 WebThemeEngine::PartScrollbarVerticalThumb); | 217 ->themeEngine() |
218 return size.height(); | 218 ->getSize(WebThemeEngine::PartScrollbarVerticalThumb) |
| 219 .height; |
219 } | 220 } |
220 | 221 |
221 IntSize size = Platform::current()->themeEngine()->getSize( | 222 return Platform::current() |
222 WebThemeEngine::PartScrollbarHorizontalThumb); | 223 ->themeEngine() |
223 return size.width(); | 224 ->getSize(WebThemeEngine::PartScrollbarHorizontalThumb) |
| 225 .width; |
224 } | 226 } |
225 | 227 |
226 void ScrollbarThemeAura::paintTrackBackground(GraphicsContext& context, | 228 void ScrollbarThemeAura::paintTrackBackground(GraphicsContext& context, |
227 const Scrollbar& scrollbar, | 229 const Scrollbar& scrollbar, |
228 const IntRect& rect) { | 230 const IntRect& rect) { |
229 // Just assume a forward track part. We only paint the track as a single piece | 231 // Just assume a forward track part. We only paint the track as a single piece |
230 // when there is no thumb. | 232 // when there is no thumb. |
231 if (!hasThumb(scrollbar) && !rect.isEmpty()) | 233 if (!hasThumb(scrollbar) && !rect.isEmpty()) |
232 paintTrackPiece(context, scrollbar, rect, ForwardTrackPart); | 234 paintTrackPiece(context, scrollbar, rect, ForwardTrackPart); |
233 } | 235 } |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 } | 352 } |
351 | 353 |
352 // HorizontalScrollbar | 354 // HorizontalScrollbar |
353 int squareSize = scrollbar.height(); | 355 int squareSize = scrollbar.height(); |
354 return IntSize( | 356 return IntSize( |
355 scrollbar.width() < 2 * squareSize ? scrollbar.width() / 2 : squareSize, | 357 scrollbar.width() < 2 * squareSize ? scrollbar.width() / 2 : squareSize, |
356 squareSize); | 358 squareSize); |
357 } | 359 } |
358 | 360 |
359 } // namespace blink | 361 } // namespace blink |
OLD | NEW |