| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 PassRefPtr<LayoutTheme> LayoutThemeMobile::create() | 43 PassRefPtr<LayoutTheme> LayoutThemeMobile::create() |
| 44 { | 44 { |
| 45 return adoptRef(new LayoutThemeMobile()); | 45 return adoptRef(new LayoutThemeMobile()); |
| 46 } | 46 } |
| 47 | 47 |
| 48 LayoutThemeMobile::~LayoutThemeMobile() | 48 LayoutThemeMobile::~LayoutThemeMobile() |
| 49 { | 49 { |
| 50 } | 50 } |
| 51 | 51 |
| 52 String LayoutThemeMobile::extraDefaultStyleSheet() |
| 53 { |
| 54 return LayoutThemeDefault::extraDefaultStyleSheet() + |
| 55 loadResourceAsASCIIString("themeChromiumLinux.css") + |
| 56 loadResourceAsASCIIString("themeChromiumAndroid.css"); |
| 57 |
| 58 } |
| 59 |
| 52 String LayoutThemeMobile::extraMediaControlsStyleSheet() | 60 String LayoutThemeMobile::extraMediaControlsStyleSheet() |
| 53 { | 61 { |
| 54 return loadResourceAsASCIIString( | 62 return loadResourceAsASCIIString( |
| 55 RuntimeEnabledFeatures::newMediaPlaybackUiEnabled() ? | 63 RuntimeEnabledFeatures::newMediaPlaybackUiEnabled() ? |
| 56 "mediaControlsAndroidNew.css" : "mediaControlsAndroid.css"); | 64 "mediaControlsAndroidNew.css" : "mediaControlsAndroid.css"); |
| 57 } | 65 } |
| 58 | 66 |
| 59 String LayoutThemeMobile::extraDefaultStyleSheet() | 67 String LayoutThemeMobile::extraFullscreenStyleSheet() |
| 60 { | 68 { |
| 61 return LayoutThemeDefault::extraDefaultStyleSheet() + | 69 return loadResourceAsASCIIString("fullscreenAndroid.css"); |
| 62 loadResourceAsASCIIString("themeChromiumLinux.css") + | |
| 63 loadResourceAsASCIIString("themeChromiumAndroid.css"); | |
| 64 | |
| 65 } | 70 } |
| 66 | 71 |
| 67 void LayoutThemeMobile::adjustInnerSpinButtonStyle(ComputedStyle& style) const | 72 void LayoutThemeMobile::adjustInnerSpinButtonStyle(ComputedStyle& style) const |
| 68 { | 73 { |
| 69 if (LayoutTestSupport::isRunningLayoutTest()) { | 74 if (LayoutTestSupport::isRunningLayoutTest()) { |
| 70 // Match Linux spin button style in layout tests. | 75 // Match Linux spin button style in layout tests. |
| 71 // FIXME: Consider removing the conditional if a future Android theme ma
tches this. | 76 // FIXME: Consider removing the conditional if a future Android theme ma
tches this. |
| 72 IntSize size = Platform::current()->themeEngine()->getSize(WebThemeEngin
e::PartInnerSpinButton); | 77 IntSize size = Platform::current()->themeEngine()->getSize(WebThemeEngin
e::PartInnerSpinButton); |
| 73 | 78 |
| 74 style.setWidth(Length(size.width(), Fixed)); | 79 style.setWidth(Length(size.width(), Fixed)); |
| 75 style.setMinWidth(Length(size.width(), Fixed)); | 80 style.setMinWidth(Length(size.width(), Fixed)); |
| 76 } | 81 } |
| 77 } | 82 } |
| 78 | 83 |
| 79 bool LayoutThemeMobile::shouldUseFallbackTheme(const ComputedStyle& style) const | 84 bool LayoutThemeMobile::shouldUseFallbackTheme(const ComputedStyle& style) const |
| 80 { | 85 { |
| 81 #if OS(MACOSX) | 86 #if OS(MACOSX) |
| 82 // Mac WebThemeEngine cannot handle these controls. | 87 // Mac WebThemeEngine cannot handle these controls. |
| 83 ControlPart part = style.appearance(); | 88 ControlPart part = style.appearance(); |
| 84 if (part == CheckboxPart || part == RadioPart) | 89 if (part == CheckboxPart || part == RadioPart) |
| 85 return true; | 90 return true; |
| 86 #endif | 91 #endif |
| 87 return LayoutThemeDefault::shouldUseFallbackTheme(style); | 92 return LayoutThemeDefault::shouldUseFallbackTheme(style); |
| 88 } | 93 } |
| 89 | 94 |
| 90 } // namespace blink | 95 } // namespace blink |
| OLD | NEW |