Commit 257cc352 authored by pkasting@chromium.org's avatar pkasting@chromium.org

Fix strange colors on scrollbars when using classic theme on XP. This is a...

Fix strange colors on scrollbars when using classic theme on XP. This is a port of the fix from pepper v1 to pepper v2.

BUG=49819
TEST=Scrollbars on XP don't look bizarre

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54075 0039d316-1c4b-4281-b951-d872f2087c98
parent a4286021
......@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/message_loop.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/ppapi/c/ppp_scrollbar.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
......@@ -17,6 +18,10 @@
#include "webkit/glue/plugins/pepper_plugin_module.h"
#include "webkit/glue/webkit_glue.h"
#if defined(OS_WIN)
#include "base/win_util.h"
#endif
using WebKit::WebInputEvent;
using WebKit::WebRect;
using WebKit::WebScrollbar;
......@@ -159,6 +164,14 @@ bool Scrollbar::Paint(const PP_Rect* rect, ImageData* image) {
if (!canvas)
return false;
scrollbar_->paint(webkit_glue::ToWebCanvas(canvas), gfx_rect);
#if defined(OS_WIN)
if (win_util::GetWinVersion() == win_util::WINVERSION_XP) {
canvas->getTopPlatformDevice().makeOpaque(
gfx_rect.x(), gfx_rect.y(), gfx_rect.width(), gfx_rect.height());
}
#endif
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment