本文整理汇总了C++中webcore::Page类的典型用法代码示例。如果您正苦于以下问题:C++ Page类的具体用法?C++ Page怎么用?C++ Page使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Page类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,代码来源:
示例16: firstRectForCharacterRange
WebCore::IntRect DumpRenderTreeSupportEfl::firstRectForCharacterRange(Evas_Object* ewkView, int location, int length)
{
WebCore::Page* page = EWKPrivate::corePage(ewkView);
if (!page || !page->focusController() || !page->focusController()->focusedOrMainFrame() || !page->focusController()->focusedOrMainFrame()->editor())
return WebCore::IntRect();
if ((location + length < location) && (location + length))
length = 0;
WebCore::Frame* frame = page->focusController()->focusedOrMainFrame();
WebCore::Editor* editor = frame->editor();
RefPtr<WebCore::Range> range = WebCore::TextIterator::rangeFromLocationAndLength(frame->selection()->rootEditableElementOrDocumentElement(), location, length);
if (!range)
return WebCore::IntRect();
return editor->firstRectForRange(range.get());
}
开发者ID:,项目名称:,代码行数:18,代码来源:
示例17: confirmComposition
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();
}
开发者ID:,项目名称:,代码行数:21,代码来源:
示例18: ewk_paint_context_paint_contents
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
}
开发者ID:dog-god,项目名称:iptv,代码行数:21,代码来源:ewk_paint_context.cpp
示例19: setEditingBehavior
void DumpRenderTreeSupportEfl::setEditingBehavior(Evas_Object* ewkView, const char* editingBehavior)
{
WebCore::EditingBehaviorType coreEditingBehavior;
if (!strcmp(editingBehavior, "win"))
coreEditingBehavior = WebCore::EditingWindowsBehavior;
else if (!strcmp(editingBehavior, "mac"))
coreEditingBehavior = WebCore::EditingMacBehavior;
else if (!strcmp(editingBehavior, "unix"))
coreEditingBehavior = WebCore::EditingUnixBehavior;
else {
ASSERT_NOT_REACHED();
return;
}
WebCore::Page* corePage = EWKPrivate::corePage(ewkView);
if (!corePage)
return;
corePage->settings()->setEditingBehaviorType(coreEditingBehavior);
}
开发者ID:,项目名称:,代码行数:21,代码来源:
示例20: setSelectionPrimaryClipboardIfNeeded
static void setSelectionPrimaryClipboardIfNeeded(WebKitWebView* webView)
{
if (!gtk_widget_has_screen(GTK_WIDGET(webView)))
return;
GtkClipboard* clipboard = gtk_widget_get_clipboard(GTK_WIDGET(webView), GDK_SELECTION_PRIMARY);
DataObjectGtk* dataObject = DataObjectGtk::forClipboard(clipboard);
WebCore::Page* corePage = core(webView);
Frame* targetFrame = corePage->focusController()->focusedOrMainFrame();
if (!targetFrame->selection()->isRange())
return;
dataObject->clear();
dataObject->setRange(targetFrame->selection()->toNormalizedRange());
viewSettingClipboard = webView;
GClosure* callback = g_cclosure_new_object(G_CALLBACK(collapseSelection), G_OBJECT(webView));
g_closure_set_marshal(callback, g_cclosure_marshal_VOID__VOID);
PasteboardHelper::defaultPasteboardHelper()->writeClipboardContents(clipboard, PasteboardHelper::DoNotIncludeSmartPaste, callback);
viewSettingClipboard = 0;
}
开发者ID:sysrqb,项目名称:chromium-src,代码行数:22,代码来源:EditorClientGtk.cpp
注:本文中的webcore::Page类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论