Пример #1
0
static char*
_dumpFramesAsText(LayoutTestController* controller, WebCore::Frame* in_core_frame, bool is_main_frame)
{
    WTF::String result("");

    // Add header for all but the main frame.

    WebCore::FrameView* view = in_core_frame->view();

    if (view && view->layoutPending())
        view->layout();

    WebCore::Element* document_element = in_core_frame->document()->documentElement();
    WTF::String inner_text = document_element->innerText();

    if (!is_main_frame) {
        WTF::String frame_name(in_core_frame->tree().name());
        result.append("\n--------\nFrame: '");
        result.append(frame_name);
        result.append("'\n--------\n");
    }
    result.append(inner_text);
    result.append("\n");

    if (controller->dumpChildFramesAsText()) {
        for (WebCore::Frame* child = in_core_frame->tree().firstChild(); child; child = child->tree().nextSibling()) {
            char* tmp = _dumpFramesAsText(controller, child, false);
            result.append(tmp);
            free(tmp);
        }
    }

    return strdup(result.utf8().data());
}
Пример #2
0
String DumpRenderTreeSupportEfl::renderTreeDump(Evas_Object* ewkFrame)
{
    DRT_SUPPORT_FRAME_GET_OR_RETURN(ewkFrame, frame, String());

    WebCore::FrameView *frameView = frame->view();

    if (frameView && frameView->layoutPending())
        frameView->layout();

    return WebCore::externalRepresentation(frame);
}
Пример #3
0
String DumpRenderTreeSupportEfl::renderTreeDump(Evas_Object* ewkFrame)
{
    WebCore::Frame* frame = EWKPrivate::coreFrame(ewkFrame);

    if (!frame)
        return String();

    WebCore::FrameView *frameView = frame->view();

    if (frameView && frameView->layoutPending())
        frameView->layout();

    return WebCore::externalRepresentation(frame);
}
Пример #4
0
char*
DumpRenderTreeWKC::dumpRenderTree(WKC::WKCWebFrame* frame)
{
    WKC::Frame* wkcframe = frame->core();
    WebCore::Frame* core_frame= wkcframe->priv().webcore();
    if (!core_frame)
        return strdup("");

    WebCore::FrameView* view = core_frame->view();

    if (view && view->layoutPending())
        view->layout();

    WTF::String string = WebCore::externalRepresentation(core_frame);
    return strdup(string.utf8().data());
}