summaryrefslogtreecommitdiff
path: root/src/3rdparty/webkit/WebCore
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore')
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog55
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro4
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Element.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/NetworkStateNotifier.h6
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierPrivate.h2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp25
-rw-r--r--src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp30
7 files changed, 119 insertions, 7 deletions
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index e72293d22c..ab5b13101f 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,58 @@
+2010-01-12 Jakub Wieczorek <faw217@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ [Qt] XSL stylesheets can load documents from a different origin
+
+ https://bugs.webkit.org/show_bug.cgi?id=33423
+
+ * xml/XSLTProcessorQt.cpp:
+ (WebCore::XSLTUriResolver::XSLTUriResolver):
+ (WebCore::XSLTUriResolver::resolve):
+ (WebCore::XSLTProcessor::transformToString):
+
+2010-01-07 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Allow the application to override online/offline network status
+ https://bugs.webkit.org/show_bug.cgi?id=32684
+
+ Added API to NetworkStateNotifier for forcing network status.
+
+ * platform/network/NetworkStateNotifier.h:
+ * platform/network/qt/NetworkStateNotifierPrivate.h:
+ * platform/network/qt/NetworkStateNotifierQt.cpp:
+ (WebCore::NetworkStateNotifierPrivate::NetworkStateNotifierPrivate):
+ (WebCore::NetworkStateNotifierPrivate::onlineStateChanged):
+ (WebCore::NetworkStateNotifierPrivate::networkAccessPermissionChanged):
+ (WebCore::NetworkStateNotifier::updateState):
+ (WebCore::NetworkStateNotifier::NetworkStateNotifier):
+ (WebCore::NetworkStateNotifier::setNetworkAccessAllowed):
+
+2010-01-07 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Fix linkage against Qt mobility API bearer management module
+
+ Use the documented .pro file syntax to link against the correct
+ library and (more importantly) get the include paths correct.
+
+ * WebCore.pro:
+
+2010-01-07 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Reviewed by NOBODY (OOPS!).
+
+ [RVCT] ACID3 test crash
+ https://bugs.webkit.org/show_bug.cgi?id=33280
+
+ Workaround developed by Yongjun Zhang.
+
+ * dom/Element.cpp:
+ (WebCore::Element::setAttribute):
+
2010-01-06 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed trivial Qt build fix.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index be64e3b0fe..3eba696e13 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -2876,8 +2876,8 @@ contains(DEFINES, ENABLE_QT_BEARER=1) {
SOURCES += \
platform/network/qt/NetworkStateNotifierQt.cpp
- LIBS += -lQtBearer
-
+ CONFIG += mobility
+ MOBILITY += bearer
}
contains(DEFINES, ENABLE_SVG=1) {
diff --git a/src/3rdparty/webkit/WebCore/dom/Element.cpp b/src/3rdparty/webkit/WebCore/dom/Element.cpp
index 6924773765..0692999623 100644
--- a/src/3rdparty/webkit/WebCore/dom/Element.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Element.cpp
@@ -516,7 +516,11 @@ void Element::setAttribute(const AtomicString& name, const AtomicString& value,
return;
}
+#if COMPILER(RVCT)
+ const AtomicString localName = shouldIgnoreAttributeCase(this) ? name.lower() : name;
+#else
const AtomicString& localName = shouldIgnoreAttributeCase(this) ? name.lower() : name;
+#endif
// allocate attributemap if necessary
Attribute* old = attributes(false)->getAttributeItem(localName, false);
diff --git a/src/3rdparty/webkit/WebCore/platform/network/NetworkStateNotifier.h b/src/3rdparty/webkit/WebCore/platform/network/NetworkStateNotifier.h
index f8c56540f5..700a062e8f 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/NetworkStateNotifier.h
+++ b/src/3rdparty/webkit/WebCore/platform/network/NetworkStateNotifier.h
@@ -56,7 +56,11 @@ public:
void setNetworkStateChangedFunction(void (*)());
bool onLine() const { return m_isOnLine; }
-
+
+#if (PLATFORM(QT) && ENABLE(QT_BEARER))
+ void setNetworkAccessAllowed(bool);
+#endif
+
private:
bool m_isOnLine;
void (*m_networkStateChangedFunction)();
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierPrivate.h b/src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierPrivate.h
index 7af6392120..536b06a074 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierPrivate.h
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierPrivate.h
@@ -37,10 +37,12 @@ public:
~NetworkStateNotifierPrivate();
public slots:
void onlineStateChanged(bool);
+ void networkAccessPermissionChanged(bool);
public:
QtMobility::QNetworkConfigurationManager* m_configurationManager;
bool m_online;
+ bool m_networkAccessAllowed;
NetworkStateNotifier* m_notifier;
};
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp b/src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp
index f74398b937..e694264875 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/NetworkStateNotifierQt.cpp
@@ -30,6 +30,7 @@ namespace WebCore {
NetworkStateNotifierPrivate::NetworkStateNotifierPrivate(NetworkStateNotifier* notifier)
: m_configurationManager(new QNetworkConfigurationManager())
, m_online(m_configurationManager->isOnline())
+ , m_networkAccessAllowed(true)
, m_notifier(notifier)
{
Q_ASSERT(notifier);
@@ -42,7 +43,18 @@ void NetworkStateNotifierPrivate::onlineStateChanged(bool isOnline)
return;
m_online = isOnline;
- m_notifier->updateState();
+ if (m_networkAccessAllowed)
+ m_notifier->updateState();
+}
+
+void NetworkStateNotifierPrivate::networkAccessPermissionChanged(bool isAllowed)
+{
+ if (isAllowed == m_networkAccessAllowed)
+ return;
+
+ m_networkAccessAllowed = isAllowed;
+ if (m_online)
+ m_notifier->updateState();
}
NetworkStateNotifierPrivate::~NetworkStateNotifierPrivate()
@@ -52,10 +64,10 @@ NetworkStateNotifierPrivate::~NetworkStateNotifierPrivate()
void NetworkStateNotifier::updateState()
{
- if (m_isOnLine == p->m_online)
+ if (m_isOnLine == (p->m_online && p->m_networkAccessAllowed))
return;
- m_isOnLine = p->m_online;
+ m_isOnLine = p->m_online && p->m_networkAccessAllowed;
if (m_networkStateChangedFunction)
m_networkStateChangedFunction();
}
@@ -65,7 +77,12 @@ NetworkStateNotifier::NetworkStateNotifier()
, m_networkStateChangedFunction(0)
{
p = new NetworkStateNotifierPrivate(this);
- m_isOnLine = p->m_online;
+ m_isOnLine = p->m_online && p->m_networkAccessAllowed;
+}
+
+void NetworkStateNotifier::setNetworkAccessAllowed(bool isAllowed)
+{
+ p->networkAccessPermissionChanged(isAllowed);
}
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp b/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp
index 50ee4271ab..3e05ca0b2b 100644
--- a/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp
+++ b/src/3rdparty/webkit/WebCore/xml/XSLTProcessorQt.cpp
@@ -36,6 +36,7 @@
#include <wtf/Vector.h>
#include <qabstractmessagehandler.h>
+#include <qabstracturiresolver.h>
#include <qbuffer.h>
#include <qsourcelocation.h>
#include <qxmlquery.h>
@@ -87,6 +88,31 @@ void XSLTMessageHandler::handleMessage(QtMsgType type, const QString& descriptio
sourceLocation.line(), sourceLocation.uri().toString());
}
+class XSLTUriResolver : public QAbstractUriResolver {
+
+public:
+ XSLTUriResolver(Document* document);
+ virtual QUrl resolve(const QUrl& relative, const QUrl& baseURI) const;
+
+private:
+ Document* m_document;
+};
+
+XSLTUriResolver::XSLTUriResolver(Document* document)
+ : QAbstractUriResolver()
+ , m_document(document)
+{
+}
+
+QUrl XSLTUriResolver::resolve(const QUrl& relative, const QUrl& baseURI) const
+{
+ QUrl url = baseURI.resolved(relative);
+
+ if (!m_document->frame() || !m_document->securityOrigin()->canRequest(url))
+ return QUrl();
+ return url;
+}
+
bool XSLTProcessor::transformToString(Node* sourceNode, String&, String& resultString, String&)
{
bool success = false;
@@ -107,6 +133,7 @@ bool XSLTProcessor::transformToString(Node* sourceNode, String&, String& resultS
QXmlQuery query(QXmlQuery::XSLT20);
XSLTMessageHandler messageHandler(ownerDocument.get());
+ XSLTUriResolver uriResolver(ownerDocument.get());
query.setMessageHandler(&messageHandler);
XSLTProcessor::ParameterMap::iterator end = m_parameters.end();
@@ -132,6 +159,9 @@ bool XSLTProcessor::transformToString(Node* sourceNode, String&, String& resultS
query.setFocus(&inputBuffer);
query.setQuery(&styleSheetBuffer, QUrl(stylesheet->href()));
+
+ query.setUriResolver(&uriResolver);
+
success = query.evaluateTo(&outputBuffer);
outputBuffer.reset();
resultString = QString::fromUtf8(outputBuffer.readAll()).trimmed();