Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(619)

Unified Diff: webkit/glue/webthemeengine_impl_win.cc

Issue 12320091: Merge 183990 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webthemeengine_impl_win.cc
===================================================================
--- webkit/glue/webthemeengine_impl_win.cc (revision 184404)
+++ webkit/glue/webthemeengine_impl_win.cc (working copy)
@@ -10,6 +10,7 @@
#include "skia/ext/platform_canvas.h"
#include "skia/ext/skia_utils_win.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
+#include "ui/base/win/dpi.h"
#include "ui/native_theme/native_theme.h"
using WebKit::WebCanvas;
@@ -992,6 +993,16 @@
ui::NativeTheme::kScrollbarUpArrow,
ui::NativeTheme::kNormal,
ui::NativeTheme::ExtraParams());
+ // GetPartSize returns a size of (0, 0) when not using a themed style
+ // (i.e. Windows Classic). Returning a non-zero size in this context
+ // creates repaint conflicts, particularly in the window titlebar area
+ // which significantly degrades performance. Fallback to using a system
+ // metric if required.
+ if (size.width() == 0) {
+ int width = static_cast<int>(GetSystemMetrics(SM_CXVSCROLL) /
+ ui::win::GetDeviceScaleFactor());
+ size = gfx::Size(width, width);
+ }
return WebSize(size.width(), size.height());
}
default:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698