本文整理汇总了C++中webcore::Settings::setSpatialNavigationEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ Settings::setSpatialNavigationEnabled方法的具体用法?C++ Settings::setSpatialNavigationEnabled怎么用?C++ Settings::setSpatialNavigationEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webcore::Settings
的用法示例。
在下文中一共展示了Settings::setSpatialNavigationEnabled方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: apply
//.........这里部分代码省略.........
settings->setWebGLEnabled(value);
#if USE(ACCELERATED_COMPOSITING)
settings->setAcceleratedCompositingForCanvasEnabled(value);
#endif
#endif
value = attributes.value(QWebSettings::HyperlinkAuditingEnabled,
global->attributes.value(QWebSettings::HyperlinkAuditingEnabled));
settings->setHyperlinkAuditingEnabled(value);
value = attributes.value(QWebSettings::JavascriptCanOpenWindows,
global->attributes.value(QWebSettings::JavascriptCanOpenWindows));
settings->setJavaScriptCanOpenWindowsAutomatically(value);
value = attributes.value(QWebSettings::JavascriptCanCloseWindows,
global->attributes.value(QWebSettings::JavascriptCanCloseWindows));
settings->setAllowScriptsToCloseWindows(value);
value = attributes.value(QWebSettings::JavaEnabled,
global->attributes.value(QWebSettings::JavaEnabled));
settings->setJavaEnabled(value);
value = attributes.value(QWebSettings::PluginsEnabled,
global->attributes.value(QWebSettings::PluginsEnabled));
settings->setPluginsEnabled(value);
value = attributes.value(QWebSettings::PrivateBrowsingEnabled,
global->attributes.value(QWebSettings::PrivateBrowsingEnabled));
settings->setPrivateBrowsingEnabled(value);
value = attributes.value(QWebSettings::SpatialNavigationEnabled,
global->attributes.value(QWebSettings::SpatialNavigationEnabled));
settings->setSpatialNavigationEnabled(value);
value = attributes.value(QWebSettings::JavascriptCanAccessClipboard,
global->attributes.value(QWebSettings::JavascriptCanAccessClipboard));
settings->setDOMPasteAllowed(value);
settings->setJavaScriptCanAccessClipboard(value);
value = attributes.value(QWebSettings::DeveloperExtrasEnabled,
global->attributes.value(QWebSettings::DeveloperExtrasEnabled));
settings->setDeveloperExtrasEnabled(value);
value = attributes.value(QWebSettings::FrameFlatteningEnabled,
global->attributes.value(QWebSettings::FrameFlatteningEnabled));
settings->setFrameFlatteningEnabled(value);
QUrl location = !userStyleSheetLocation.isEmpty() ? userStyleSheetLocation : global->userStyleSheetLocation;
settings->setUserStyleSheetLocation(WebCore::KURL(location));
QString encoding = !defaultTextEncoding.isEmpty() ? defaultTextEncoding: global->defaultTextEncoding;
settings->setDefaultTextEncodingName(encoding);
QString storagePath = !localStoragePath.isEmpty() ? localStoragePath : global->localStoragePath;
settings->setLocalStorageDatabasePath(storagePath);
QString path = !pluginSupplementalPath.isEmpty() ? pluginSupplementalPath : global->pluginSupplementalPath;
settings->setPluginSupplementalPath(path);
value = attributes.value(QWebSettings::PrintElementBackgrounds,
global->attributes.value(QWebSettings::PrintElementBackgrounds));
settings->setShouldPrintBackgrounds(value);
#if ENABLE(SQL_DATABASE)
value = attributes.value(QWebSettings::OfflineStorageDatabaseEnabled,
示例2: Sync
//.........这里部分代码省略.........
str = (jstring)env->GetObjectField(obj, gFieldIds->mDatabasePath);
if (str) {
String path = jstringToWtfString(env, str);
DatabaseTracker::tracker().setDatabaseDirectoryPath(path);
// This database is created when the first HTML5 Database object is
// instantiated. If the file doesn't exist, we create it and set its
// permissions. The filename must match that in
// DatabaseTracker.cpp.
String filename = SQLiteFileSystem::appendDatabaseFileNameToPath(path, "Databases.db");
int fd = open(filename.utf8().data(), O_CREAT | O_EXCL, permissionFlags660);
if (fd >= 0)
close(fd);
}
}
#endif
#if ENABLE(DOM_STORAGE)
flag = env->GetBooleanField(obj, gFieldIds->mDomStorageEnabled);
s->setLocalStorageEnabled(flag);
str = (jstring)env->GetObjectField(obj, gFieldIds->mDatabasePath);
if (str) {
WTF::String localStorageDatabasePath = jstringToWtfString(env,str);
if (localStorageDatabasePath.length()) {
localStorageDatabasePath = WebCore::pathByAppendingComponent(
localStorageDatabasePath, "localstorage");
// We need 770 for folders
mkdir(localStorageDatabasePath.utf8().data(),
permissionFlags660 | S_IXUSR | S_IXGRP);
s->setLocalStorageDatabasePath(localStorageDatabasePath);
}
}
#endif
flag = env->GetBooleanField(obj, gFieldIds->mGeolocationEnabled);
GeolocationPermissions::setAlwaysDeny(!flag);
str = (jstring)env->GetObjectField(obj, gFieldIds->mGeolocationDatabasePath);
if (str) {
String path = jstringToWtfString(env, str);
GeolocationPermissions::setDatabasePath(path);
GeolocationPositionCache::instance()->setDatabasePath(path);
// This database is created when the first Geolocation object is
// instantiated. If the file doesn't exist, we create it and set its
// permissions. The filename must match that in
// GeolocationPositionCache.cpp.
String filename = SQLiteFileSystem::appendDatabaseFileNameToPath(path, "CachedGeoposition.db");
int fd = open(filename.utf8().data(), O_CREAT | O_EXCL, permissionFlags660);
if (fd >= 0)
close(fd);
}
flag = env->GetBooleanField(obj, gFieldIds->mXSSAuditorEnabled);
s->setXSSAuditorEnabled(flag);
#if ENABLE(LINK_PREFETCH)
flag = env->GetBooleanField(obj, gFieldIds->mLinkPrefetchEnabled);
s->setLinkPrefetchEnabled(flag);
#endif
size = env->GetIntField(obj, gFieldIds->mPageCacheCapacity);
if (size > 0) {
s->setUsesPageCache(true);
WebCore::pageCache()->setCapacity(size);
} else
s->setUsesPageCache(false);
#if ENABLE(WEB_AUTOFILL)
flag = env->GetBooleanField(obj, gFieldIds->mAutoFillEnabled);
// TODO: This updates the Settings WebCore side with the user's
// preference for autofill and will stop WebCore making requests
// into the chromium autofill code. That code in Chromium also has
// a notion of being enabled/disabled that gets read from the users
// preferences. At the moment, it's hardcoded to true on Android
// (see chrome/browser/autofill/autofill_manager.cc:405). This
// setting should probably be synced into Chromium also.
s->setAutoFillEnabled(flag);
if (flag) {
EditorClientAndroid* editorC = static_cast<EditorClientAndroid*>(pFrame->page()->editorClient());
WebAutofill* webAutofill = editorC->getAutofill();
// Set the active AutofillProfile data.
jobject autoFillProfile = env->GetObjectField(obj, gFieldIds->mAutoFillProfile);
if (autoFillProfile)
syncAutoFillProfile(env, autoFillProfile, webAutofill);
else {
// The autofill profile is null. We need to tell Chromium about this because
// this may be because the user just deleted their profile but left the
// autofill feature setting enabled.
webAutofill->clearProfiles();
}
}
#endif
// This is required to enable the XMLTreeViewer when loading an XML document that
// has no style attached to it. http://trac.webkit.org/changeset/79799
s->setDeveloperExtrasEnabled(true);
s->setSpatialNavigationEnabled(true);
bool echoPassword = env->GetBooleanField(obj,
gFieldIds->mPasswordEchoEnabled);
s->setPasswordEchoEnabled(echoPassword);
}
示例3: apply
//.........这里部分代码省略.........
global->attributes.value(QWebSettings::CSSCompositingEnabled));
WebCore::RuntimeEnabledFeatures::setCSSCompositingEnabled(value);
value = attributes.value(QWebSettings::CSSGridLayoutEnabled,
global->attributes.value(QWebSettings::CSSGridLayoutEnabled));
settings->setCSSGridLayoutEnabled(value);
value = attributes.value(QWebSettings::HyperlinkAuditingEnabled,
global->attributes.value(QWebSettings::HyperlinkAuditingEnabled));
settings->setHyperlinkAuditingEnabled(value);
value = attributes.value(QWebSettings::JavascriptCanOpenWindows,
global->attributes.value(QWebSettings::JavascriptCanOpenWindows));
settings->setJavaScriptCanOpenWindowsAutomatically(value);
value = attributes.value(QWebSettings::JavascriptCanCloseWindows,
global->attributes.value(QWebSettings::JavascriptCanCloseWindows));
settings->setAllowScriptsToCloseWindows(value);
value = attributes.value(QWebSettings::JavaEnabled,
global->attributes.value(QWebSettings::JavaEnabled));
settings->setJavaEnabled(value);
value = attributes.value(QWebSettings::PluginsEnabled,
global->attributes.value(QWebSettings::PluginsEnabled));
settings->setPluginsEnabled(value);
value = attributes.value(QWebSettings::PrivateBrowsingEnabled,
global->attributes.value(QWebSettings::PrivateBrowsingEnabled));
settings->setPrivateBrowsingEnabled(value);
value = attributes.value(QWebSettings::SpatialNavigationEnabled,
global->attributes.value(QWebSettings::SpatialNavigationEnabled));
settings->setSpatialNavigationEnabled(value);
value = attributes.value(QWebSettings::JavascriptCanAccessClipboard,
global->attributes.value(QWebSettings::JavascriptCanAccessClipboard));
settings->setDOMPasteAllowed(value);
settings->setJavaScriptCanAccessClipboard(value);
value = attributes.value(QWebSettings::DeveloperExtrasEnabled,
global->attributes.value(QWebSettings::DeveloperExtrasEnabled));
settings->setDeveloperExtrasEnabled(value);
value = attributes.value(QWebSettings::FrameFlatteningEnabled,
global->attributes.value(QWebSettings::FrameFlatteningEnabled));
settings->setFrameFlatteningEnabled(value);
QUrl location = !userStyleSheetLocation.isEmpty() ? userStyleSheetLocation : global->userStyleSheetLocation;
settings->setUserStyleSheetLocation(WebCore::KURL(location));
QString encoding = !defaultTextEncoding.isEmpty() ? defaultTextEncoding: global->defaultTextEncoding;
settings->setDefaultTextEncodingName(encoding);
QString storagePath = !localStoragePath.isEmpty() ? localStoragePath : global->localStoragePath;
settings->setLocalStorageDatabasePath(storagePath);
if (mediaType.isEmpty())
mediaType = global->mediaType;
value = attributes.value(QWebSettings::PrintElementBackgrounds,
global->attributes.value(QWebSettings::PrintElementBackgrounds));
settings->setShouldPrintBackgrounds(value);
#if ENABLE(SQL_DATABASE)
value = attributes.value(QWebSettings::OfflineStorageDatabaseEnabled,
示例4: apply
void QWebSettingsPrivate::apply()
{
if (settings) {
settings->setTextAreasAreResizable(true);
QWebSettingsPrivate* global = QWebSettings::globalSettings()->d;
QString family = fontFamilies.value(QWebSettings::StandardFont,
global->fontFamilies.value(QWebSettings::StandardFont));
settings->setStandardFontFamily(family);
family = fontFamilies.value(QWebSettings::FixedFont,
global->fontFamilies.value(QWebSettings::FixedFont));
settings->setFixedFontFamily(family);
family = fontFamilies.value(QWebSettings::SerifFont,
global->fontFamilies.value(QWebSettings::SerifFont));
settings->setSerifFontFamily(family);
family = fontFamilies.value(QWebSettings::SansSerifFont,
global->fontFamilies.value(QWebSettings::SansSerifFont));
settings->setSansSerifFontFamily(family);
family = fontFamilies.value(QWebSettings::CursiveFont,
global->fontFamilies.value(QWebSettings::CursiveFont));
settings->setCursiveFontFamily(family);
family = fontFamilies.value(QWebSettings::FantasyFont,
global->fontFamilies.value(QWebSettings::FantasyFont));
settings->setFantasyFontFamily(family);
int size = fontSizes.value(QWebSettings::MinimumFontSize,
global->fontSizes.value(QWebSettings::MinimumFontSize));
settings->setMinimumFontSize(size);
size = fontSizes.value(QWebSettings::MinimumLogicalFontSize,
global->fontSizes.value(QWebSettings::MinimumLogicalFontSize));
settings->setMinimumLogicalFontSize(size);
size = fontSizes.value(QWebSettings::DefaultFontSize,
global->fontSizes.value(QWebSettings::DefaultFontSize));
settings->setDefaultFontSize(size);
size = fontSizes.value(QWebSettings::DefaultFixedFontSize,
global->fontSizes.value(QWebSettings::DefaultFixedFontSize));
settings->setDefaultFixedFontSize(size);
bool value = attributes.value(QWebSettings::AutoLoadImages,
global->attributes.value(QWebSettings::AutoLoadImages));
settings->setLoadsImagesAutomatically(value);
value = attributes.value(QWebSettings::JavascriptEnabled,
global->attributes.value(QWebSettings::JavascriptEnabled));
settings->setJavaScriptEnabled(value);
#if USE(ACCELERATED_COMPOSITING)
value = attributes.value(QWebSettings::AcceleratedCompositingEnabled,
global->attributes.value(QWebSettings::AcceleratedCompositingEnabled));
settings->setAcceleratedCompositingEnabled(value);
#endif
#if ENABLE(3D_CANVAS)
value = attributes.value(QWebSettings::WebGLEnabled,
global->attributes.value(QWebSettings::WebGLEnabled));
settings->setWebGLEnabled(value);
#endif
value = attributes.value(QWebSettings::JavascriptCanOpenWindows,
global->attributes.value(QWebSettings::JavascriptCanOpenWindows));
settings->setJavaScriptCanOpenWindowsAutomatically(value);
value = attributes.value(QWebSettings::JavaEnabled,
global->attributes.value(QWebSettings::JavaEnabled));
settings->setJavaEnabled(value);
value = attributes.value(QWebSettings::PluginsEnabled,
global->attributes.value(QWebSettings::PluginsEnabled));
settings->setPluginsEnabled(value);
value = attributes.value(QWebSettings::PrivateBrowsingEnabled,
global->attributes.value(QWebSettings::PrivateBrowsingEnabled));
settings->setPrivateBrowsingEnabled(value);
value = attributes.value(QWebSettings::SpatialNavigationEnabled,
global->attributes.value(QWebSettings::SpatialNavigationEnabled));
settings->setSpatialNavigationEnabled(value);
value = attributes.value(QWebSettings::JavascriptCanAccessClipboard,
global->attributes.value(QWebSettings::JavascriptCanAccessClipboard));
settings->setDOMPasteAllowed(value);
settings->setJavaScriptCanAccessClipboard(value);
value = attributes.value(QWebSettings::DeveloperExtrasEnabled,
global->attributes.value(QWebSettings::DeveloperExtrasEnabled));
settings->setDeveloperExtrasEnabled(value);
value = attributes.value(QWebSettings::FrameFlatteningEnabled,
global->attributes.value(QWebSettings::FrameFlatteningEnabled));
settings->setFrameFlatteningEnabled(value);
//.........这里部分代码省略.........