Title: [197355] trunk
- Revision
- 197355
- Author
- [email protected]
- Date
- 2016-02-29 09:36:51 -0800 (Mon, 29 Feb 2016)
Log Message
Use HTML parsing rules for textarea.maxLength
https://bugs.webkit.org/show_bug.cgi?id=154805
Reviewed by Andreas Kling.
LayoutTests/imported/w3c:
Rebaseline now that more checks are passing.
* web-platform-tests/html/dom/reflection-forms-expected.txt:
Source/WebCore:
Use HTML parsing rules for textarea.maxLength:
- https://html.spec.whatwg.org/multipage/forms.html#dom-textarea-maxlength
- https://html.spec.whatwg.org/multipage/infrastructure.html#limited-to-only-non-negative-numbers
No new tests, already covered by existing test.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::maxLength):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (197354 => 197355)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-02-29 17:32:18 UTC (rev 197354)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-02-29 17:36:51 UTC (rev 197355)
@@ -1,5 +1,16 @@
2016-02-29 Chris Dumez <[email protected]>
+ Use HTML parsing rules for textarea.maxLength
+ https://bugs.webkit.org/show_bug.cgi?id=154805
+
+ Reviewed by Andreas Kling.
+
+ Rebaseline now that more checks are passing.
+
+ * web-platform-tests/html/dom/reflection-forms-expected.txt:
+
+2016-02-29 Chris Dumez <[email protected]>
+
Align td.rowSpan / td.colSpan with the specification
https://bugs.webkit.org/show_bug.cgi?id=154803
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt (197354 => 197355)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt 2016-02-29 17:32:18 UTC (rev 197354)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt 2016-02-29 17:36:51 UTC (rev 197355)
@@ -15175,7 +15175,7 @@
PASS textarea.maxLength: setAttribute() to "\t7" followed by getAttribute()
PASS textarea.maxLength: setAttribute() to "\t7" followed by IDL get
PASS textarea.maxLength: setAttribute() to "\v7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to "\v7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to "\v7" followed by IDL get
PASS textarea.maxLength: setAttribute() to "\f7" followed by getAttribute()
PASS textarea.maxLength: setAttribute() to "\f7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
@@ -15189,39 +15189,39 @@
PASS textarea.maxLength: setAttribute() to "\r7" followed by getAttribute()
PASS textarea.maxLength: setAttribute() to "\r7" followed by IDL get
PASS textarea.maxLength: setAttribute() to "
7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to "
7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to "
7" followed by IDL get
PASS textarea.maxLength: setAttribute() to "
7" followed by getAttribute()
PASS textarea.maxLength: setAttribute() to "
7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to " 7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to "7" followed by getAttribute()
PASS textarea.maxLength: setAttribute() to "7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to " 7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to " 7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to " 7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to " 7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to " 7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to " 7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to " 7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to " 7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to " 7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to " 7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to " 7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to " 7" followed by getAttribute()
-FAIL textarea.maxLength: setAttribute() to " 7" followed by IDL get assert_equals: expected -1 but got 7
+PASS textarea.maxLength: setAttribute() to " 7" followed by IDL get
PASS textarea.maxLength: setAttribute() to undefined followed by getAttribute()
PASS textarea.maxLength: setAttribute() to undefined followed by IDL get
PASS textarea.maxLength: setAttribute() to 1.5 followed by getAttribute()
Modified: trunk/Source/WebCore/ChangeLog (197354 => 197355)
--- trunk/Source/WebCore/ChangeLog 2016-02-29 17:32:18 UTC (rev 197354)
+++ trunk/Source/WebCore/ChangeLog 2016-02-29 17:36:51 UTC (rev 197355)
@@ -1,5 +1,21 @@
2016-02-29 Chris Dumez <[email protected]>
+ Use HTML parsing rules for textarea.maxLength
+ https://bugs.webkit.org/show_bug.cgi?id=154805
+
+ Reviewed by Andreas Kling.
+
+ Use HTML parsing rules for textarea.maxLength:
+ - https://html.spec.whatwg.org/multipage/forms.html#dom-textarea-maxlength
+ - https://html.spec.whatwg.org/multipage/infrastructure.html#limited-to-only-non-negative-numbers
+
+ No new tests, already covered by existing test.
+
+ * html/HTMLTextAreaElement.cpp:
+ (WebCore::HTMLTextAreaElement::maxLength):
+
+2016-02-29 Chris Dumez <[email protected]>
+
Align td.rowSpan / td.colSpan with the specification
https://bugs.webkit.org/show_bug.cgi?id=154803
Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.cpp (197354 => 197355)
--- trunk/Source/WebCore/html/HTMLTextAreaElement.cpp 2016-02-29 17:32:18 UTC (rev 197354)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.cpp 2016-02-29 17:36:51 UTC (rev 197355)
@@ -423,9 +423,10 @@
int HTMLTextAreaElement::maxLength() const
{
- bool ok;
- int value = fastGetAttribute(maxlengthAttr).string().toInt(&ok);
- return ok && value >= 0 ? value : -1;
+ unsigned result;
+ if (parseHTMLNonNegativeInteger(fastGetAttribute(maxlengthAttr), result))
+ return result;
+ return -1;
}
void HTMLTextAreaElement::setMaxLength(int newValue, ExceptionCode& ec)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes