From cff92ac3f51571d4f7c88ed8b5ecd4ce9512ca96 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 7 Jan 2010 18:32:45 +0100 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 99ccc1c3e4db5354246720f9b9aa3d282e64497d ) Changes in WebKit/qt since the last update: ++ b/WebKit/qt/ChangeLog 2010-01-07 Yael Aharon Reviewed by Kenneth Rohde Christiansen. [Qt] Allow the application to override online/offline network status https://bugs.webkit.org/show_bug.cgi?id=32684 Add a setting so that applications can overide the network status. Applications that use this setting still need to block network access through QNAM. * Api/qwebsettings.cpp: (qt_networkAccessAllowed): (cherry picked from commit a010d26629e8aa5aaa14a7e57ace06708fc903d6) --- .../webkit/JavaScriptCore/API/JSClassRef.cpp | 17 ++++++------ src/3rdparty/webkit/JavaScriptCore/ChangeLog | 23 +++++++++++++++++ .../webkit/JavaScriptCore/runtime/Structure.h | 6 +++++ src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 30 ++++++++++++++++++++++ src/3rdparty/webkit/WebCore/WebCore.pro | 4 +-- .../platform/network/NetworkStateNotifier.h | 6 ++++- .../network/qt/NetworkStateNotifierPrivate.h | 2 ++ .../platform/network/qt/NetworkStateNotifierQt.cpp | 25 +++++++++++++++--- src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp | 11 ++++++++ src/3rdparty/webkit/WebKit/qt/ChangeLog | 14 ++++++++++ 11 files changed, 124 insertions(+), 16 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.cpp b/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.cpp index afde7ce..3785bab 100644 --- a/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/API/JSClassRef.cpp @@ -61,8 +61,8 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* if (const JSStaticValue* staticValue = definition->staticValues) { m_staticValues = new OpaqueJSClassStaticValuesTable(); while (staticValue->name) { - m_staticValues->add(UString::Rep::createFromUTF8(staticValue->name), - new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes)); + StaticValueEntry* e = new StaticValueEntry(staticValue->getProperty, staticValue->setProperty, staticValue->attributes); + m_staticValues->add(UString::Rep::createFromUTF8(staticValue->name), e); ++staticValue; } } @@ -70,8 +70,8 @@ OpaqueJSClass::OpaqueJSClass(const JSClassDefinition* definition, OpaqueJSClass* if (const JSStaticFunction* staticFunction = definition->staticFunctions) { m_staticFunctions = new OpaqueJSClassStaticFunctionsTable(); while (staticFunction->name) { - m_staticFunctions->add(UString::Rep::createFromUTF8(staticFunction->name), - new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes)); + StaticFunctionEntry* e = new StaticFunctionEntry(staticFunction->callAsFunction, staticFunction->attributes); + m_staticFunctions->add(UString::Rep::createFromUTF8(staticFunction->name), e); ++staticFunction; } } @@ -149,8 +149,9 @@ OpaqueJSClassContextData::OpaqueJSClassContextData(OpaqueJSClass* jsClass) OpaqueJSClassStaticValuesTable::const_iterator end = jsClass->m_staticValues->end(); for (OpaqueJSClassStaticValuesTable::const_iterator it = jsClass->m_staticValues->begin(); it != end; ++it) { ASSERT(!it->first->identifierTable()); - staticValues->add(UString::Rep::createCopying(it->first->data(), it->first->size()), - new StaticValueEntry(it->second->getProperty, it->second->setProperty, it->second->attributes)); + StaticValueEntry* e = new StaticValueEntry(it->second->getProperty, it->second->setProperty, it->second->attributes); + staticValues->add(UString::Rep::createCopying(it->first->data(), it->first->size()), e); + } } else @@ -162,8 +163,8 @@ OpaqueJSClassContextData::OpaqueJSClassContextData(OpaqueJSClass* jsClass) OpaqueJSClassStaticFunctionsTable::const_iterator end = jsClass->m_staticFunctions->end(); for (OpaqueJSClassStaticFunctionsTable::const_iterator it = jsClass->m_staticFunctions->begin(); it != end; ++it) { ASSERT(!it->first->identifierTable()); - staticFunctions->add(UString::Rep::createCopying(it->first->data(), it->first->size()), - new StaticFunctionEntry(it->second->callAsFunction, it->second->attributes)); + StaticFunctionEntry* e = new StaticFunctionEntry(it->second->callAsFunction, it->second->attributes); + staticFunctions->add(UString::Rep::createCopying(it->first->data(), it->first->size()), e); } } else diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index 1694966..e292418 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,26 @@ +2010-01-07 Norbert Leser + + Reviewed by NOBODY (OOPS!). + + RVCT compiler with "-Otime -O3" optimization tries to optimize out + inline new'ed pointers that are passed as arguments. + Proposed patch assigns new'ed pointer explicitly outside function call. + + * API/JSClassRef.cpp: + (OpaqueJSClass::OpaqueJSClass): + (OpaqueJSClassContextData::OpaqueJSClassContextData): + +2010-01-07 Norbert Leser + + Reviewed by NOBODY (OOPS!). + + Added time-based optimization and increased optimization level to O3, + conditionally for COMPILER(RVCT), + for increasing performance of JavaScript execution. + (Default settings are Ospace and O2) + + * runtime/Structure.h: + 2009-11-19 Thiago Macieira Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h index f355c53..ecdd997 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h @@ -45,6 +45,12 @@ #define DUMP_PROPERTYMAP_STATS 0 #endif +#if COMPILER(RVCT) +#pragma arm +#pragma Otime +#pragma O3 +#endif + namespace JSC { class MarkStack; diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 6b107cd..0b88429 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - b217cdfedc7b5e7581325bda718192247f03dd5d + 99ccc1c3e4db5354246720f9b9aa3d282e64497d diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index acc8a6a..516fadd 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,33 @@ +2010-01-07 Yael Aharon + + 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 + + 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 Reviewed by NOBODY (OOPS!). diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index be64e3b..3eba696 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/platform/network/NetworkStateNotifier.h b/src/3rdparty/webkit/WebCore/platform/network/NetworkStateNotifier.h index f8c5654..700a062 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 7af6392..536b06a 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 f74398b..e694264 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/WebKit/qt/Api/qwebsettings.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp index b637d04..79ef16f 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp @@ -47,6 +47,17 @@ #include #include +#if ENABLE(QT_BEARER) +#include "NetworkStateNotifier.h" +#endif + +void QWEBKIT_EXPORT qt_networkAccessAllowed(bool isAllowed) +{ +#if ENABLE(QT_BEARER) + WebCore::networkStateNotifier().setNetworkAccessAllowed(isAllowed); +#endif +} + class QWebSettingsPrivate { public: QWebSettingsPrivate(WebCore::Settings* wcSettings = 0) diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index d7c3c52..31fad69 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,17 @@ +2010-01-07 Yael Aharon + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Allow the application to override online/offline network status + https://bugs.webkit.org/show_bug.cgi?id=32684 + + Add a setting so that applications can overide the network status. + Applications that use this setting still need to block network access + through QNAM. + + * Api/qwebsettings.cpp: + (qt_networkAccessAllowed): + 2010-01-07 Yongjun Zhang , Laszlo Gombos Reviewed by Simon Hausmann. -- cgit v0.12