| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 : "mediaControlsAndroid.css"); | 53 : "mediaControlsAndroid.css"); |
| 54 } | 54 } |
| 55 | 55 |
| 56 String LayoutThemeMobile::extraFullscreenStyleSheet() { | 56 String LayoutThemeMobile::extraFullscreenStyleSheet() { |
| 57 return loadResourceAsASCIIString("fullscreenAndroid.css"); | 57 return loadResourceAsASCIIString("fullscreenAndroid.css"); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void LayoutThemeMobile::adjustInnerSpinButtonStyle(ComputedStyle& style) const { | 60 void LayoutThemeMobile::adjustInnerSpinButtonStyle(ComputedStyle& style) const { |
| 61 if (LayoutTestSupport::isRunningLayoutTest()) { | 61 if (LayoutTestSupport::isRunningLayoutTest()) { |
| 62 // Match Linux spin button style in layout tests. | 62 // Match Linux spin button style in layout tests. |
| 63 // FIXME: Consider removing the conditional if a future Android theme matche
s this. | 63 // FIXME: Consider removing the conditional if a future Android theme |
| 64 // matches this. |
| 64 IntSize size = Platform::current()->themeEngine()->getSize( | 65 IntSize size = Platform::current()->themeEngine()->getSize( |
| 65 WebThemeEngine::PartInnerSpinButton); | 66 WebThemeEngine::PartInnerSpinButton); |
| 66 | 67 |
| 67 style.setWidth(Length(size.width(), Fixed)); | 68 style.setWidth(Length(size.width(), Fixed)); |
| 68 style.setMinWidth(Length(size.width(), Fixed)); | 69 style.setMinWidth(Length(size.width(), Fixed)); |
| 69 } | 70 } |
| 70 } | 71 } |
| 71 | 72 |
| 72 bool LayoutThemeMobile::shouldUseFallbackTheme( | 73 bool LayoutThemeMobile::shouldUseFallbackTheme( |
| 73 const ComputedStyle& style) const { | 74 const ComputedStyle& style) const { |
| 74 #if OS(MACOSX) | 75 #if OS(MACOSX) |
| 75 // Mac WebThemeEngine cannot handle these controls. | 76 // Mac WebThemeEngine cannot handle these controls. |
| 76 ControlPart part = style.appearance(); | 77 ControlPart part = style.appearance(); |
| 77 if (part == CheckboxPart || part == RadioPart) | 78 if (part == CheckboxPart || part == RadioPart) |
| 78 return true; | 79 return true; |
| 79 #endif | 80 #endif |
| 80 return LayoutThemeDefault::shouldUseFallbackTheme(style); | 81 return LayoutThemeDefault::shouldUseFallbackTheme(style); |
| 81 } | 82 } |
| 82 | 83 |
| 83 } // namespace blink | 84 } // namespace blink |
| OLD | NEW |