Ejemplo n.º 1
0
void DumpRenderTreeSupportEfl::confirmComposition(Evas_Object* ewkView, const char* text)
{
    WebCore::Page* page = EWKPrivate::corePage(ewkView);
    if (!page || !page->focusController() || !page->focusController()->focusedOrMainFrame())
        return;

    WebCore::Editor* editor = page->focusController()->focusedOrMainFrame()->editor();
    if (!editor)
        return;

    if (!editor->hasComposition()) {
        editor->insertText(String::fromUTF8(text), 0);
        return;
    }

    if (text) {
        editor->confirmComposition(String::fromUTF8(text));
        return;
    }
    editor->confirmComposition();
}
Ejemplo n.º 2
0
void DumpRenderTreeSupportEfl::confirmComposition(Evas_Object* ewkView, const char* text)
{
    DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page);

    if (!page->focusController() || !page->focusController()->focusedOrMainFrame())
        return;

    WebCore::Editor* editor = page->focusController()->focusedOrMainFrame()->editor();
    if (!editor)
        return;

    if (!editor->hasComposition()) {
        editor->insertText(String::fromUTF8(text), 0);
        return;
    }

    if (text) {
        editor->confirmComposition(String::fromUTF8(text));
        return;
    }
    editor->confirmComposition();
}