bool DumpRenderTreeSupportEfl::compositionRange(Evas_Object* ewkView, int* start, int* length) { *start = *length = 0; WebCore::Page* page = EWKPrivate::corePage(ewkView); if (!page || !page->focusController() || !page->focusController()->focusedOrMainFrame()) return false; WebCore::Editor* editor = page->focusController()->focusedOrMainFrame()->editor(); if (!editor || !editor->hasComposition()) return false; *start = editor->compositionStart(); *length = editor->compositionEnd() - *start; return true; }
bool DumpRenderTreeSupportEfl::compositionRange(Evas_Object* ewkView, int* start, int* length) { *start = *length = 0; DRT_SUPPRT_PAGE_GET_OR_RETURN(ewkView, page, false); if (!page->focusController() || !page->focusController()->focusedOrMainFrame()) return false; WebCore::Editor* editor = page->focusController()->focusedOrMainFrame()->editor(); if (!editor || !editor->hasComposition()) return false; *start = editor->compositionStart(); *length = editor->compositionEnd() - *start; return true; }