REGRESSION(r218910): Crash inside textMarkerDataForFirstPositionInTextControl
https://bugs.webkit.org/show_bug.cgi?id=174077
<rdar://problem/33083972>
Reviewed by Chris Fleizach.
Source/WebCore:
The bug was caused by textMarkerDataForFirstPositionInTextControl assuming that
there is always a root editable element (a.k.a. editing host) in the text control.
When the text control is readonly or disabled, this is not the case.
Fixed the bug by adding an early exit when there is no editing host.
Test: accessibility/mac/input-type-change-crash.html
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
LayoutTests:
Added a regression test for changing the input element's type during editing.
* accessibility/mac/input-type-change-crash-expected.txt: Added.
* accessibility/mac/input-type-change-crash.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@219081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 33a1687..2cbfbc0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2017-07-02 Ryosuke Niwa <rniwa@webkit.org>
+
+ REGRESSION(r218910): Crash inside textMarkerDataForFirstPositionInTextControl
+ https://bugs.webkit.org/show_bug.cgi?id=174077
+ <rdar://problem/33083972>
+
+ Reviewed by Chris Fleizach.
+
+ Added a regression test for changing the input element's type during editing.
+
+ * accessibility/mac/input-type-change-crash-expected.txt: Added.
+ * accessibility/mac/input-type-change-crash.html: Added.
+
2017-07-03 Saam Barati <sbarati@apple.com>
Unreviewed. Mark workers/bomb.html as flaky.