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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutThemeDefault.cpp

Issue 2351283003: Applies zoom factor to the spinner size (Closed)
Patch Set: Applies zoom factor to the spinner size Created 4 years, 3 months 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
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 float zoomLevel = style.effectiveZoom(); 227 float zoomLevel = style.effectiveZoom();
228 size.setWidth(size.width() * zoomLevel); 228 size.setWidth(size.width() * zoomLevel);
229 size.setHeight(size.height() * zoomLevel); 229 size.setHeight(size.height() * zoomLevel);
230 setSizeIfAuto(style, size); 230 setSizeIfAuto(style, size);
231 } 231 }
232 232
233 void LayoutThemeDefault::adjustInnerSpinButtonStyle(ComputedStyle& style) const 233 void LayoutThemeDefault::adjustInnerSpinButtonStyle(ComputedStyle& style) const
234 { 234 {
235 IntSize size = Platform::current()->themeEngine()->getSize(WebThemeEngine::P artInnerSpinButton); 235 IntSize size = Platform::current()->themeEngine()->getSize(WebThemeEngine::P artInnerSpinButton);
236 236
237 style.setWidth(Length(size.width(), Fixed)); 237 float zoomLevel = style.effectiveZoom();
238 style.setMinWidth(Length(size.width(), Fixed)); 238 style.setWidth(Length(size.width() * zoomLevel, Fixed));
239 style.setMinWidth(Length(size.width() * zoomLevel, Fixed));
239 } 240 }
240 241
241 bool LayoutThemeDefault::shouldOpenPickerWithF4Key() const 242 bool LayoutThemeDefault::shouldOpenPickerWithF4Key() const
242 { 243 {
243 return true; 244 return true;
244 } 245 }
245 246
246 bool LayoutThemeDefault::shouldUseFallbackTheme(const ComputedStyle& style) cons t 247 bool LayoutThemeDefault::shouldUseFallbackTheme(const ComputedStyle& style) cons t
247 { 248 {
248 if (useMockTheme()) { 249 if (useMockTheme()) {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 { 378 {
378 return progressAnimationInterval; 379 return progressAnimationInterval;
379 } 380 }
380 381
381 double LayoutThemeDefault::animationDurationForProgressBar() const 382 double LayoutThemeDefault::animationDurationForProgressBar() const
382 { 383 {
383 return progressAnimationInterval * progressAnimationFrames * 2; // "2" for b ack and forth 384 return progressAnimationInterval * progressAnimationFrames * 2; // "2" for b ack and forth
384 } 385 }
385 386
386 } // namespace blink 387 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698