Title: [236439] trunk
Revision
236439
Author
[email protected]
Date
2018-09-24 16:10:01 -0700 (Mon, 24 Sep 2018)

Log Message

Release assert when using paper-textarea due to autocorrect IDL attribute missing CEReactions
https://bugs.webkit.org/show_bug.cgi?id=174629
<rdar://problem/33407620>

Reviewed by Simon Fraser.

Source/WebCore:

The bug was caused by autocorrect and autocapitalize IDL attributes missing CEReactions.

Test: fast/custom-elements/autocorrect-autocapitalize-idl-attributes-crash.html

* html/HTMLElement.idl:

LayoutTests:

Added a regression test for mutating autocorrect and autocapitalize IDL attributes during connected callback.

* fast/custom-elements/autocorrect-autocapitalize-idl-attributes-crash-expected.txt: Added.
* fast/custom-elements/autocorrect-autocapitalize-idl-attributes-crash.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (236438 => 236439)


--- trunk/LayoutTests/ChangeLog	2018-09-24 23:08:51 UTC (rev 236438)
+++ trunk/LayoutTests/ChangeLog	2018-09-24 23:10:01 UTC (rev 236439)
@@ -1,3 +1,16 @@
+2018-09-24  Ryosuke Niwa  <[email protected]>
+
+        Release assert when using paper-textarea due to autocorrect IDL attribute missing CEReactions
+        https://bugs.webkit.org/show_bug.cgi?id=174629
+        <rdar://problem/33407620>
+
+        Reviewed by Simon Fraser.
+
+        Added a regression test for mutating autocorrect and autocapitalize IDL attributes during connected callback.
+
+        * fast/custom-elements/autocorrect-autocapitalize-idl-attributes-crash-expected.txt: Added.
+        * fast/custom-elements/autocorrect-autocapitalize-idl-attributes-crash.html: Added.
+
 2018-09-24  Basuke Suzuki  <[email protected]>
 
         [Curl] Enable http/tests/misc tests.

Added: trunk/LayoutTests/fast/custom-elements/autocorrect-autocapitalize-idl-attributes-crash-expected.txt (0 => 236439)


--- trunk/LayoutTests/fast/custom-elements/autocorrect-autocapitalize-idl-attributes-crash-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/autocorrect-autocapitalize-idl-attributes-crash-expected.txt	2018-09-24 23:10:01 UTC (rev 236439)
@@ -0,0 +1,5 @@
+This tests mutating autocorrect and autocapitalize IDL attributes inside a connected callback.
+WebKit should not hit a release assertion.
+
+PASS
+

Added: trunk/LayoutTests/fast/custom-elements/autocorrect-autocapitalize-idl-attributes-crash.html (0 => 236439)


--- trunk/LayoutTests/fast/custom-elements/autocorrect-autocapitalize-idl-attributes-crash.html	                        (rev 0)
+++ trunk/LayoutTests/fast/custom-elements/autocorrect-autocapitalize-idl-attributes-crash.html	2018-09-24 23:10:01 UTC (rev 236439)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<body>
+<p>This tests mutating autocorrect and autocapitalize IDL attributes inside a connected callback.<br>
+WebKit should not hit a release assertion.</p>
+<div id="result">FAIL</div>
+<script>
+
+if (window.testRunner)
+    testRunner.dumpAsText();
+
+customElements.define('editor-element', class extends HTMLElement {
+    connectedCallback() {
+        this.autocorrect = true;
+        this.autocapitalize = true;
+        document.getElementById('result').textContent = 'PASS';
+    }
+})
+
+</script>
+<editor-element></editor-element>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (236438 => 236439)


--- trunk/Source/WebCore/ChangeLog	2018-09-24 23:08:51 UTC (rev 236438)
+++ trunk/Source/WebCore/ChangeLog	2018-09-24 23:10:01 UTC (rev 236439)
@@ -1,3 +1,17 @@
+2018-09-24  Ryosuke Niwa  <[email protected]>
+
+        Release assert when using paper-textarea due to autocorrect IDL attribute missing CEReactions
+        https://bugs.webkit.org/show_bug.cgi?id=174629
+        <rdar://problem/33407620>
+
+        Reviewed by Simon Fraser.
+
+        The bug was caused by autocorrect and autocapitalize IDL attributes missing CEReactions.
+
+        Test: fast/custom-elements/autocorrect-autocapitalize-idl-attributes-crash.html
+
+        * html/HTMLElement.idl:
+
 2018-09-24  Chris Dumez  <[email protected]>
 
         No-op document.open() calls should not have any side effects

Modified: trunk/Source/WebCore/html/HTMLElement.idl (236438 => 236439)


--- trunk/Source/WebCore/html/HTMLElement.idl	2018-09-24 23:08:51 UTC (rev 236438)
+++ trunk/Source/WebCore/html/HTMLElement.idl	2018-09-24 23:10:01 UTC (rev 236439)
@@ -62,8 +62,8 @@
     [CEReactions] attribute [TreatNullAs=EmptyString] DOMString outerText;
 
     // iOS autocorrect / autocapitalization extensions.
-    [Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE] attribute boolean autocorrect;
-    [Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE] attribute [TreatNullAs=EmptyString] DOMString autocapitalize;
+    [Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE, CEReactions] attribute boolean autocorrect;
+    [Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE, CEReactions] attribute [TreatNullAs=EmptyString] DOMString autocapitalize;
 
     // FIXME: We are the only browser to support this now that Blink dropped it (http://crbug.com/688943).
     [CEReactions, Reflect] attribute DOMString webkitdropzone;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to