Chromium Code Reviews| Index: Source/core/rendering/RenderTheme.cpp |
| diff --git a/Source/core/rendering/RenderTheme.cpp b/Source/core/rendering/RenderTheme.cpp |
| index 5f5a0e4994797e61db6de27fb76dcc8febd103e7..e63d89e907b94053b796ccca6a2956fb15152981 100644 |
| --- a/Source/core/rendering/RenderTheme.cpp |
| +++ b/Source/core/rendering/RenderTheme.cpp |
| @@ -24,6 +24,7 @@ |
| #include "CSSValueKeywords.h" |
| #include "HTMLNames.h" |
| +#include "RuntimeEnabledFeatures.h" |
| #include "core/dom/Document.h" |
| #include "core/editing/FrameSelection.h" |
| #include "core/fileapi/FileList.h" |
| @@ -51,13 +52,11 @@ |
| #include "core/rendering/RenderInputSpeech.h" |
| #endif |
| -#if ENABLE(DATALIST_ELEMENT) |
| #include "core/dom/shadow/ElementShadow.h" |
|
tkent
2013/05/21 21:05:44
Merge these #includes to the above block.
|
| #include "core/html/HTMLCollection.h" |
| #include "core/html/HTMLDataListElement.h" |
| #include "core/html/HTMLOptionElement.h" |
| #include "core/html/parser/HTMLParserIdioms.h" |
| -#endif |
| // The methods in this file are shared by all themes on every platform. |
| @@ -455,6 +454,22 @@ bool RenderTheme::paintDecorations(RenderObject* o, const PaintInfo& paintInfo, |
| return false; |
| } |
| +String RenderTheme::extraDefaultStyleSheet() |
| +{ |
| + static String datalistElementCss = (RuntimeEnabledFeatures::dataListElementEnabled) ? "datalist {display: none ;}" : ""; |
|
tkent
2013/05/21 21:05:44
Acronyms should be upper-case. So the variable na
|
| + |
| +#if defined(ENABLE_INPUT_TYPE_COLOR) && ENABLE_INPUT_TYPE_COLOR |
|
tkent
2013/05/21 21:05:44
#if ENABLE(INPUT_TYPE_COLOR)
|
| + StringBuilder inputTypeCss; |
|
tkent
2013/05/21 21:05:44
Css -> CSS
|
| + inputTypeCss.append("input[type=\"color\"][list] { -webkit-appearance: menulist; width: 88px; height: 23px;}"); |
| + inputTypeCss.append("input[type=\"color\"][list]::-webkit-color-swatch-wrapper { padding-left: 8px; padding-right: 24px;}"); |
| + inputTypeCss.append("input[type=\"color\"][list]::-webkit-color-swatch { border-color: #000000;}"); |
| + |
| + return datalistElementCss + inputTypeCss.toString(); |
|
tkent
2013/05/21 21:05:44
Because you already have a StringBuilder, use it.
|
| +#endif // defined(ENABLE_INPUT_TYPE_COLOR) && ENABLE_INPUT_TYPE_COLOR |
|
tkent
2013/05/21 21:05:44
This is a small #if block. I don't think we need a
|
| + |
| + return datalistElementCss; |
| +} |
| + |
| String RenderTheme::formatMediaControlsTime(float time) const |
| { |
| if (!std::isfinite(time)) |
| @@ -890,7 +905,6 @@ bool RenderTheme::paintMeter(RenderObject*, const PaintInfo&, const IntRect&) |
| return true; |
| } |
| -#if ENABLE(DATALIST_ELEMENT) |
| LayoutUnit RenderTheme::sliderTickSnappingThreshold() const |
| { |
| return 0; |
| @@ -977,7 +991,6 @@ void RenderTheme::paintSliderTicks(RenderObject* o, const PaintInfo& paintInfo, |
| paintInfo.context->fillRect(tickRect); |
| } |
| } |
| -#endif |
| double RenderTheme::animationRepeatIntervalForProgressBar(RenderProgress*) const |
| { |