| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 IntSize size = Platform::current()->themeEngine()->getSize( | 218 IntSize size = Platform::current()->themeEngine()->getSize( |
| 219 WebThemeEngine::PartScrollbarVerticalThumb); | 219 WebThemeEngine::PartScrollbarVerticalThumb); |
| 220 return size.height(); | 220 return size.height(); |
| 221 } | 221 } |
| 222 | 222 |
| 223 IntSize size = Platform::current()->themeEngine()->getSize( | 223 IntSize size = Platform::current()->themeEngine()->getSize( |
| 224 WebThemeEngine::PartScrollbarHorizontalThumb); | 224 WebThemeEngine::PartScrollbarHorizontalThumb); |
| 225 return size.width(); | 225 return size.width(); |
| 226 } | 226 } |
| 227 | 227 |
| 228 void ScrollbarThemeAura::paintTickmarks(GraphicsContext& context, | 228 void ScrollbarThemeAura::paintAuraTickmarks(GraphicsContext& context, |
| 229 const Scrollbar& scrollbar, | 229 const Scrollbar& scrollbar, |
| 230 const IntRect& rect) { | 230 const IntRect& rect) { |
| 231 if (scrollbar.orientation() != VerticalScrollbar) | 231 if (scrollbar.orientation() != VerticalScrollbar) |
| 232 return; | 232 return; |
| 233 | 233 |
| 234 if (rect.height() <= 0 || rect.width() <= 0) | 234 if (rect.height() <= 0 || rect.width() <= 0) |
| 235 return; | 235 return; |
| 236 | 236 |
| 237 // Get the tickmarks for the frameview. | 237 // Get the tickmarks for the frameview. |
| 238 Vector<IntRect> tickmarks; | 238 Vector<IntRect> tickmarks; |
| 239 scrollbar.getTickmarks(tickmarks); | 239 scrollbar.getTickmarks(tickmarks); |
| 240 if (!tickmarks.size()) | 240 if (!tickmarks.size()) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 258 const int yPos = rect.y() + (rect.height() * percent); | 258 const int yPos = rect.y() + (rect.height() * percent); |
| 259 | 259 |
| 260 FloatRect tickRect(rect.x(), yPos, rect.width(), 3); | 260 FloatRect tickRect(rect.x(), yPos, rect.width(), 3); |
| 261 context.fillRect(tickRect, Color(0xCC, 0xAA, 0x00, 0xFF)); | 261 context.fillRect(tickRect, Color(0xCC, 0xAA, 0x00, 0xFF)); |
| 262 | 262 |
| 263 FloatRect tickStroke(rect.x(), yPos + 1, rect.width(), 1); | 263 FloatRect tickStroke(rect.x(), yPos + 1, rect.width(), 1); |
| 264 context.fillRect(tickStroke, Color(0xFF, 0xDD, 0x00, 0xFF)); | 264 context.fillRect(tickStroke, Color(0xFF, 0xDD, 0x00, 0xFF)); |
| 265 } | 265 } |
| 266 } | 266 } |
| 267 | 267 |
| 268 void ScrollbarThemeAura::paintTickmarks(GraphicsContext& context, |
| 269 const Scrollbar& scrollbar, |
| 270 const IntRect& rect) { |
| 271 ScrollbarThemeAura::paintAuraTickmarks(context, scrollbar, rect); |
| 272 } |
| 273 |
| 268 void ScrollbarThemeAura::paintTrackBackground(GraphicsContext& context, | 274 void ScrollbarThemeAura::paintTrackBackground(GraphicsContext& context, |
| 269 const Scrollbar& scrollbar, | 275 const Scrollbar& scrollbar, |
| 270 const IntRect& rect) { | 276 const IntRect& rect) { |
| 271 // Just assume a forward track part. We only paint the track as a single piece | 277 // Just assume a forward track part. We only paint the track as a single piece |
| 272 // when there is no thumb. | 278 // when there is no thumb. |
| 273 if (!hasThumb(scrollbar) && !rect.isEmpty()) | 279 if (!hasThumb(scrollbar) && !rect.isEmpty()) |
| 274 paintTrackPiece(context, scrollbar, rect, ForwardTrackPart); | 280 paintTrackPiece(context, scrollbar, rect, ForwardTrackPart); |
| 275 } | 281 } |
| 276 | 282 |
| 277 void ScrollbarThemeAura::paintTrackPiece(GraphicsContext& gc, | 283 void ScrollbarThemeAura::paintTrackPiece(GraphicsContext& gc, |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 } | 398 } |
| 393 | 399 |
| 394 // HorizontalScrollbar | 400 // HorizontalScrollbar |
| 395 int squareSize = scrollbar.height(); | 401 int squareSize = scrollbar.height(); |
| 396 return IntSize( | 402 return IntSize( |
| 397 scrollbar.width() < 2 * squareSize ? scrollbar.width() / 2 : squareSize, | 403 scrollbar.width() < 2 * squareSize ? scrollbar.width() / 2 : squareSize, |
| 398 squareSize); | 404 squareSize); |
| 399 } | 405 } |
| 400 | 406 |
| 401 } // namespace blink | 407 } // namespace blink |
| OLD | NEW |