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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 RenderTheme& RenderTheme::theme() | 51 RenderTheme& RenderTheme::theme() |
52 { | 52 { |
53 DEFINE_STATIC_REF(RenderTheme, renderTheme, (RenderThemeChromiumAndroid::cre
ate())); | 53 DEFINE_STATIC_REF(RenderTheme, renderTheme, (RenderThemeChromiumAndroid::cre
ate())); |
54 return *renderTheme; | 54 return *renderTheme; |
55 } | 55 } |
56 | 56 |
57 RenderThemeChromiumAndroid::~RenderThemeChromiumAndroid() | 57 RenderThemeChromiumAndroid::~RenderThemeChromiumAndroid() |
58 { | 58 { |
59 } | 59 } |
60 | 60 |
61 Color RenderThemeChromiumAndroid::systemColor(CSSValueID cssValueId) const | |
62 { | |
63 if (isRunningLayoutTest() && cssValueId == CSSValueButtonface) { | |
64 // Match Linux button color in layout tests. | |
65 static const Color linuxButtonGrayColor(0xffdddddd); | |
66 return linuxButtonGrayColor; | |
67 } | |
68 return RenderTheme::systemColor(cssValueId); | |
69 } | |
70 | |
71 String RenderThemeChromiumAndroid::extraMediaControlsStyleSheet() | 61 String RenderThemeChromiumAndroid::extraMediaControlsStyleSheet() |
72 { | 62 { |
73 return String(mediaControlsAndroidUserAgentStyleSheet, sizeof(mediaControlsA
ndroidUserAgentStyleSheet)); | 63 return String(mediaControlsAndroidUserAgentStyleSheet, sizeof(mediaControlsA
ndroidUserAgentStyleSheet)); |
74 } | 64 } |
75 | 65 |
76 String RenderThemeChromiumAndroid::extraDefaultStyleSheet() | 66 String RenderThemeChromiumAndroid::extraDefaultStyleSheet() |
77 { | 67 { |
78 return RenderThemeChromiumDefault::extraDefaultStyleSheet() + | 68 return RenderThemeChromiumDefault::extraDefaultStyleSheet() + |
79 String(themeChromiumAndroidUserAgentStyleSheet, sizeof(themeChromiumAndr
oidUserAgentStyleSheet)); | 69 String(themeChromiumAndroidUserAgentStyleSheet, sizeof(themeChromiumAndr
oidUserAgentStyleSheet)); |
80 } | 70 } |
(...skipping 17 matching lines...) Expand all Loading... |
98 | 88 |
99 int RenderThemeChromiumAndroid::menuListArrowPadding() const | 89 int RenderThemeChromiumAndroid::menuListArrowPadding() const |
100 { | 90 { |
101 // We cannot use the scrollbar thickness here, as it's width is 0 on Android
. | 91 // We cannot use the scrollbar thickness here, as it's width is 0 on Android
. |
102 // Instead, use the width of the scrollbar down arrow. | 92 // Instead, use the width of the scrollbar down arrow. |
103 IntSize scrollbarSize = blink::Platform::current()->themeEngine()->getSize(b
link::WebThemeEngine::PartScrollbarDownArrow); | 93 IntSize scrollbarSize = blink::Platform::current()->themeEngine()->getSize(b
link::WebThemeEngine::PartScrollbarDownArrow); |
104 return scrollbarSize.width(); | 94 return scrollbarSize.width(); |
105 } | 95 } |
106 | 96 |
107 } // namespace WebCore | 97 } // namespace WebCore |
OLD | NEW |