Remove setting and command-line option for plugins loading.

http://code.google.com/p/phantomjs/issues/detail?id=418
1.6
Ariya Hidayat 2012-03-23 07:42:17 -07:00
parent ac771a22b9
commit 14b1ec6688
6 changed files with 0 additions and 28 deletions

View File

@ -74,14 +74,6 @@ void Config::processArgs(const QStringList &args)
setAutoLoadImages(false);
continue;
}
if (arg == "--load-plugins=yes") {
setPluginsEnabled(true);
continue;
}
if (arg == "--load-plugins=no") {
setPluginsEnabled(false);
continue;
}
if (arg == "--disk-cache=yes") {
setDiskCacheEnabled(true);
continue;
@ -282,16 +274,6 @@ void Config::setOutputEncoding(const QString &value)
m_outputEncoding = value;
}
bool Config::pluginsEnabled() const
{
return m_pluginsEnabled;
}
void Config::setPluginsEnabled(const bool value)
{
m_pluginsEnabled = value;
}
QString Config::proxyType() const
{
return m_proxyType;
@ -473,7 +455,6 @@ void Config::resetToDefaults()
m_ignoreSslErrors = false;
m_localToRemoteUrlAccessEnabled = false;
m_outputEncoding = "UTF-8";
m_pluginsEnabled = false;
m_proxyType = "http";
m_proxyHost.clear();
m_proxyPort = 1080;

View File

@ -44,7 +44,6 @@ class Config: QObject
Q_PROPERTY(bool ignoreSslErrors READ ignoreSslErrors WRITE setIgnoreSslErrors)
Q_PROPERTY(bool localToRemoteUrlAccessEnabled READ localToRemoteUrlAccessEnabled WRITE setLocalToRemoteUrlAccessEnabled)
Q_PROPERTY(QString outputEncoding READ outputEncoding WRITE setOutputEncoding)
Q_PROPERTY(bool pluginsEnabled READ pluginsEnabled WRITE setPluginsEnabled)
Q_PROPERTY(QString proxyType READ proxyType WRITE setProxyType)
Q_PROPERTY(QString proxy READ proxy WRITE setProxy)
Q_PROPERTY(QString proxyAuth READ proxyAuth WRITE setProxyAuth)
@ -79,9 +78,6 @@ public:
QString outputEncoding() const;
void setOutputEncoding(const QString &value);
bool pluginsEnabled() const;
void setPluginsEnabled(const bool value);
QString proxyType() const;
void setProxyType(const QString value);
@ -141,7 +137,6 @@ private:
bool m_ignoreSslErrors;
bool m_localToRemoteUrlAccessEnabled;
QString m_outputEncoding;
bool m_pluginsEnabled;
QString m_proxyType;
QString m_proxyHost;
int m_proxyPort;

View File

@ -52,7 +52,6 @@
"document.body.appendChild(el);"
#define PAGE_SETTINGS_LOAD_IMAGES "loadImages"
#define PAGE_SETTINGS_LOAD_PLUGINS "loadPlugins"
#define PAGE_SETTINGS_JS_ENABLED "javascriptEnabled"
#define PAGE_SETTINGS_XSS_AUDITING "XSSAuditingEnabled"
#define PAGE_SETTINGS_USER_AGENT "userAgent"

View File

@ -113,7 +113,6 @@ Phantom::Phantom(QObject *parent)
SLOT(onInitialized()));
m_defaultPageSettings[PAGE_SETTINGS_LOAD_IMAGES] = QVariant::fromValue(m_config.autoLoadImages());
m_defaultPageSettings[PAGE_SETTINGS_LOAD_PLUGINS] = QVariant::fromValue(m_config.pluginsEnabled());
m_defaultPageSettings[PAGE_SETTINGS_JS_ENABLED] = QVariant::fromValue(true);
m_defaultPageSettings[PAGE_SETTINGS_XSS_AUDITING] = QVariant::fromValue(false);
m_defaultPageSettings[PAGE_SETTINGS_USER_AGENT] = QVariant::fromValue(m_page->userAgent());

View File

@ -8,7 +8,6 @@ Options:
--disk-cache=[yes|no] Enables disk cache (at desktop services cache storage location, default is 'no')
--ignore-ssl-errors=[yes|no] Ignores SSL errors (i.e. expired or self-signed certificate errors)
--load-images=[yes|no] Loads all inlined images (default is 'yes')
--load-plugins=[yes|no] Loads all plugins (i.e. 'Flash', 'Silverlight', ...) (default is 'no')
--local-to-remote-url-access=[yes|no] Local content can access remote URL (default is 'no')
--max-disk-cache-size=size Limits the size of disk cache (in KB)
--output-encoding Sets the encoding used for terminal output (default is 'utf8')

View File

@ -206,7 +206,6 @@ void WebPage::applySettings(const QVariantMap &def)
QWebSettings *opt = m_webPage->settings();
opt->setAttribute(QWebSettings::AutoLoadImages, def[PAGE_SETTINGS_LOAD_IMAGES].toBool());
opt->setAttribute(QWebSettings::PluginsEnabled, def[PAGE_SETTINGS_LOAD_PLUGINS].toBool());
opt->setAttribute(QWebSettings::JavascriptEnabled, def[PAGE_SETTINGS_JS_ENABLED].toBool());
opt->setAttribute(QWebSettings::XSSAuditingEnabled, def[PAGE_SETTINGS_XSS_AUDITING].toBool());
opt->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, def[PAGE_SETTINGS_LOCAL_ACCESS_REMOTE].toBool());