[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.18-1-697-g2f78b87
eric at webkit.org
eric at webkit.org
Wed Jan 20 22:19:00 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 636d38ad982e4f2c51a26f5682e50262ce25a01c
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 11 04:09:02 2010 +0000
2010-01-10 Robert Hogan <robert at roberthogan.net>
Reviewed by Adam Barth.
[Qt] Add enableXSSAuditor support to QWebSettings and DRT.
https://bugs.webkit.org/show_bug.cgi?id=33419
* platform/qt/Skipped:
2010-01-10 Robert Hogan <robert at roberthogan.net>
Reviewed by Adam Barth.
[Qt] Add enableXSSAuditor support to QWebSettings and DRT.
https://bugs.webkit.org/show_bug.cgi?id=33419
* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):
* Api/qwebsettings.h:
2010-01-10 Robert Hogan <robert at roberthogan.net>
Reviewed by Adam Barth.
[Qt] Add enableXSSAuditor support to QWebSettings and DRT.
https://bugs.webkit.org/show_bug.cgi?id=33419
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::WebPage::WebPage):
(WebCore::WebPage::resetSettings):
(WebCore::DumpRenderTree::createWindow):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::setXSSAuditorEnabled):
* DumpRenderTree/qt/LayoutTestControllerQt.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2fd3a34..c6a0c5c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-01-10 Robert Hogan <robert at roberthogan.net>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Add enableXSSAuditor support to QWebSettings and DRT.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33419
+
+ * platform/qt/Skipped:
+
2010-01-10 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 1c445da..a58b06f 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -197,9 +197,6 @@ http/tests/security/feed-urls-from-remote.html
# Missing layoutTestController.setWillSendRequestReturnsNullOnRedirect()
http/tests/misc/will-send-request-returns-null-on-redirect.html
-# Missing layoutTestController.setXSSAuditorEnabled()
-http/tests/security/xssAuditor
-
# Missing layoutTestController.evaluateScriptInIsolatedWorld()
http/tests/security/isolatedWorld
diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp
index ff7d33e..d7d375b 100644
--- a/WebKit/qt/Api/qwebsettings.cpp
+++ b/WebKit/qt/Api/qwebsettings.cpp
@@ -204,12 +204,16 @@ void QWebSettingsPrivate::apply()
value = attributes.value(QWebSettings::LocalStorageEnabled,
global->attributes.value(QWebSettings::LocalStorageEnabled));
-
settings->setLocalStorageEnabled(value);
value = attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls,
global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls));
settings->setAllowUniversalAccessFromFileURLs(value);
+
+ value = attributes.value(QWebSettings::XSSAuditorEnabled,
+ global->attributes.value(QWebSettings::XSSAuditorEnabled));
+ settings->setXSSAuditorEnabled(value);
+
settings->setUsesPageCache(WebCore::pageCache()->capacity());
} else {
QList<QWebSettingsPrivate*> settings = *::allSettings();
@@ -354,6 +358,7 @@ QWebSettings* QWebSettings::globalSettings()
\value LocalStorageDatabaseEnabled \e{This enum value is deprecated.} Use
QWebSettings::LocalStorageEnabled instead.
\value LocalContentCanAccessRemoteUrls Specifies whether locally loaded documents are allowed to access remote urls.
+ \value XSSAuditorEnabled Specifies whether load requests should be monitored for cross-site scripting attempts.
*/
/*!
diff --git a/WebKit/qt/Api/qwebsettings.h b/WebKit/qt/Api/qwebsettings.h
index 69f3b11..32af448 100644
--- a/WebKit/qt/Api/qwebsettings.h
+++ b/WebKit/qt/Api/qwebsettings.h
@@ -67,7 +67,8 @@ public:
LocalStorageDatabaseEnabled = LocalStorageEnabled,
#endif
LocalContentCanAccessRemoteUrls,
- DnsPrefetchEnabled
+ DnsPrefetchEnabled,
+ XSSAuditorEnabled
};
enum WebGraphic {
MissingImageGraphic,
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 248f07b..f4e021d 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-10 Robert Hogan <robert at roberthogan.net>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Add enableXSSAuditor support to QWebSettings and DRT.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33419
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ * Api/qwebsettings.h:
+
2010-01-09 Daniel Bates <dbates at webkit.org>
No review, rolling out r53044.
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 3907f01..949d0ac 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-01-10 Robert Hogan <robert at roberthogan.net>
+
+ Reviewed by Adam Barth.
+
+ [Qt] Add enableXSSAuditor support to QWebSettings and DRT.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33419
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::WebPage):
+ (WebCore::WebPage::resetSettings):
+ (WebCore::DumpRenderTree::createWindow):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::setXSSAuditorEnabled):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
2010-01-10 Adam Barth <abarth at webkit.org>
Unreviewed cosmetic change. Remove the status bubble for mac-ews
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index 00fdac5..6367fe3 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -159,7 +159,6 @@ void WebPage::resetSettings()
{
// After each layout test, reset the settings that may have been changed by
// layoutTestController.overridePreference() or similar.
-
settings()->resetFontSize(QWebSettings::DefaultFontSize);
settings()->resetAttribute(QWebSettings::JavascriptCanOpenWindows);
settings()->resetAttribute(QWebSettings::JavascriptEnabled);
@@ -167,6 +166,10 @@ void WebPage::resetSettings()
settings()->resetAttribute(QWebSettings::LinksIncludedInFocusChain);
settings()->resetAttribute(QWebSettings::OfflineWebApplicationCacheEnabled);
settings()->resetAttribute(QWebSettings::LocalContentCanAccessRemoteUrls);
+
+ // globalSettings must be reset explicitly.
+ m_drt->layoutTestController()->setXSSAuditorEnabled(false);
+
QWebSettings::setMaximumPagesInCache(0); // reset to default
}
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index adcdbca..e017ee7 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -34,6 +34,7 @@
#include "WorkQueueItemQt.h"
#include <QDir>
#include <QLocale>
+#include <qwebsettings.h>
extern void qt_dump_editing_callbacks(bool b);
extern void qt_dump_resource_load_callbacks(bool b);
@@ -297,6 +298,16 @@ void LayoutTestController::setMainFrameIsFirstResponder(bool isFirst)
//FIXME: only need this for the moment: https://bugs.webkit.org/show_bug.cgi?id=32990
}
+void LayoutTestController::setXSSAuditorEnabled(bool enable)
+{
+ // Set XSSAuditorEnabled globally so that windows created by the test inherit it too.
+ // resetSettings() will call this to reset the page and global setting to false again.
+ // Needed by http/tests/security/xssAuditor/link-opens-new-window.html
+ QWebSettings* globalSettings = QWebSettings::globalSettings();
+ globalSettings->setAttribute(QWebSettings::XSSAuditorEnabled, enable);
+ m_drt->webPage()->settings()->setAttribute(QWebSettings::XSSAuditorEnabled, enable);
+}
+
bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(const QString& animationName,
double time,
const QString& elementId)
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index 1913d7c..4451b7a 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -115,6 +115,7 @@ public slots:
void resetLoadFinished() { m_loadFinished = false; }
void setWindowIsKey(bool isKey);
void setMainFrameIsFirstResponder(bool isFirst);
+ void setXSSAuditorEnabled(bool enable);
bool pauseAnimationAtTimeOnElementWithId(const QString& animationName, double time, const QString& elementId);
bool pauseTransitionAtTimeOnElementWithId(const QString& propertyName, double time, const QString& elementId);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list