diff options
author | idana@google.com <idana@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-06 21:54:54 +0000 |
---|---|---|
committer | idana@google.com <idana@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-06 21:54:54 +0000 |
commit | a6edba920d9428f580007e8ea4d8b28c4ea98c06 (patch) | |
tree | 77f063998d31c86cf7d7bf9914cae7608c7648bc | |
parent | 052f1b55d5bcf349a158af65876285d200d92184 (diff) | |
download | chromium_src-a6edba920d9428f580007e8ea4d8b28c4ea98c06.zip chromium_src-a6edba920d9428f580007e8ea4d8b28c4ea98c06.tar.gz chromium_src-a6edba920d9428f580007e8ea4d8b28c4ea98c06.tar.bz2 |
Disable the double buffering in TreeView when the locale is RTL. This means that the tree still flicker during a resize
on RTL locales but not on LTR.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4917 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/views/tree_view.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chrome/views/tree_view.cc b/chrome/views/tree_view.cc index d2c7dfb..8987042 100644 --- a/chrome/views/tree_view.cc +++ b/chrome/views/tree_view.cc @@ -619,11 +619,27 @@ LRESULT CALLBACK TreeView::TreeWndProc(HWND window, GetWindowLongPtr(window, GWLP_USERDATA)); DCHECK(wrapper); TreeView* tree = wrapper->tree_view; + + // We handle the messages WM_ERASEBKGND and WM_PAINT such that we paint into + // a DIB first and then perform a BitBlt from the DIB into the underlying + // window's DC. This double buffering code prevents the tree view from + // flickering during resize. This double buffering code doesn't work for RTL + // locales because the DIB created by ChromeCanvasPaint is not flipped and + // that's causing the text to be incorrectly mirrored after the BitBlt call. + // Thus, we disable the double buffering for RTL locales until this problem is + // fixed. switch (message) { case WM_ERASEBKGND: + if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) { + break; + } return 1; case WM_PAINT: { + if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) { + break; + } + ChromeCanvasPaint canvas(window); if (canvas.isEmpty()) return 0; |