OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. | 2 * Copyright (C) 2007 Apple Inc. |
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
4 * Copyright (C) 2008 Collabora Ltd. | 4 * Copyright (C) 2008 Collabora Ltd. |
5 * Copyright (C) 2008, 2009 Google Inc. | 5 * Copyright (C) 2008, 2009 Google Inc. |
6 * Copyright (C) 2009 Kenneth Rohde Christiansen | 6 * Copyright (C) 2009 Kenneth Rohde Christiansen |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 Platform::current()->themeEngine()->paint( | 276 Platform::current()->themeEngine()->paint( |
277 canvas, WebThemeEngine::PartMenuList, getWebThemeState(o), WebRect(rect), | 277 canvas, WebThemeEngine::PartMenuList, getWebThemeState(o), WebRect(rect), |
278 &extraParams); | 278 &extraParams); |
279 return false; | 279 return false; |
280 } | 280 } |
281 | 281 |
282 void ThemePainterDefault::setupMenuListArrow( | 282 void ThemePainterDefault::setupMenuListArrow( |
283 const LayoutBox& box, | 283 const LayoutBox& box, |
284 const IntRect& rect, | 284 const IntRect& rect, |
285 WebThemeEngine::ExtraParams& extraParams) { | 285 WebThemeEngine::ExtraParams& extraParams) { |
286 const int left = rect.x() + box.borderLeft(); | 286 const int left = rect.x() + box.borderLeft().toInt(); |
287 const int right = rect.x() + rect.width() - box.borderRight(); | 287 const int right = rect.x() + rect.width() - box.borderRight().toInt(); |
288 const int middle = rect.y() + rect.height() / 2; | 288 const int middle = rect.y() + rect.height() / 2; |
289 | 289 |
290 extraParams.menuList.arrowY = middle; | 290 extraParams.menuList.arrowY = middle; |
291 float arrowBoxWidth = m_theme.clampedMenuListArrowPaddingSize( | 291 float arrowBoxWidth = m_theme.clampedMenuListArrowPaddingSize( |
292 box.frameView()->getHostWindow(), box.styleRef()); | 292 box.frameView()->getHostWindow(), box.styleRef()); |
293 float arrowScaleFactor = arrowBoxWidth / m_theme.menuListArrowWidthInDIP(); | 293 float arrowScaleFactor = arrowBoxWidth / m_theme.menuListArrowWidthInDIP(); |
294 if (useMockTheme()) { | 294 if (useMockTheme()) { |
295 // The size and position of the drop-down button is different between | 295 // The size and position of the drop-down button is different between |
296 // the mock theme and the regular aura theme. | 296 // the mock theme and the regular aura theme. |
297 | 297 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 DEFINE_STATIC_REF(Image, cancelPressedImage, | 465 DEFINE_STATIC_REF(Image, cancelPressedImage, |
466 (Image::loadPlatformResource("searchCancelPressed"))); | 466 (Image::loadPlatformResource("searchCancelPressed"))); |
467 paintInfo.context.drawImage(LayoutTheme::isPressed(cancelButtonObject) | 467 paintInfo.context.drawImage(LayoutTheme::isPressed(cancelButtonObject) |
468 ? cancelPressedImage | 468 ? cancelPressedImage |
469 : cancelImage, | 469 : cancelImage, |
470 paintingRect); | 470 paintingRect); |
471 return false; | 471 return false; |
472 } | 472 } |
473 | 473 |
474 } // namespace blink | 474 } // namespace blink |
OLD | NEW |