- Revision
- 203427
- Author
- [email protected]
- Date
- 2016-07-19 15:55:21 -0700 (Tue, 19 Jul 2016)
Log Message
autocapitalize attribute should not use [TreatNullAs=LegacyNullString]
https://bugs.webkit.org/show_bug.cgi?id=159934
Reviewed by Benjamin Poulain.
Source/WebCore:
autocapitalize attribute should not use [TreatNullAs=LegacyNullString]. This is
non-standard and we want to drop support for it from the bindings generator.
Instead, use [TreatNullAs=EmptyString] in order to maintain existing behavior
given that both a missing/empty attribute result in using the default
autocapitalization mode and that autocapitalize returns the empty string by
default.
Test: platform/ios-simulator/ios/fast/forms/autocapitalize-null.html
* html/HTMLFormElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLTextAreaElement.idl:
LayoutTests:
Add layout test coverage.
* platform/ios-simulator/ios/fast/forms/autocapitalize-null-expected.txt: Added.
* platform/ios-simulator/ios/fast/forms/autocapitalize-null.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (203426 => 203427)
--- trunk/LayoutTests/ChangeLog 2016-07-19 22:51:13 UTC (rev 203426)
+++ trunk/LayoutTests/ChangeLog 2016-07-19 22:55:21 UTC (rev 203427)
@@ -1,3 +1,15 @@
+2016-07-19 Chris Dumez <[email protected]>
+
+ autocapitalize attribute should not use [TreatNullAs=LegacyNullString]
+ https://bugs.webkit.org/show_bug.cgi?id=159934
+
+ Reviewed by Benjamin Poulain.
+
+ Add layout test coverage.
+
+ * platform/ios-simulator/ios/fast/forms/autocapitalize-null-expected.txt: Added.
+ * platform/ios-simulator/ios/fast/forms/autocapitalize-null.html: Added.
+
2016-07-19 George Ruan <[email protected]>
HTMLVideoElement frames do not update on iOS when src is a MediaStream blob
Added: trunk/LayoutTests/platform/ios-simulator/ios/fast/forms/autocapitalize-null-expected.txt (0 => 203427)
--- trunk/LayoutTests/platform/ios-simulator/ios/fast/forms/autocapitalize-null-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/ios/fast/forms/autocapitalize-null-expected.txt 2016-07-19 22:55:21 UTC (rev 203427)
@@ -0,0 +1,21 @@
+Test null handling on the autocapitalize attribute
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS form.getAttribute('autocapitalize') is null
+form.autocapitalize = null
+PASS form.getAttribute('autocapitalize') is ""
+PASS form.autocapitalize is ""
+PASS input.getAttribute('autocapitalize') is null
+input.autocapitalize = null
+PASS input.getAttribute('autocapitalize') is ""
+PASS input.autocapitalize is ""
+PASS textarea.getAttribute('autocapitalize') is null
+textarea.autocapitalize = null
+PASS textarea.getAttribute('autocapitalize') is ""
+PASS textarea.autocapitalize is ""
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/platform/ios-simulator/ios/fast/forms/autocapitalize-null.html (0 => 203427)
--- trunk/LayoutTests/platform/ios-simulator/ios/fast/forms/autocapitalize-null.html (rev 0)
+++ trunk/LayoutTests/platform/ios-simulator/ios/fast/forms/autocapitalize-null.html 2016-07-19 22:55:21 UTC (rev 203427)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script>
+description("Test null handling on the autocapitalize attribute");
+
+var form = document.createElement("form");
+shouldBeNull("form.getAttribute('autocapitalize')");
+evalAndLog("form.autocapitalize = null");
+shouldBeEqualToString("form.getAttribute('autocapitalize')", "");
+shouldBeEqualToString("form.autocapitalize", "");
+
+var input = document.createElement("input");
+shouldBeNull("input.getAttribute('autocapitalize')");
+evalAndLog("input.autocapitalize = null");
+shouldBeEqualToString("input.getAttribute('autocapitalize')", "");
+shouldBeEqualToString("input.autocapitalize", "");
+
+var textarea = document.createElement("textarea");
+shouldBeNull("textarea.getAttribute('autocapitalize')");
+evalAndLog("textarea.autocapitalize = null");
+shouldBeEqualToString("textarea.getAttribute('autocapitalize')", "");
+shouldBeEqualToString("textarea.autocapitalize", "");
+</script>
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (203426 => 203427)
--- trunk/Source/WebCore/ChangeLog 2016-07-19 22:51:13 UTC (rev 203426)
+++ trunk/Source/WebCore/ChangeLog 2016-07-19 22:55:21 UTC (rev 203427)
@@ -1,3 +1,24 @@
+2016-07-19 Chris Dumez <[email protected]>
+
+ autocapitalize attribute should not use [TreatNullAs=LegacyNullString]
+ https://bugs.webkit.org/show_bug.cgi?id=159934
+
+ Reviewed by Benjamin Poulain.
+
+ autocapitalize attribute should not use [TreatNullAs=LegacyNullString]. This is
+ non-standard and we want to drop support for it from the bindings generator.
+
+ Instead, use [TreatNullAs=EmptyString] in order to maintain existing behavior
+ given that both a missing/empty attribute result in using the default
+ autocapitalization mode and that autocapitalize returns the empty string by
+ default.
+
+ Test: platform/ios-simulator/ios/fast/forms/autocapitalize-null.html
+
+ * html/HTMLFormElement.idl:
+ * html/HTMLInputElement.idl:
+ * html/HTMLTextAreaElement.idl:
+
2016-07-19 Zalan Bujtas <[email protected]>
REGRESSION(r203415): ASSERTION FAILED: !m_layoutRoot->container() || !m_layoutRoot->container()->needsLayout()
Modified: trunk/Source/WebCore/html/HTMLFormElement.idl (203426 => 203427)
--- trunk/Source/WebCore/html/HTMLFormElement.idl 2016-07-19 22:51:13 UTC (rev 203426)
+++ trunk/Source/WebCore/html/HTMLFormElement.idl 2016-07-19 22:55:21 UTC (rev 203427)
@@ -45,8 +45,7 @@
[Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE] attribute boolean autocorrect;
- // FIXME: This should not use [TreatNullAs=LegacyNullString].
- [Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE, TreatNullAs=LegacyNullString] attribute DOMString autocapitalize;
+ [Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE, TreatNullAs=EmptyString] attribute DOMString autocapitalize;
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
[ImplementedAs=submitFromJavaScript] void submit();
Modified: trunk/Source/WebCore/html/HTMLInputElement.idl (203426 => 203427)
--- trunk/Source/WebCore/html/HTMLInputElement.idl 2016-07-19 22:51:13 UTC (rev 203426)
+++ trunk/Source/WebCore/html/HTMLInputElement.idl 2016-07-19 22:55:21 UTC (rev 203427)
@@ -126,8 +126,7 @@
[Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE] attribute boolean autocorrect;
- // FIXME: This should not use TreatNullAs=LegacyNullString.
- [Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE, TreatNullAs=LegacyNullString] attribute DOMString autocapitalize;
+ [Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE, TreatNullAs=EmptyString] attribute DOMString autocapitalize;
// See http://www.w3.org/TR/html-media-capture/
[Conditional=MEDIA_CAPTURE, Reflect] attribute boolean capture;
Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.idl (203426 => 203427)
--- trunk/Source/WebCore/html/HTMLTextAreaElement.idl 2016-07-19 22:51:13 UTC (rev 203426)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.idl 2016-07-19 22:55:21 UTC (rev 203427)
@@ -72,8 +72,7 @@
[Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE] attribute boolean autocorrect;
- // FIXME: This should not use [TreatNullAs=LegacyNullString].
- [Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE, TreatNullAs=LegacyNullString] attribute DOMString autocapitalize;
+ [Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE, TreatNullAs=EmptyString] attribute DOMString autocapitalize;
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
[Reflect] attribute DOMString accessKey;