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