Пример #1
0
static void webkit_web_inspector_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
{
    WebKitWebInspector* web_inspector = WEBKIT_WEB_INSPECTOR(object);
    WebKitWebInspectorPrivate* priv = web_inspector->priv;

    switch(prop_id) {
    case PROP_JAVASCRIPT_PROFILING_ENABLED: {
        bool enabled = g_value_get_boolean(value);
        WebCore::InspectorController* controller = priv->page->inspectorController();
        if (enabled)
            controller->enableProfiler();
        else
            controller->disableProfiler();
        break;
    }
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
        break;
    }
}
Пример #2
0
void ewk_paint_context_paint_contents(Ewk_Paint_Context* context, WebCore::FrameView* view, const Eina_Rectangle* area)
{
    EINA_SAFETY_ON_NULL_RETURN(context);
    EINA_SAFETY_ON_NULL_RETURN(view);
    EINA_SAFETY_ON_NULL_RETURN(area);

    WebCore::IntRect paintArea(*area);

    if (view->isTransparent())
        context->graphicContext->clearRect(paintArea);
    view->paintContents(context->graphicContext.get(), paintArea);

#if ENABLE(INSPECTOR)
    WebCore::Page* page = view->frame()->page();
    if (page) {
        WebCore::InspectorController* controller = page->inspectorController();
        if (controller->highlightedNode())
            controller->drawHighlight(*context->graphicContext);
    }
#endif
}
Пример #3
0
static void webkit_web_inspector_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec* pspec)
{
    WebKitWebInspector* web_inspector = WEBKIT_WEB_INSPECTOR(object);
    WebKitWebInspectorPrivate* priv = web_inspector->priv;

    switch(prop_id) {
    case PROP_JAVASCRIPT_PROFILING_ENABLED: {
#if ENABLE(JAVASCRIPT_DEBUGGER)
        bool enabled = g_value_get_boolean(value);
        WebCore::InspectorController* controller = priv->page->inspectorController();
        if (enabled)
            controller->enableProfiler();
        else
            controller->disableProfiler();
#else
        g_message("PROP_JAVASCRIPT_PROFILING_ENABLED is not work because of the javascript debugger is disabled\n");
#endif
        break;
    }
    case PROP_TIMELINE_PROFILING_ENABLED: {
        bool enabled = g_value_get_boolean(value);
        WebCore::InspectorController* controller = priv->page->inspectorController();
        if (enabled)
            controller->startTimelineProfiler();
        else
            controller->stopTimelineProfiler();
        break;
    }
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
        break;
    }
}