REGRESSION(r222507): Composition highlight doesn't render when using IME
[WebKit-https.git] / Tools / WebKitTestRunner / InjectedBundle / TextInputController.cpp
index ae737fdc1fa4621da96b1c5632a589b360057f5d..3366c70af1d963e0366a6a98fe118ab60b4d64bb 100644 (file)
@@ -34,9 +34,9 @@
 
 namespace WTR {
 
-PassRefPtr<TextInputController> TextInputController::create()
+Ref<TextInputController> TextInputController::create()
 {
-    return adoptRef(new TextInputController);
+    return adoptRef(*new TextInputController);
 }
 
 TextInputController::TextInputController()
@@ -57,24 +57,24 @@ void TextInputController::makeWindowObject(JSContextRef context, JSObjectRef win
     setProperty(context, windowObject, "textInputController", this, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete, exception);
 }
 
-void TextInputController::setMarkedText(JSStringRef text, int from, int length)
+void TextInputController::setMarkedText(JSStringRef text, int from, int length, bool suppressUnderline)
 {
-    WKBundlePageSetComposition(InjectedBundle::shared().page()->page(), toWK(text).get(), from, length);
+    WKBundlePageSetComposition(InjectedBundle::singleton().page()->page(), toWK(text).get(), from, length, suppressUnderline);
 }
 
 bool TextInputController::hasMarkedText()
 {
-    return WKBundlePageHasComposition(InjectedBundle::shared().page()->page());
+    return WKBundlePageHasComposition(InjectedBundle::singleton().page()->page());
 }
 
 void TextInputController::unmarkText()
 {
-    WKBundlePageConfirmComposition(InjectedBundle::shared().page()->page());
+    WKBundlePageConfirmComposition(InjectedBundle::singleton().page()->page());
 }
 
 void TextInputController::insertText(JSStringRef text)
 {
-    WKBundlePageConfirmCompositionWithText(InjectedBundle::shared().page()->page(), toWK(text).get());
+    WKBundlePageConfirmCompositionWithText(InjectedBundle::singleton().page()->page(), toWK(text).get());
 }
 
 } // namespace WTR