summaryrefslogtreecommitdiff
path: root/Tools/DumpRenderTree/chromium
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-02-09 14:16:12 +0100
commit03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (patch)
tree52599cd0ab782b1768e23ad176f7618f98333cb6 /Tools/DumpRenderTree/chromium
parentcd44dc59cdfc39534aef4d417e9f3c412e3be139 (diff)
downloadqtwebkit-03e12282df9aa1e1fb05a8b90f1cfc2e08764cec.tar.gz
Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223)
Diffstat (limited to 'Tools/DumpRenderTree/chromium')
-rw-r--r--Tools/DumpRenderTree/chromium/DumpRenderTree.cpp7
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp2
-rw-r--r--Tools/DumpRenderTree/chromium/TestShell.cpp5
-rw-r--r--Tools/DumpRenderTree/chromium/TestShell.h4
-rw-r--r--Tools/DumpRenderTree/chromium/WebPreferences.cpp4
-rw-r--r--Tools/DumpRenderTree/chromium/WebPreferences.h3
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHost.cpp5
7 files changed, 23 insertions, 7 deletions
diff --git a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
index 24cbf5871..aac357636 100644
--- a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -56,6 +56,7 @@ static const char optionHardwareAcceleratedGL[] = "--enable-hardware-gpu";
static const char optionEnableThreadedCompositing[] = "--enable-threaded-compositing";
static const char optionForceCompositingMode[] = "--force-compositing-mode";
static const char optionEnableAccelerated2DCanvas[] = "--enable-accelerated-2d-canvas";
+static const char optionEnableDeferred2DCanvas[] = "--enable-deferred-2d-canvas";
static const char optionEnableAcceleratedPainting[] = "--enable-accelerated-painting";
static const char optionEnableAcceleratedCompositingForVideo[] = "--enable-accelerated-video";
static const char optionEnableCompositeToTexture[] = "--enable-composite-to-texture";
@@ -143,6 +144,7 @@ int main(int argc, char* argv[])
bool compositeToTexture = false;
bool forceCompositingMode = false;
bool accelerated2DCanvasEnabled = false;
+ bool deferred2DCanvasEnabled = false;
bool acceleratedPaintingEnabled = false;
bool perTilePaintingEnabled = false;
bool stressOpt = false;
@@ -186,6 +188,8 @@ int main(int argc, char* argv[])
forceCompositingMode = true;
else if (argument == optionEnableAccelerated2DCanvas)
accelerated2DCanvasEnabled = true;
+ else if (argument == optionEnableDeferred2DCanvas)
+ deferred2DCanvasEnabled = true;
else if (argument == optionEnableAcceleratedPainting)
acceleratedPaintingEnabled = true;
else if (!argument.find(optionUseGraphicsContext3DImplementation)) {
@@ -236,6 +240,7 @@ int main(int argc, char* argv[])
shell.setCompositeToTexture(compositeToTexture);
shell.setForceCompositingMode(forceCompositingMode);
shell.setAccelerated2dCanvasEnabled(accelerated2DCanvasEnabled);
+ shell.setDeferred2dCanvasEnabled(deferred2DCanvasEnabled);
shell.setAcceleratedPaintingEnabled(acceleratedPaintingEnabled);
shell.setPerTilePaintingEnabled(perTilePaintingEnabled);
shell.setJavaScriptFlags(javaScriptFlags);
diff --git a/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp b/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp
index 0bea45b35..a5fe3eda6 100644
--- a/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp
+++ b/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp
@@ -124,7 +124,7 @@ static WebSpeechInputResultArray makeRectResult(const WebRect& rect)
sb.append(String::number(rect.height));
WebSpeechInputResult res;
- res.set(WebString(sb.characters(), sb.length()), 1.0);
+ res.assign(WebString(sb.characters(), sb.length()), 1.0);
WebSpeechInputResultArray results;
results.assign(&res, 1);
diff --git a/Tools/DumpRenderTree/chromium/TestShell.cpp b/Tools/DumpRenderTree/chromium/TestShell.cpp
index 501e78b7a..f576d2417 100644
--- a/Tools/DumpRenderTree/chromium/TestShell.cpp
+++ b/Tools/DumpRenderTree/chromium/TestShell.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -110,6 +110,7 @@ TestShell::TestShell(bool testShellMode)
, m_compositeToTexture(false)
, m_forceCompositingMode(false)
, m_accelerated2dCanvasEnabled(false)
+ , m_deferred2dCanvasEnabled(false)
, m_acceleratedPaintingEnabled(false)
, m_perTilePaintingEnabled(false)
, m_stressOpt(false)
@@ -218,6 +219,7 @@ void TestShell::resetWebSettings(WebView& webView)
m_prefs.compositeToTexture = m_compositeToTexture;
m_prefs.forceCompositingMode = m_forceCompositingMode;
m_prefs.accelerated2dCanvasEnabled = m_accelerated2dCanvasEnabled;
+ m_prefs.deferred2dCanvasEnabled = m_deferred2dCanvasEnabled;
m_prefs.acceleratedPaintingEnabled = m_acceleratedPaintingEnabled;
m_prefs.perTilePaintingEnabled = m_perTilePaintingEnabled;
m_prefs.applyTo(&webView);
@@ -237,6 +239,7 @@ void TestShell::runFileTest(const TestParams& params)
if (testUrl.find("compositing/") != string::npos || testUrl.find("compositing\\") != string::npos) {
m_prefs.acceleratedCompositingForVideoEnabled = true;
m_prefs.accelerated2dCanvasEnabled = true;
+ m_prefs.deferred2dCanvasEnabled = true;
m_prefs.applyTo(m_webView);
}
diff --git a/Tools/DumpRenderTree/chromium/TestShell.h b/Tools/DumpRenderTree/chromium/TestShell.h
index 406fa7459..1ee5ce9a1 100644
--- a/Tools/DumpRenderTree/chromium/TestShell.h
+++ b/Tools/DumpRenderTree/chromium/TestShell.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -136,6 +136,7 @@ public:
void setCompositeToTexture(bool enabled) { m_compositeToTexture = enabled; }
void setForceCompositingMode(bool enabled) { m_forceCompositingMode = enabled; }
void setAccelerated2dCanvasEnabled(bool enabled) { m_accelerated2dCanvasEnabled = enabled; }
+ void setDeferred2dCanvasEnabled(bool enabled) { m_deferred2dCanvasEnabled = enabled; }
void setAcceleratedPaintingEnabled(bool enabled) { m_acceleratedPaintingEnabled = enabled; }
void setPerTilePaintingEnabled(bool enabled) { m_perTilePaintingEnabled = enabled; }
#if defined(OS_WIN)
@@ -225,6 +226,7 @@ private:
bool m_compositeToTexture;
bool m_forceCompositingMode;
bool m_accelerated2dCanvasEnabled;
+ bool m_deferred2dCanvasEnabled;
bool m_acceleratedPaintingEnabled;
bool m_perTilePaintingEnabled;
WebPreferences m_prefs;
diff --git a/Tools/DumpRenderTree/chromium/WebPreferences.cpp b/Tools/DumpRenderTree/chromium/WebPreferences.cpp
index f90a1d070..872ebfb4a 100644
--- a/Tools/DumpRenderTree/chromium/WebPreferences.cpp
+++ b/Tools/DumpRenderTree/chromium/WebPreferences.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -112,6 +112,7 @@ void WebPreferences::reset()
acceleratedCompositingEnabled = false;
compositeToTexture = false;
accelerated2dCanvasEnabled = false;
+ deferred2dCanvasEnabled = false;
acceleratedPaintingEnabled = false;
forceCompositingMode = false;
hixie76WebSocketProtocolEnabled = true;
@@ -217,6 +218,7 @@ void WebPreferences::applyTo(WebView* webView)
settings->setCompositeToTextureEnabled(compositeToTexture);
settings->setForceCompositingMode(forceCompositingMode);
settings->setAccelerated2dCanvasEnabled(accelerated2dCanvasEnabled);
+ settings->setDeferred2dCanvasEnabled(deferred2dCanvasEnabled);
settings->setAcceleratedPaintingEnabled(acceleratedPaintingEnabled);
settings->setHixie76WebSocketProtocolEnabled(hixie76WebSocketProtocolEnabled);
settings->setPerTilePaintingEnabled(perTilePaintingEnabled);
diff --git a/Tools/DumpRenderTree/chromium/WebPreferences.h b/Tools/DumpRenderTree/chromium/WebPreferences.h
index d39abfb6c..ee04a2094 100644
--- a/Tools/DumpRenderTree/chromium/WebPreferences.h
+++ b/Tools/DumpRenderTree/chromium/WebPreferences.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -106,6 +106,7 @@ struct WebPreferences {
bool compositeToTexture;
bool forceCompositingMode;
bool accelerated2dCanvasEnabled;
+ bool deferred2dCanvasEnabled;
bool acceleratedPaintingEnabled;
bool hixie76WebSocketProtocolEnabled;
bool perTilePaintingEnabled;
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
index 32b20dbf0..befa3b718 100644
--- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -471,7 +471,10 @@ void WebViewHost::finishLastTextCheck()
m_spellcheck.spellCheckWord(WebString(text.characters(), text.length()), &misspelledPosition, &misspelledLength);
if (!misspelledLength)
break;
- results.append(WebTextCheckingResult(WebTextCheckingResult::ErrorSpelling, offset + misspelledPosition, misspelledLength));
+ Vector<WebString> suggestions;
+ m_spellcheck.fillSuggestionList(WebString(text.characters() + misspelledPosition, misspelledLength), &suggestions);
+ results.append(WebTextCheckingResult(WebTextCheckingTypeSpelling, offset + misspelledPosition, misspelledLength,
+ suggestions.isEmpty() ? WebString() : suggestions[0]));
text = text.substring(misspelledPosition + misspelledLength);
offset += misspelledPosition + misspelledLength;
}