Title: [114101] trunk/Source
- Revision
- 114101
- Author
- tk...@chromium.org
- Date
- 2012-04-13 02:15:27 -0700 (Fri, 13 Apr 2012)
Log Message
Add a runtime flag for <input type=date>
https://bugs.webkit.org/show_bug.cgi?id=83853
Reviewed by Adam Barth.
Source/WebCore:
* bindings/generic/RuntimeEnabledFeatures.cpp:
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled): Added.
(WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled): Added.
* html/InputType.cpp:
(WebCore::createInputTypeFactoryMap):
Don't register type=date if !RuntimeEnabledFeatures::inputTypeDateEnabled()
Source/WebKit/chromium:
* public/WebRuntimeFeatures.h:
(WebRuntimeFeatures): Add enableInputTypeDate() and isInputTypeDateEnabled().
* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enableInputTypeDate): Added.
(WebKit::WebRuntimeFeatures::isInputTypeDateEnabled): Added.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (114100 => 114101)
--- trunk/Source/WebCore/ChangeLog 2012-04-13 09:12:58 UTC (rev 114100)
+++ trunk/Source/WebCore/ChangeLog 2012-04-13 09:15:27 UTC (rev 114101)
@@ -1,3 +1,18 @@
+2012-04-13 Kent Tamura <tk...@chromium.org>
+
+ Add a runtime flag for <input type=date>
+ https://bugs.webkit.org/show_bug.cgi?id=83853
+
+ Reviewed by Adam Barth.
+
+ * bindings/generic/RuntimeEnabledFeatures.cpp:
+ * bindings/generic/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled): Added.
+ (WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled): Added.
+ * html/InputType.cpp:
+ (WebCore::createInputTypeFactoryMap):
+ Don't register type=date if !RuntimeEnabledFeatures::inputTypeDateEnabled()
+
2012-04-13 Adam Barth <aba...@webkit.org>
JSDocument::setLocation does too much bare-handed lifting
Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp (114100 => 114101)
--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp 2012-04-13 09:12:58 UTC (rev 114100)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp 2012-04-13 09:15:27 UTC (rev 114101)
@@ -197,4 +197,8 @@
bool RuntimeEnabledFeatures::isStyleScopedEnabled = false;
#endif
+#if ENABLE(INPUT_TYPE_DATE)
+bool RuntimeEnabledFeatures::isInputTypeDateEnabled = true;
+#endif
+
} // namespace WebCore
Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (114100 => 114101)
--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h 2012-04-13 09:12:58 UTC (rev 114100)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h 2012-04-13 09:15:27 UTC (rev 114101)
@@ -228,6 +228,11 @@
static void setStyleScopedEnabled(bool isEnabled) { isStyleScopedEnabled = isEnabled; }
#endif
+#if ENABLE(INPUT_TYPE_DATE)
+ static bool inputTypeDateEnabled() { return isInputTypeDateEnabled; }
+ static void setInputTypeDateEnabled(bool isEnabled) { isInputTypeDateEnabled = isEnabled; }
+#endif
+
private:
// Never instantiate.
RuntimeEnabledFeatures() { }
@@ -300,6 +305,10 @@
#if ENABLE(STYLE_SCOPED)
static bool isStyleScopedEnabled;
#endif
+
+#if ENABLE(INPUT_TYPE_DATE)
+ static bool isInputTypeDateEnabled;
+#endif
};
} // namespace WebCore
Modified: trunk/Source/WebCore/html/InputType.cpp (114100 => 114101)
--- trunk/Source/WebCore/html/InputType.cpp 2012-04-13 09:12:58 UTC (rev 114100)
+++ trunk/Source/WebCore/html/InputType.cpp 2012-04-13 09:15:27 UTC (rev 114101)
@@ -55,6 +55,7 @@
#include "RegularExpression.h"
#include "RenderObject.h"
#include "ResetInputType.h"
+#include "RuntimeEnabledFeatures.h"
#include "SearchInputType.h"
#include "ShadowRoot.h"
#include "ShadowTree.h"
@@ -86,7 +87,8 @@
map->add(InputTypeNames::color(), ColorInputType::create);
#endif
#if ENABLE(INPUT_TYPE_DATE)
- map->add(InputTypeNames::date(), DateInputType::create);
+ if (RuntimeEnabledFeatures::inputTypeDateEnabled())
+ map->add(InputTypeNames::date(), DateInputType::create);
#endif
#if ENABLE(INPUT_TYPE_DATETIME)
map->add(InputTypeNames::datetime(), DateTimeInputType::create);
Modified: trunk/Source/WebKit/chromium/ChangeLog (114100 => 114101)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-04-13 09:12:58 UTC (rev 114100)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-04-13 09:15:27 UTC (rev 114101)
@@ -1,3 +1,16 @@
+2012-04-13 Kent Tamura <tk...@chromium.org>
+
+ Add a runtime flag for <input type=date>
+ https://bugs.webkit.org/show_bug.cgi?id=83853
+
+ Reviewed by Adam Barth.
+
+ * public/WebRuntimeFeatures.h:
+ (WebRuntimeFeatures): Add enableInputTypeDate() and isInputTypeDateEnabled().
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableInputTypeDate): Added.
+ (WebKit::WebRuntimeFeatures::isInputTypeDateEnabled): Added.
+
2012-04-13 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed. Rolled DEPS.
Modified: trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h (114100 => 114101)
--- trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h 2012-04-13 09:12:58 UTC (rev 114100)
+++ trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h 2012-04-13 09:15:27 UTC (rev 114101)
@@ -133,6 +133,9 @@
WEBKIT_EXPORT static void enableStyleScoped(bool);
WEBKIT_EXPORT static bool isStyleScopedEnabled();
+ WEBKIT_EXPORT static void enableInputTypeDate(bool);
+ WEBKIT_EXPORT static bool isInputTypeDateEnabled();
+
private:
WebRuntimeFeatures();
};
Modified: trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp (114100 => 114101)
--- trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp 2012-04-13 09:12:58 UTC (rev 114100)
+++ trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp 2012-04-13 09:15:27 UTC (rev 114101)
@@ -502,5 +502,22 @@
#endif
}
+void WebRuntimeFeatures::enableInputTypeDate(bool enable)
+{
+#if ENABLE(INPUT_TYPE_DATE)
+ RuntimeEnabledFeatures::setInputTypeDateEnabled(enable);
+#else
+ UNUSED_PARAM(enable);
+#endif
+}
+bool WebRuntimeFeatures::isInputTypeDateEnabled()
+{
+#if ENABLE(INPUT_TYPE_DATE)
+ return RuntimeEnabledFeatures::inputTypeDateEnabled();
+#else
+ return false;
+#endif
+}
+
} // namespace WebKit
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes