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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 // The result should not be samller than the scrollbar thickness in order to | 356 // The result should not be samller than the scrollbar thickness in order to |
357 // secure space for scrollbar in popup. | 357 // secure space for scrollbar in popup. |
358 float deviceScale = 1.0f * scaledSize / originalSize; | 358 float deviceScale = 1.0f * scaledSize / originalSize; |
359 if (style.effectiveZoom() < deviceScale) | 359 if (style.effectiveZoom() < deviceScale) |
360 return scaledSize; | 360 return scaledSize; |
361 // The value should be zoomed though scrollbars aren't scaled by zoom. | 361 // The value should be zoomed though scrollbars aren't scaled by zoom. |
362 // crbug.com/432795. | 362 // crbug.com/432795. |
363 return originalSize * style.effectiveZoom(); | 363 return originalSize * style.effectiveZoom(); |
364 } | 364 } |
365 | 365 |
| 366 void LayoutThemeDefault::didChangeThemeEngine() { |
| 367 m_menuListArrowWidthInDIP = 0; |
| 368 } |
| 369 |
366 // static | 370 // static |
367 void LayoutThemeDefault::setDefaultFontSize(int fontSize) { | 371 void LayoutThemeDefault::setDefaultFontSize(int fontSize) { |
368 LayoutThemeFontProvider::setDefaultFontSize(fontSize); | 372 LayoutThemeFontProvider::setDefaultFontSize(fontSize); |
369 } | 373 } |
370 | 374 |
371 int LayoutThemeDefault::menuListInternalPadding(const ComputedStyle& style, | 375 int LayoutThemeDefault::menuListInternalPadding(const ComputedStyle& style, |
372 int padding) const { | 376 int padding) const { |
373 if (style.appearance() == NoControlPart) | 377 if (style.appearance() == NoControlPart) |
374 return 0; | 378 return 0; |
375 return padding * style.effectiveZoom(); | 379 return padding * style.effectiveZoom(); |
376 } | 380 } |
377 | 381 |
378 // | 382 // |
379 // Following values are come from default of GTK+ | 383 // Following values are come from default of GTK+ |
380 // | 384 // |
381 static const int progressAnimationFrames = 10; | 385 static const int progressAnimationFrames = 10; |
382 static const double progressAnimationInterval = 0.125; | 386 static const double progressAnimationInterval = 0.125; |
383 | 387 |
384 double LayoutThemeDefault::animationRepeatIntervalForProgressBar() const { | 388 double LayoutThemeDefault::animationRepeatIntervalForProgressBar() const { |
385 return progressAnimationInterval; | 389 return progressAnimationInterval; |
386 } | 390 } |
387 | 391 |
388 double LayoutThemeDefault::animationDurationForProgressBar() const { | 392 double LayoutThemeDefault::animationDurationForProgressBar() const { |
389 return progressAnimationInterval * progressAnimationFrames * | 393 return progressAnimationInterval * progressAnimationFrames * |
390 2; // "2" for back and forth | 394 2; // "2" for back and forth |
391 } | 395 } |
392 | 396 |
393 } // namespace blink | 397 } // namespace blink |
OLD | NEW |