zhangqd / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 1 forks source link

RTL context menu appears LTR #1117

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have a CEF3-based application with uses a RTL language on a non-RTL Windows 
installation (i.e. jp app on en-US Windows).
2. Run app and right-click inside the browser.

What is the expected output? 
Menu appears RTL.

What do you see instead?
Menu appears LTR.

What version of the product are you using? On what operating system?
CEF3 release branch 1650.

Please provide any additional information below.
CefMenuCreator calls views::NativeMenuWin::RunMenuAt(const gfx::Point& point, 
int alignment). 
The function NativeMenuWin::GetAlignmentFlags set various TPM_ flags, but 
TPM_LAYOUTRTL is not settable. Also, GetAlignmentFlags is private and not 
virtual. Masking the implementation with C++ tricks is not a viable option - 
although probably doable.
Not sure if this is not a Chromium issue rather than a CEF issue; still, it 
would be good to have a handler of some sort, either in form of a callback 
added to CefContextMenuHandler, or a new parameter in CefContextMenuParams.

In CEF1 was more controllable since TrackPopupMenu was called from 
browser_webview_delegate_win.cc in BrowserWebViewDelegate::showContextMenu 
(WebKit::WebViewClient::showContextMenu was virtual and at least could be 
handled on CEF level). 

Original issue reported on code.google.com by cristian...@gmail.com on 24 Oct 2013 at 2:12

GoogleCodeExporter commented 9 years ago
CEF is transitioning from Google Code to Bitbucket project hosting. If you 
would like to continue receiving notifications on this issue please add 
yourself as a Watcher at the new location: 
https://bitbucket.org/chromiumembedded/cef/issue/1117

Original comment by magreenb...@gmail.com on 14 Mar 2015 at 3:28