Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp

Issue 2579663002: Update comments about scrollbar thickness. (Closed)
Patch Set: _ Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
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();
287 const int right = rect.x() + rect.width() - box.borderRight(); 287 const int right = rect.x() + rect.width() - box.borderRight();
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.scrollbarThicknessInDIP(); 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
298 // Padding inside the arrowBox. 298 // Padding inside the arrowBox.
299 float extraPadding = 2 * arrowScaleFactor; 299 float extraPadding = 2 * arrowScaleFactor;
300 float arrowSize = 300 float arrowSize =
301 std::min(arrowBoxWidth, 301 std::min(arrowBoxWidth,
302 static_cast<float>(rect.height() - box.borderTop() - 302 static_cast<float>(rect.height() - box.borderTop() -
303 box.borderBottom())) - 303 box.borderBottom())) -
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeDefault.cpp ('k') | third_party/WebKit/Source/platform/scroll/Scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698