diff options
Diffstat (limited to 'development/phantomjs/patches/build-qt55-no-websecurity.patch')
-rw-r--r-- | development/phantomjs/patches/build-qt55-no-websecurity.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/development/phantomjs/patches/build-qt55-no-websecurity.patch b/development/phantomjs/patches/build-qt55-no-websecurity.patch new file mode 100644 index 0000000000..9311c93cf0 --- /dev/null +++ b/development/phantomjs/patches/build-qt55-no-websecurity.patch @@ -0,0 +1,54 @@ +Last-Update: 2016-02-15 +Forwarded: not-needed +Bug-Upstream: https://github.com/ariya/phantomjs/issues/13727 +Author: Ximin Luo <infinity0@debian.org> +Reviewed-By: Dmitry Smirnov <onlyjob@debian.org> +Description: Port to Qt 5.5 + - Remove "webSecurity" option since that's not exposed in Qt 5.5 + +--- a/src/consts.h ++++ b/src/consts.h +@@ -63,9 +63,8 @@ + #define PAGE_SETTINGS_USERNAME "userName" + #define PAGE_SETTINGS_PASSWORD "password" + #define PAGE_SETTINGS_MAX_AUTH_ATTEMPTS "maxAuthAttempts" + #define PAGE_SETTINGS_RESOURCE_TIMEOUT "resourceTimeout" +-#define PAGE_SETTINGS_WEB_SECURITY_ENABLED "webSecurityEnabled" + #define PAGE_SETTINGS_JS_CAN_OPEN_WINDOWS "javascriptCanOpenWindows" + #define PAGE_SETTINGS_JS_CAN_CLOSE_WINDOWS "javascriptCanCloseWindows" + + #define DEFAULT_WEBDRIVER_CONFIG "127.0.0.1:8910" +--- a/src/phantom.cpp ++++ b/src/phantom.cpp +@@ -135,9 +135,8 @@ + 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()); + m_defaultPageSettings[PAGE_SETTINGS_LOCAL_ACCESS_REMOTE] = QVariant::fromValue(m_config.localToRemoteUrlAccessEnabled()); +- m_defaultPageSettings[PAGE_SETTINGS_WEB_SECURITY_ENABLED] = QVariant::fromValue(m_config.webSecurityEnabled()); + m_defaultPageSettings[PAGE_SETTINGS_JS_CAN_OPEN_WINDOWS] = QVariant::fromValue(m_config.javascriptCanOpenWindows()); + m_defaultPageSettings[PAGE_SETTINGS_JS_CAN_CLOSE_WINDOWS] = QVariant::fromValue(m_config.javascriptCanCloseWindows()); + m_page->applySettings(m_defaultPageSettings); + +--- a/src/webpage.cpp ++++ b/src/webpage.cpp +@@ -367,9 +367,8 @@ + // attribute "WebSecurityEnabled" must be applied during the initializing + // security context for Document instance. Setting up it later will not cause any effect + // see <qt\src\3rdparty\webkit\Source\WebCore\dom\Document.cpp:4468> + QWebSettings* settings = m_customWebPage->settings(); +- settings->setAttribute(QWebSettings::WebSecurityEnabled, phantomCfg->webSecurityEnabled()); + + m_mainFrame = m_customWebPage->mainFrame(); + m_currentFrame = m_mainFrame; + m_mainFrame->setHtml(BLANK_HTML, baseUrl); +@@ -621,9 +620,8 @@ + opt->setAttribute(QWebSettings::AutoLoadImages, def[PAGE_SETTINGS_LOAD_IMAGES].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()); +- opt->setAttribute(QWebSettings::WebSecurityEnabled, def[PAGE_SETTINGS_WEB_SECURITY_ENABLED].toBool()); + opt->setAttribute(QWebSettings::JavascriptCanOpenWindows, def[PAGE_SETTINGS_JS_CAN_OPEN_WINDOWS].toBool()); + opt->setAttribute(QWebSettings::JavascriptCanCloseWindows, def[PAGE_SETTINGS_JS_CAN_CLOSE_WINDOWS].toBool()); + + if (def.contains(PAGE_SETTINGS_USER_AGENT)) { |