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..6d8b8e2af26d96be46a9e2bcd5f748d4db6df328 100644 |
| --- a/Source/core/rendering/RenderTheme.cpp |
| +++ b/Source/core/rendering/RenderTheme.cpp |
| @@ -24,11 +24,17 @@ |
| #include "CSSValueKeywords.h" |
| #include "HTMLNames.h" |
| +#include "RuntimeEnabledFeatures.h" |
| #include "core/dom/Document.h" |
| +#include "core/dom/shadow/ElementShadow.h" |
| #include "core/editing/FrameSelection.h" |
| #include "core/fileapi/FileList.h" |
| +#include "core/html/HTMLCollection.h" |
| +#include "core/html/HTMLDataListElement.h" |
| #include "core/html/HTMLInputElement.h" |
| #include "core/html/HTMLMeterElement.h" |
| +#include "core/html/HTMLOptionElement.h" |
| +#include "core/html/parser/HTMLParserIdioms.h" |
| #include "core/html/shadow/MediaControlElements.h" |
| #include "core/html/shadow/SpinButtonElement.h" |
| #include "core/html/shadow/TextControlInnerElements.h" |
| @@ -51,14 +57,6 @@ |
| #include "core/rendering/RenderInputSpeech.h" |
| #endif |
| -#if ENABLE(DATALIST_ELEMENT) |
| -#include "core/dom/shadow/ElementShadow.h" |
| -#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. |
| namespace WebCore { |
| @@ -455,6 +453,22 @@ bool RenderTheme::paintDecorations(RenderObject* o, const PaintInfo& paintInfo, |
| return false; |
| } |
| +String RenderTheme::extraDefaultStyleSheet() |
| +{ |
| + static String dataListElementCSS = (RuntimeEnabledFeatures::dataListElementEnabled()) ? ASCIILiteral("datalist {display: none ;}") : ASCIILiteral(""); |
| + |
| +#if ENABLE(INPUT_TYPE_COLOR) |
| + StringBuilder inputTypeCSS; |
|
tkent
2013/05/22 00:40:38
This code block should be enabled only if the runt
|
| + inputTypeCSS.appendLiteral("input[type=\"color\"][list] { -webkit-appearance: menulist; width: 88px; height: 23px;}"); |
| + inputTypeCSS.appendLiteral("input[type=\"color\"][list]::-webkit-color-swatch-wrapper { padding-left: 8px; padding-right: 24px;}"); |
| + inputTypeCSS.appendLiteral("input[type=\"color\"][list]::-webkit-color-swatch { border-color: #000000;}"); |
| + inputTypeCSS.append(dataListElementCSS); |
| + return inputTypeCSS.toString(); |
| +#endif |
| + |
| + return dataListElementCSS; |
| +} |
| + |
| String RenderTheme::formatMediaControlsTime(float time) const |
| { |
| if (!std::isfinite(time)) |
| @@ -890,7 +904,6 @@ bool RenderTheme::paintMeter(RenderObject*, const PaintInfo&, const IntRect&) |
| return true; |
| } |
| -#if ENABLE(DATALIST_ELEMENT) |
| LayoutUnit RenderTheme::sliderTickSnappingThreshold() const |
| { |
| return 0; |
| @@ -977,7 +990,6 @@ void RenderTheme::paintSliderTicks(RenderObject* o, const PaintInfo& paintInfo, |
| paintInfo.context->fillRect(tickRect); |
| } |
| } |
| -#endif |
| double RenderTheme::animationRepeatIntervalForProgressBar(RenderProgress*) const |
| { |