[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.20-204-g221d8e8
ossy at webkit.org
ossy at webkit.org
Wed Feb 10 22:11:13 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 005c6b9a661741901c708440ed57fa91a12ccf75
Author: ossy at webkit.org <ossy at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 3 19:39:16 2010 +0000
[Qt] Fix pixel tests support.
https://bugs.webkit.org/show_bug.cgi?id=27813
Reviewed by Ariya Hidayat.
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::DumpRenderTree::open):
(WebCore::DumpRenderTree::processLine):
- Hash processing mechanism moved from DumpRenderTree::open to DumpRenderTree::processLine.
(WebCore::DumpRenderTree::dump): Fixed and renamed variables.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 52e026c..666a8cc 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2010-02-03 Csaba Osztrogonác <ossy at webkit.org>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Fix pixel tests support.
+ https://bugs.webkit.org/show_bug.cgi?id=27813
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::open):
+ (WebCore::DumpRenderTree::processLine):
+ - Hash processing mechanism moved from DumpRenderTree::open to DumpRenderTree::processLine.
+ (WebCore::DumpRenderTree::dump): Fixed and renamed variables.
+
2010-02-03 Kevin Watters <kevinwatters at gmail.com>
Reviewed by Kevin Ollivier.
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index 9916f24..c16a786 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -412,23 +412,10 @@ void DumpRenderTree::resetToConsistentStateBeforeTesting()
setlocale(LC_ALL, "");
}
-void DumpRenderTree::open(const QUrl& aurl)
+void DumpRenderTree::open(const QUrl& url)
{
resetToConsistentStateBeforeTesting();
- QUrl url = aurl;
- m_expectedHash = QString();
- if (m_dumpPixels) {
- // single quote marks the pixel dump hash
- QString str = url.toString();
- int i = str.indexOf('\'');
- if (i > -1) {
- m_expectedHash = str.mid(i + 1, str.length());
- str.remove(i, str.length());
- url = QUrl(str);
- }
- }
-
// W3C SVG tests expect to be 480x360
bool isW3CTest = url.toString().contains("svg/W3C-SVG-1.1");
int width = isW3CTest ? 480 : maxViewWidth;
@@ -477,6 +464,16 @@ void DumpRenderTree::processLine(const QString &input)
{
QString line = input;
+ m_expectedHash = QString();
+ if (m_dumpPixels) {
+ // single quote marks the pixel dump hash
+ int i = line.indexOf('\'');
+ if (i > -1) {
+ m_expectedHash = line.mid(i + 1, line.length());
+ line.remove(i, line.length());
+ }
+ }
+
if (line.startsWith(QLatin1String("http:"))
|| line.startsWith(QLatin1String("https:"))
|| line.startsWith(QLatin1String("file:"))) {
@@ -720,14 +717,16 @@ void DumpRenderTree::dump()
printf("Content-Type: %s\n", "image/png");
printf("Content-Length: %lu\n", static_cast<unsigned long>(data.length()));
+ const quint32 bytesToWriteInOneChunk = 1 << 15;
+ quint32 dataRemainingToWrite = data.length();
const char *ptr = data.data();
- for(quint32 left = data.length(); left; ) {
- quint32 block = qMin(left, quint32(1 << 15));
- quint32 written = fwrite(ptr, 1, block, stdout);
- ptr += written;
- left -= written;
- if (written == block)
+ while (dataRemainingToWrite) {
+ quint32 bytesToWriteInThisChunk = qMin(dataRemainingToWrite, bytesToWriteInOneChunk);
+ quint32 bytesWritten = fwrite(ptr, 1, bytesToWriteInThisChunk, stdout);
+ if (bytesWritten != bytesToWriteInThisChunk)
break;
+ dataRemainingToWrite -= bytesWritten;
+ ptr += bytesWritten;
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list