qt4-embedded_4.8.5: we dont want a try .. catch(...) around the mainloop...
[opendreambox.git] / meta-opendreambox / recipes-qt / qt4 / qt4-4.8.5 / 0003-Qt-Expose-Webkits-WebSecurityEnabled-settings-via-QW.patch
1 From 3c9d368544a85b7bc6581164c1125cbe8f6dd928 Mon Sep 17 00:00:00 2001
2 From: Stephan Reichholf <reichi@opendreambox.org>
3 Date: Thu, 19 Apr 2012 16:45:36 +0200
4 Subject: [PATCH 3/7] Qt: Expose Webkits WebSecurityEnabled settings via
5  QWebSettings (see https://bugs.webkit.org/show_bug.cgi?id=45436 )
6
7 ---
8  src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.cpp | 12 +++++++++++-
9  src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.h   |  3 ++-
10  2 files changed, 13 insertions(+), 2 deletions(-)
11
12 diff --git a/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.cpp
13 index c1ef92e..c95a947 100644
14 --- a/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.cpp
15 +++ b/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.cpp
16 @@ -262,6 +262,10 @@ void QWebSettingsPrivate::apply()
17                                        global->attributes.value(QWebSettings::XSSAuditingEnabled));
18          settings->setXSSAuditorEnabled(value);
19  
20 +        value = attributes.value(QWebSettings::WebSecurityEnabled,
21 +                                      global->attributes.value(QWebSettings::WebSecurityEnabled));
22 +        settings->setWebSecurityEnabled(value);
23 +
24  #if ENABLE(TILED_BACKING_STORE)
25          value = attributes.value(QWebSettings::TiledBackingStoreEnabled,
26                                        global->attributes.value(QWebSettings::TiledBackingStoreEnabled));
27 @@ -468,7 +472,12 @@ QWebSettings* QWebSettings::globalSettings()
28          This is disabled by default.
29      \value SiteSpecificQuirksEnabled This setting enables WebKit's workaround for broken sites. It is
30          enabled by default.
31 -*/
32 +    \value WebSecurityEnabled Specifies whether browser should enforce same-origin policy for scripts downloaded
33 +        from remote servers. This setting is set to true by default. Note that setting this flag to false is 
34 +        strongly discouraged as it makes the browser more prone to malicious code. This setting is intended
35 +        primarily for site-specific browsers (i.e. when the user can't navigate to unsecure web page) and for testing
36 +        web applications before deployment.
37 + */
38  
39  /*!
40      \internal
41 @@ -517,6 +526,7 @@ QWebSettings::QWebSettings()
42      d->attributes.insert(QWebSettings::TiledBackingStoreEnabled, false);
43      d->attributes.insert(QWebSettings::FrameFlatteningEnabled, false);
44      d->attributes.insert(QWebSettings::SiteSpecificQuirksEnabled, true);
45 +    d->attributes.insert(QWebSettings::WebSecurityEnabled, true);
46      d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
47      d->defaultTextEncoding = QLatin1String("iso-8859-1");
48  }
49 diff --git a/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.h b/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.h
50 index 008035b..233fa4f 100644
51 --- a/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.h
52 +++ b/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebsettings.h
53 @@ -77,7 +77,8 @@ public:
54          SiteSpecificQuirksEnabled,
55          JavascriptCanCloseWindows,
56          WebGLEnabled,
57 -        HyperlinkAuditingEnabled
58 +        HyperlinkAuditingEnabled,
59 +        WebSecurityEnabled
60      };
61      enum WebGraphic {
62          MissingImageGraphic,
63 -- 
64 1.9.1
65