OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008, 2009 Google, Inc. | 3 * Copyright (C) 2008, 2009 Google, Inc. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 FontWeight700, | 246 FontWeight700, |
247 FontWeight800, | 247 FontWeight800, |
248 FontWeight800, | 248 FontWeight800, |
249 FontWeight900, | 249 FontWeight900, |
250 FontWeight900, | 250 FontWeight900, |
251 FontWeight900 | 251 FontWeight900 |
252 }; | 252 }; |
253 return fontWeights[appKitFontWeight - 1]; | 253 return fontWeights[appKitFontWeight - 1]; |
254 } | 254 } |
255 | 255 |
256 void RenderThemeChromiumMac::systemFont(int cssValueId, FontDescription& fontDes
cription) const | 256 void RenderThemeChromiumMac::systemFont(CSSValueID cssValueId, FontDescription&
fontDescription) const |
257 { | 257 { |
258 DEFINE_STATIC_LOCAL(FontDescription, systemFont, ()); | 258 DEFINE_STATIC_LOCAL(FontDescription, systemFont, ()); |
259 DEFINE_STATIC_LOCAL(FontDescription, smallSystemFont, ()); | 259 DEFINE_STATIC_LOCAL(FontDescription, smallSystemFont, ()); |
260 DEFINE_STATIC_LOCAL(FontDescription, menuFont, ()); | 260 DEFINE_STATIC_LOCAL(FontDescription, menuFont, ()); |
261 DEFINE_STATIC_LOCAL(FontDescription, labelFont, ()); | 261 DEFINE_STATIC_LOCAL(FontDescription, labelFont, ()); |
262 DEFINE_STATIC_LOCAL(FontDescription, miniControlFont, ()); | 262 DEFINE_STATIC_LOCAL(FontDescription, miniControlFont, ()); |
263 DEFINE_STATIC_LOCAL(FontDescription, smallControlFont, ()); | 263 DEFINE_STATIC_LOCAL(FontDescription, smallControlFont, ()); |
264 DEFINE_STATIC_LOCAL(FontDescription, controlFont, ()); | 264 DEFINE_STATIC_LOCAL(FontDescription, controlFont, ()); |
265 | 265 |
266 FontDescription* cachedDesc; | 266 FontDescription* cachedDesc; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 | 381 |
382 return makeRGB(pixel[0], pixel[1], pixel[2]); | 382 return makeRGB(pixel[0], pixel[1], pixel[2]); |
383 } | 383 } |
384 | 384 |
385 void RenderThemeChromiumMac::platformColorsDidChange() | 385 void RenderThemeChromiumMac::platformColorsDidChange() |
386 { | 386 { |
387 m_systemColorCache.clear(); | 387 m_systemColorCache.clear(); |
388 RenderTheme::platformColorsDidChange(); | 388 RenderTheme::platformColorsDidChange(); |
389 } | 389 } |
390 | 390 |
391 Color RenderThemeChromiumMac::systemColor(int cssValueId) const | 391 Color RenderThemeChromiumMac::systemColor(CSSValueID cssValueId) const |
392 { | 392 { |
393 { | 393 { |
394 HashMap<int, RGBA32>::iterator it = m_systemColorCache.find(cssValueId); | 394 HashMap<int, RGBA32>::iterator it = m_systemColorCache.find(cssValueId); |
395 if (it != m_systemColorCache.end()) | 395 if (it != m_systemColorCache.end()) |
396 return it->value; | 396 return it->value; |
397 } | 397 } |
398 | 398 |
399 Color color; | 399 Color color; |
400 switch (cssValueId) { | 400 switch (cssValueId) { |
401 case CSSValueActiveborder: | 401 case CSSValueActiveborder: |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 break; | 486 break; |
487 case CSSValueWindow: | 487 case CSSValueWindow: |
488 color = convertNSColorToColor([NSColor windowBackgroundColor]); | 488 color = convertNSColorToColor([NSColor windowBackgroundColor]); |
489 break; | 489 break; |
490 case CSSValueWindowframe: | 490 case CSSValueWindowframe: |
491 color = convertNSColorToColor([NSColor windowFrameColor]); | 491 color = convertNSColorToColor([NSColor windowFrameColor]); |
492 break; | 492 break; |
493 case CSSValueWindowtext: | 493 case CSSValueWindowtext: |
494 color = convertNSColorToColor([NSColor windowFrameTextColor]); | 494 color = convertNSColorToColor([NSColor windowFrameTextColor]); |
495 break; | 495 break; |
| 496 default: |
| 497 break; |
496 } | 498 } |
497 | 499 |
498 if (!color.isValid()) | 500 if (!color.isValid()) |
499 color = RenderTheme::systemColor(cssValueId); | 501 color = RenderTheme::systemColor(cssValueId); |
500 | 502 |
501 if (color.isValid()) | 503 if (color.isValid()) |
502 m_systemColorCache.set(cssValueId, color.rgb()); | 504 m_systemColorCache.set(cssValueId, color.rgb()); |
503 | 505 |
504 return color; | 506 return color; |
505 } | 507 } |
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1964 | 1966 |
1965 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const | 1967 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const |
1966 { | 1968 { |
1967 ControlPart part = style->appearance(); | 1969 ControlPart part = style->appearance(); |
1968 if (part == CheckboxPart || part == RadioPart) | 1970 if (part == CheckboxPart || part == RadioPart) |
1969 return style->effectiveZoom() != 1; | 1971 return style->effectiveZoom() != 1; |
1970 return false; | 1972 return false; |
1971 } | 1973 } |
1972 | 1974 |
1973 } // namespace WebCore | 1975 } // namespace WebCore |
OLD | NEW |