diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-27 01:03:10 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-27 01:03:10 +0000 |
commit | 644d77efccd8242e1977ed5e35398b0966026873 (patch) | |
tree | 01f6e0efa342ff8b2c09b469636e6df00b84dae5 /webkit/tools/test_shell/layout_test_controller.cc | |
parent | 3236cbe0edcbedef5d1ea689c48e19a714ab6ccb (diff) | |
download | chromium_src-644d77efccd8242e1977ed5e35398b0966026873.zip chromium_src-644d77efccd8242e1977ed5e35398b0966026873.tar.gz chromium_src-644d77efccd8242e1977ed5e35398b0966026873.tar.bz2 |
GTK: Use GTK+ theme selection colors and plumb them into webkit. [Chromium side of patch]
BUG=25831
TEST=none
Review URL: http://codereview.chromium.org/554004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37193 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/layout_test_controller.cc')
-rw-r--r-- | webkit/tools/test_shell/layout_test_controller.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc index 0dc1259..7dedc70 100644 --- a/webkit/tools/test_shell/layout_test_controller.cc +++ b/webkit/tools/test_shell/layout_test_controller.cc @@ -150,6 +150,7 @@ LayoutTestController::LayoutTestController(TestShell* shell) : BindMethod("setAllowUniversalAccessFromFileURLs", &LayoutTestController::setAllowUniversalAccessFromFileURLs); BindMethod("setTimelineProfilingEnabled", &LayoutTestController::setTimelineProfilingEnabled); BindMethod("evaluateInWebInspector", &LayoutTestController::evaluateInWebInspector); + BindMethod("forceRedSelectionColors", &LayoutTestController::forceRedSelectionColors); // The fallback method is called when an unknown method is invoked. BindFallbackMethod(&LayoutTestController::fallbackMethod); @@ -440,6 +441,12 @@ void LayoutTestController::Reset() { if (shell_) { shell_->webView()->setZoomLevel(false, 0); shell_->webView()->setTabKeyCyclesThroughElements(true); +#if defined(OS_LINUX) + // (Constants copied because we can't depend on the header that defined + // them from this file.) + shell_->webView()->setSelectionColors( + 0xff1e90ff, 0xff000000, 0xffc8c8c8, 0xff323232); +#endif // defined(OS_LINUX) } dump_as_text_ = false; dump_editing_callbacks_ = false; @@ -1081,3 +1088,10 @@ void LayoutTestController::evaluateInWebInspector(const CppArgumentList& args, shell_->dev_tools_agent()->evaluateInWebInspector(args[0].ToInt32(), args[1].ToString()); } + +void LayoutTestController::forceRedSelectionColors(const CppArgumentList& args, + CppVariant* result) { + result->SetNull(); + shell_->webView()->setSelectionColors(0xffee0000, 0xff00ee00, 0xff000000, + 0xffc0c0c0); +} |