| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 for (ScrollbarPart part : kButtonParts) { | 319 for (ScrollbarPart part : kButtonParts) { |
| 320 if (buttonPartPaintingParams(scrollbar, oldPosition, part) != buttonPart
PaintingParams(scrollbar, newPosition, part)) | 320 if (buttonPartPaintingParams(scrollbar, oldPosition, part) != buttonPart
PaintingParams(scrollbar, newPosition, part)) |
| 321 invalidParts = static_cast<ScrollbarPart>(invalidParts | part); | 321 invalidParts = static_cast<ScrollbarPart>(invalidParts | part); |
| 322 } | 322 } |
| 323 return invalidParts; | 323 return invalidParts; |
| 324 } | 324 } |
| 325 | 325 |
| 326 IntSize ScrollbarThemeAura::buttonSize(const ScrollbarThemeClient& scrollbar) | 326 IntSize ScrollbarThemeAura::buttonSize(const ScrollbarThemeClient& scrollbar) |
| 327 { | 327 { |
| 328 if (scrollbar.orientation() == VerticalScrollbar) { | 328 if (scrollbar.orientation() == VerticalScrollbar) { |
| 329 IntSize size = Platform::current()->themeEngine()->getSize(WebThemeEngin
e::PartScrollbarUpArrow); | 329 int squareSize = scrollbar.width(); |
| 330 return IntSize(size.width(), scrollbar.height() < 2 * size.height() ? sc
rollbar.height() / 2 : size.height()); | 330 return IntSize(squareSize, scrollbar.height() < 2 * squareSize ? scrollb
ar.height() / 2 : squareSize); |
| 331 } | 331 } |
| 332 | 332 |
| 333 // HorizontalScrollbar | 333 // HorizontalScrollbar |
| 334 IntSize size = Platform::current()->themeEngine()->getSize(WebThemeEngine::P
artScrollbarLeftArrow); | 334 int squareSize = scrollbar.height(); |
| 335 return IntSize(scrollbar.width() < 2 * size.width() ? scrollbar.width() / 2
: size.width(), size.height()); | 335 return IntSize(scrollbar.width() < 2 * squareSize ? scrollbar.width() / 2 :
squareSize, squareSize); |
| 336 } | 336 } |
| 337 | 337 |
| 338 } // namespace blink | 338 } // namespace blink |
| OLD | NEW |