Follow-up: iOS: Updating input mode should update the software keyboard
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Jan 2019 17:38:40 +0000 (17:38 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Jan 2019 17:38:40 +0000 (17:38 +0000)
<https://bugs.webkit.org/show_bug.cgi?id=193565>
<rdar://problem/47376334>

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::focusedElementDidChangeInputMode): Fix iOS
Debug builds after r240199 by downcasting `element` to
`HTMLElement` before calling canonicalInputMode().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240203 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/WebPage.cpp

index 62eb994..3404db1 100644 (file)
@@ -1,5 +1,16 @@
 2019-01-19  David Kilzer  <ddkilzer@apple.com>
 
+        Follow-up: iOS: Updating input mode should update the software keyboard
+        <https://bugs.webkit.org/show_bug.cgi?id=193565>
+        <rdar://problem/47376334>
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::focusedElementDidChangeInputMode): Fix iOS
+        Debug builds after r240199 by downcasting `element` to
+        `HTMLElement` before calling canonicalInputMode().
+
+2019-01-19  David Kilzer  <ddkilzer@apple.com>
+
         Sort WebKit Xcode project file
 
         * WebKit.xcodeproj/project.pbxproj:
index 26ec534..5e2d521 100644 (file)
@@ -5365,7 +5365,8 @@ void WebPage::focusedElementDidChangeInputMode(WebCore::Element& element, WebCor
 {
 #if PLATFORM(IOS_FAMILY)
     ASSERT(m_focusedElement == &element);
-    ASSERT(element.canonicalInputMode() == mode);
+    ASSERT(is<HTMLElement>(element));
+    ASSERT(downcast<HTMLElement>(element).canonicalInputMode() == mode);
 
     if (!is<HTMLTextAreaElement>(*m_focusedElement) && !is<HTMLInputElement>(*m_focusedElement) && !m_focusedElement->hasEditableStyle())
         return;