Diff
Modified: trunk/Source/WebCore/ChangeLog (207425 => 207426)
--- trunk/Source/WebCore/ChangeLog 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebCore/ChangeLog 2016-10-17 20:38:46 UTC (rev 207426)
@@ -1,3 +1,32 @@
+2016-10-17 Chris Dumez <[email protected]>
+
+ Move form.reportValidity() behind InteractiveFormValidation setting
+ https://bugs.webkit.org/show_bug.cgi?id=163550
+
+ Reviewed by Darin Adler.
+
+ Move form.reportValidity() behind InteractiveFormValidation setting for consistency
+ given that the two features are strongly related.
+
+ Also enable the setting by default so we can get feedback on the implementation.
+
+ Demos:
+ - Interactive form validation: http://jsfiddle.net/tj_vantoll/HdSqt/
+ - Report validity: https://googlechrome.github.io/samples/report-validity/
+
+ * bindings/generic/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setInteractiveFormValidationEnabled):
+ (WebCore::RuntimeEnabledFeatures::interactiveFormValidationEnabled):
+ * html/HTMLButtonElement.idl:
+ * html/HTMLFieldSetElement.idl:
+ * html/HTMLFormElement.idl:
+ * html/HTMLInputElement.idl:
+ * html/HTMLKeygenElement.idl:
+ * html/HTMLObjectElement.idl:
+ * html/HTMLOutputElement.idl:
+ * html/HTMLSelectElement.idl:
+ * html/HTMLTextAreaElement.idl:
+
2016-10-17 Antoine Quint <[email protected]>
[Modern Media Controls] Add a MediaControlsHost API to retrieve images as base64
Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (207425 => 207426)
--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h 2016-10-17 20:38:46 UTC (rev 207426)
@@ -198,6 +198,9 @@
void setShadowDOMEnabled(bool isEnabled) { m_isShadowDOMEnabled = isEnabled; }
bool shadowDOMEnabled() const { return m_isShadowDOMEnabled; }
+ void setInteractiveFormValidationEnabled(bool isEnabled) { m_isInteractiveFormValidationEnabled = isEnabled; }
+ bool interactiveFormValidationEnabled() const { return m_isInteractiveFormValidationEnabled; }
+
#if ENABLE(CUSTOM_ELEMENTS)
void setCustomElementsEnabled(bool areEnabled) { m_areCustomElementsEnabled = areEnabled; }
bool customElementsEnabled() const { return m_areCustomElementsEnabled; }
@@ -318,6 +321,8 @@
bool m_isShadowDOMEnabled;
+ bool m_isInteractiveFormValidationEnabled { false };
+
#if ENABLE(CUSTOM_ELEMENTS)
bool m_areCustomElementsEnabled;
#endif
Modified: trunk/Source/WebCore/html/HTMLButtonElement.idl (207425 => 207426)
--- trunk/Source/WebCore/html/HTMLButtonElement.idl 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebCore/html/HTMLButtonElement.idl 2016-10-17 20:38:46 UTC (rev 207426)
@@ -37,7 +37,7 @@
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
- boolean reportValidity();
+ [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
void setCustomValidity(DOMString? error);
readonly attribute NodeList labels;
Modified: trunk/Source/WebCore/html/HTMLFieldSetElement.idl (207425 => 207426)
--- trunk/Source/WebCore/html/HTMLFieldSetElement.idl 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebCore/html/HTMLFieldSetElement.idl 2016-10-17 20:38:46 UTC (rev 207426)
@@ -30,6 +30,6 @@
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
- boolean reportValidity();
+ [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
void setCustomValidity(DOMString? error);
};
Modified: trunk/Source/WebCore/html/HTMLFormElement.idl (207425 => 207426)
--- trunk/Source/WebCore/html/HTMLFormElement.idl 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebCore/html/HTMLFormElement.idl 2016-10-17 20:38:46 UTC (rev 207426)
@@ -47,7 +47,7 @@
[ImplementedAs=submitFromJavaScript] void submit();
void reset();
boolean checkValidity();
- boolean reportValidity();
+ [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
[Conditional=REQUEST_AUTOCOMPLETE] void requestAutocomplete();
};
Modified: trunk/Source/WebCore/html/HTMLInputElement.idl (207425 => 207426)
--- trunk/Source/WebCore/html/HTMLInputElement.idl 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebCore/html/HTMLInputElement.idl 2016-10-17 20:38:46 UTC (rev 207426)
@@ -71,7 +71,7 @@
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
- boolean reportValidity();
+ [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
void setCustomValidity(DOMString? error);
readonly attribute NodeList labels;
Modified: trunk/Source/WebCore/html/HTMLKeygenElement.idl (207425 => 207426)
--- trunk/Source/WebCore/html/HTMLKeygenElement.idl 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebCore/html/HTMLKeygenElement.idl 2016-10-17 20:38:46 UTC (rev 207426)
@@ -42,7 +42,7 @@
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
- boolean reportValidity();
+ [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
void setCustomValidity(DOMString? error);
readonly attribute NodeList labels;
Modified: trunk/Source/WebCore/html/HTMLObjectElement.idl (207425 => 207426)
--- trunk/Source/WebCore/html/HTMLObjectElement.idl 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebCore/html/HTMLObjectElement.idl 2016-10-17 20:38:46 UTC (rev 207426)
@@ -44,7 +44,7 @@
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
- boolean reportValidity();
+ [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
void setCustomValidity(DOMString? error);
// Introduced in DOM Level 2:
Modified: trunk/Source/WebCore/html/HTMLOutputElement.idl (207425 => 207426)
--- trunk/Source/WebCore/html/HTMLOutputElement.idl 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebCore/html/HTMLOutputElement.idl 2016-10-17 20:38:46 UTC (rev 207426)
@@ -36,7 +36,7 @@
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
- boolean reportValidity();
+ [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
void setCustomValidity(DOMString? error);
readonly attribute NodeList labels;
Modified: trunk/Source/WebCore/html/HTMLSelectElement.idl (207425 => 207426)
--- trunk/Source/WebCore/html/HTMLSelectElement.idl 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebCore/html/HTMLSelectElement.idl 2016-10-17 20:38:46 UTC (rev 207426)
@@ -59,7 +59,7 @@
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
- boolean reportValidity();
+ [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
void setCustomValidity(DOMString? error); // FIXME: Argument should not be nullable.
readonly attribute NodeList labels;
Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.idl (207425 => 207426)
--- trunk/Source/WebCore/html/HTMLTextAreaElement.idl 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.idl 2016-10-17 20:38:46 UTC (rev 207426)
@@ -43,7 +43,7 @@
readonly attribute ValidityState validity;
readonly attribute DOMString validationMessage;
boolean checkValidity();
- boolean reportValidity();
+ [EnabledAtRuntime=InteractiveFormValidation] boolean reportValidity();
void setCustomValidity(DOMString? error);
readonly attribute NodeList labels;
Modified: trunk/Source/WebKit/mac/ChangeLog (207425 => 207426)
--- trunk/Source/WebKit/mac/ChangeLog 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebKit/mac/ChangeLog 2016-10-17 20:38:46 UTC (rev 207426)
@@ -1,3 +1,18 @@
+2016-10-17 Chris Dumez <[email protected]>
+
+ Move form.reportValidity() behind InteractiveFormValidation setting
+ https://bugs.webkit.org/show_bug.cgi?id=163550
+
+ Reviewed by Darin Adler.
+
+ Enable InteractiveFormValidation setting by default and link it to
+ RuntimeEnabledFeatures so we can use it in the IDL.
+
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+ * WebView/WebViewData.mm:
+ (-[WebViewPrivate init]):
+
2016-10-17 Anders Carlsson <[email protected]>
Fix iOS build.
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (207425 => 207426)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2016-10-17 20:38:46 UTC (rev 207426)
@@ -2537,6 +2537,8 @@
RuntimeEnabledFeatures::sharedFeatures().setShadowDOMEnabled([preferences shadowDOMEnabled]);
+ RuntimeEnabledFeatures::sharedFeatures().setInteractiveFormValidationEnabled([self interactiveFormValidationEnabled]);
+
RuntimeEnabledFeatures::sharedFeatures().setDOMIteratorEnabled([preferences DOMIteratorEnabled]);
RuntimeEnabledFeatures::sharedFeatures().setModernMediaControlsEnabled([preferences modernMediaControlsEnabled]);
Modified: trunk/Source/WebKit/mac/WebView/WebViewData.mm (207425 => 207426)
--- trunk/Source/WebKit/mac/WebView/WebViewData.mm 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebKit/mac/WebView/WebViewData.mm 2016-10-17 20:38:46 UTC (rev 207426)
@@ -143,7 +143,7 @@
zoomMultiplier = 1;
zoomsTextOnly = NO;
- interactiveFormValidationEnabled = NO;
+ interactiveFormValidationEnabled = YES;
// The default value should be synchronized with WebCore/page/Settings.cpp.
validationMessageTimerMagnification = 50;
Modified: trunk/Source/WebKit2/ChangeLog (207425 => 207426)
--- trunk/Source/WebKit2/ChangeLog 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebKit2/ChangeLog 2016-10-17 20:38:46 UTC (rev 207426)
@@ -1,3 +1,17 @@
+2016-10-17 Chris Dumez <[email protected]>
+
+ Move form.reportValidity() behind InteractiveFormValidation setting
+ https://bugs.webkit.org/show_bug.cgi?id=163550
+
+ Reviewed by Darin Adler.
+
+ Enable InteractiveFormValidation setting by default and link it to
+ RuntimeEnabledFeatures so we can use it in the IDL.
+
+ * UIProcess/API/C/WKPreferencesRefPrivate.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
2016-10-17 Gavin Barraclough <[email protected]>
UIProcess should determine throttle state for WebContent process
Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (207425 => 207426)
--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2016-10-17 20:38:46 UTC (rev 207426)
@@ -179,7 +179,7 @@
macro(AsynchronousPluginInitializationEnabledForAllPlugins, asynchronousPluginInitializationEnabledForAllPlugins, Bool, bool, false, "", "") \
macro(ArtificialPluginInitializationDelayEnabled, artificialPluginInitializationDelayEnabled, Bool, bool, false, "", "") \
macro(TabToLinksEnabled, tabToLinksEnabled, Bool, bool, false, "", "") \
- macro(InteractiveFormValidationEnabled, interactiveFormValidationEnabled, Bool, bool, false, "", "") \
+ macro(InteractiveFormValidationEnabled, interactiveFormValidationEnabled, Bool, bool, true, "", "") \
macro(ScrollingPerformanceLoggingEnabled, scrollingPerformanceLoggingEnabled, Bool, bool, false, "", "") \
macro(ScrollAnimatorEnabled, scrollAnimatorEnabled, Bool, bool, DEFAULT_WEBKIT_SCROLL_ANIMATOR_ENABLED, "", "") \
macro(ForceUpdateScrollbarsOnMainThreadForPerformanceTesting, forceUpdateScrollbarsOnMainThreadForPerformanceTesting, Bool, bool, false, "", "") \
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h (207425 => 207426)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h 2016-10-17 20:38:46 UTC (rev 207426)
@@ -243,7 +243,7 @@
WK_EXPORT void WKPreferencesSetTabToLinksEnabled(WKPreferencesRef preferencesRef, bool enabled);
WK_EXPORT bool WKPreferencesGetTabToLinksEnabled(WKPreferencesRef preferencesRef);
-// Defaults to false
+// Defaults to true
WK_EXPORT void WKPreferencesSetInteractiveFormValidationEnabled(WKPreferencesRef preferencesRef, bool enabled);
WK_EXPORT bool WKPreferencesGetInteractiveFormValidationEnabled(WKPreferencesRef preferencesRef);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (207425 => 207426)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-10-17 20:34:15 UTC (rev 207425)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2016-10-17 20:38:46 UTC (rev 207426)
@@ -3197,6 +3197,8 @@
RuntimeEnabledFeatures::sharedFeatures().setShadowDOMEnabled(store.getBoolValueForKey(WebPreferencesKey::shadowDOMEnabledKey()));
+ RuntimeEnabledFeatures::sharedFeatures().setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
+
RuntimeEnabledFeatures::sharedFeatures().setDOMIteratorEnabled(store.getBoolValueForKey(WebPreferencesKey::domIteratorEnabledKey()));
// Experimental Features.