当前位置: 首页>>代码示例>>C++>>正文


C++ webcore::Page类代码示例

本文整理汇总了C++中webcore::Page的典型用法代码示例。如果您正苦于以下问题:C++ Page类的具体用法?C++ Page怎么用?C++ Page使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Page类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: setDefersLoading

void DumpRenderTreeSupportEfl::setDefersLoading(Evas_Object* ewkView, bool defers)
{
    WebCore::Page* page = EWKPrivate::corePage(ewkView);

    if (!page)
        return;

    page->setDefersLoading(defers);
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例2: findString

bool DumpRenderTreeSupportEfl::findString(const Evas_Object* ewkView, const char* text, WebCore::FindOptions options)
{
    WebCore::Page* page = EWKPrivate::corePage(ewkView);

    if (!page)
        return false;

    return page->findString(String::fromUTF8(text), options);
}
开发者ID:,项目名称:,代码行数:9,代码来源:

示例3: WKBundlePageStartMonitoringScrollOperations

void WKBundlePageStartMonitoringScrollOperations(WKBundlePageRef pageRef)
{
    WebKit::WebPage* webPage = toImpl(pageRef);
    WebCore::Page* page = webPage ? webPage->corePage() : nullptr;
    
    if (!page)
        return;

    page->ensureTestTrigger();
}
开发者ID:nickooms,项目名称:webkit,代码行数:10,代码来源:WKBundlePage.cpp

示例4: invalidateView

static void invalidateView(Evas_Object* webView)
{
    Evas_Coord width, height;
    Evas_Object* mainFrame = ewk_view_frame_main_get(webView);
    if (mainFrame && ewk_frame_contents_size_get(mainFrame, &width, &height)) {
        WebCore::Page* page = EWKPrivate::corePage(webView);
        if (page)
            page->mainFrame()->view()->invalidateRect(WebCore::IntRect(0, 0, width, height));
    }
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例5: addUserScript

void DumpRenderTreeSupportEfl::addUserScript(const Evas_Object* ewkView, const String& sourceCode, bool runAtStart, bool allFrames)
{
    WebCore::Page* page = EWKPrivate::corePage(ewkView);
    if (!page)
        return;

    page->group().addUserScriptToWorld(WebCore::mainThreadNormalWorld(), sourceCode, WebCore::KURL(),
                                       nullptr, nullptr, runAtStart ? WebCore::InjectAtDocumentStart : WebCore::InjectAtDocumentEnd,
                                       allFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly);
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例6: WebHistoryRestoreIndex

static void WebHistoryRestoreIndex(JNIEnv* env, jobject obj, jint frame, jint index)
{
    LOG_ASSERT(frame, "RestoreState needs a valid Frame pointer!");
    WebCore::Frame* pFrame = (WebCore::Frame*)frame;
    WebCore::Page* page = pFrame->page();
    WebCore::HistoryItem* currentItem =
            page->backForwardList()->entries()[index].get();

    // load the current page with FrameLoadTypeIndexedBackForward so that it
    // will use cache when it is possible
    page->goToItem(currentItem, FrameLoadTypeIndexedBackForward);
}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:12,代码来源:WebHistory.cpp

示例7: setSelectTrailingWhitespaceEnabled

void DumpRenderTreeSupportEfl::setSelectTrailingWhitespaceEnabled(Evas_Object* ewkView, bool enabled)
{
    WebCore::Page* page = EWKPrivate::corePage(ewkView);
    if (!page)
        return;

    WebCore::EditorClientEfl* editorClient = static_cast<WebCore::EditorClientEfl*>(page->editorClient());
    if (!editorClient)
        return;

    editorClient->setSelectTrailingWhitespaceEnabled(enabled);
}
开发者ID:,项目名称:,代码行数:12,代码来源:

示例8: collapseSelection

static void collapseSelection(GtkClipboard* clipboard, WebKitWebView* webView)
{
    if (viewSettingClipboard && viewSettingClipboard == webView)
        return;

    WebCore::Page* corePage = core(webView);
    if (!corePage)
        return;

    Frame& frame = corePage->focusController().focusedOrMainFrame();

    // Collapse the selection without clearing it
    frame.selection().setBase(frame.selection().extent(), frame.selection().affinity());
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例9: WKBundlePageRegisterScrollOperationCompletionCallback

void WKBundlePageRegisterScrollOperationCompletionCallback(WKBundlePageRef pageRef, WKBundlePageTestNotificationCallback callback, void* context)
{
    if (!callback)
        return;
    
    WebKit::WebPage* webPage = toImpl(pageRef);
    WebCore::Page* page = webPage ? webPage->corePage() : nullptr;
    if (!page || !page->expectsWheelEventTriggers())
        return;
    
    page->ensureTestTrigger().setTestCallbackAndStartNotificationTimer([=]() {
        callback(context);
    });
}
开发者ID:nickooms,项目名称:webkit,代码行数:14,代码来源:WKBundlePage.cpp

示例10: startUpdating

void GeolocationClientQt::startUpdating()
{
    if (!m_location && (m_location = QGeoPositionInfoSource::createDefaultSource(this)))
        connect(m_location, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(positionUpdated(QGeoPositionInfo)));

    if (!m_location) {
        WebCore::Page* page = QWebPagePrivate::core(m_page);
        RefPtr<WebCore::GeolocationError> error = GeolocationError::create(GeolocationError::PositionUnavailable, failedToStartServiceErrorMessage);
        page->geolocationController()->errorOccurred(error.get());
        return;
    }

    m_location->startUpdates();
}
开发者ID:wpbest,项目名称:copperspice,代码行数:14,代码来源:GeolocationClientQt.cpp

示例11: ewk_history_clear

Eina_Bool ewk_history_clear(Ewk_History* history)
{
    EWK_HISTORY_CORE_GET_OR_RETURN(history, core, false);

    WebCore::Page* page = core->page();
    if (page && page->groupPtr())
        page->groupPtr()->removeVisitedLinks();

    const int limit = ewk_history_limit_get(history);
    ewk_history_limit_set(history, 0);
    ewk_history_limit_set(history, limit);

    return true;
}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:14,代码来源:ewk_history.cpp

示例12: setComposition

void DumpRenderTreeSupportEfl::setComposition(Evas_Object* ewkView, const char* text, int start, int length)
{
    WebCore::Page* page = EWKPrivate::corePage(ewkView);
    if (!page || !page->focusController() || !page->focusController()->focusedOrMainFrame())
        return;

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

    const String compositionString = String::fromUTF8(text);
    Vector<WebCore::CompositionUnderline> underlines;
    underlines.append(WebCore::CompositionUnderline(0, compositionString.length(), WebCore::Color(0, 0, 0), false));
    editor->setComposition(compositionString, underlines, start, start + length);
}
开发者ID:,项目名称:,代码行数:15,代码来源:

示例13: dumpConfigurationForViewport

void DumpRenderTreeSupportEfl::dumpConfigurationForViewport(Evas_Object* ewkView, int deviceDPI, const WebCore::IntSize& deviceSize, const WebCore::IntSize& availableSize)
{
    WebCore::Page* page = EWKPrivate::corePage(ewkView);

    if (!page)
        return;
    WebCore::ViewportArguments arguments = page->mainFrame()->document()->viewportArguments();
    WebCore::ViewportAttributes attributes = computeViewportAttributes(arguments,
            /* default layout width for non-mobile pages */ 980,
            deviceSize.width(), deviceSize.height(),
            deviceDPI,
            availableSize);
    restrictMinimumScaleFactorToViewportSize(attributes, availableSize);
    restrictScaleFactorToInitialScaleIfNotUserScalable(attributes);
    fprintf(stdout, "viewport size %dx%d scale %f with limits [%f, %f] and userScalable %f\n", attributes.layoutSize.width(), attributes.layoutSize.height(), attributes.initialScale, attributes.minimumScale, attributes.maximumScale, attributes.userScalable);
}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例14: getWebVisiblePluginInfo

void WebPluginInfoProvider::getWebVisiblePluginInfo(WebCore::Page& page, Vector<WebCore::PluginInfo>& plugins)
{
    ASSERT_ARG(plugins, plugins.isEmpty());

    getPluginInfo(page, plugins);

#if PLATFORM(MAC)
    if (auto* document = page.mainFrame().document()) {
        if (auto* securityOrigin = document->securityOrigin()) {
            if (securityOrigin->isLocal())
                return;
        }
    }

    for (int32_t i = plugins.size() - 1; i >= 0; --i) {
        auto& info = plugins.at(i);

        // Allow built-in plugins. Also tentatively allow plugins that the client might later selectively permit.
        if (info.isApplicationPlugin || info.clientLoadPolicy == WebCore::PluginLoadClientPolicyAsk)
            continue;

        if (info.clientLoadPolicy == WebCore::PluginLoadClientPolicyBlock)
            plugins.remove(i);
    }
#endif
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:26,代码来源:WebPluginInfoProvider.cpp

示例15: compositionRange

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;
}
开发者ID:,项目名称:,代码行数:16,代码来源:


注:本文中的webcore::Page类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。