From ff2f1b7e01191a951fb95c4f2325c072cd2fda3c Mon Sep 17 00:00:00 2001 From: "hbono@chromium.org" Date: Fri, 3 Apr 2009 05:28:43 +0000 Subject: A workaround fix for Issue 9186. This crash is caused in a unnecessary check whether or not to add a "text direction" submenu to a context menu. Since we don't have a "text direction" submenu and this check is unnecessary now, this change set a page setting that disables this check. BUG=9186 Review URL: http://codereview.chromium.org/42690 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13072 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/webview_impl.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'webkit/glue/webview_impl.cc') diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index a79c63c..9d4fc2c 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -1429,6 +1429,12 @@ void WebViewImpl::SetPreferences(const WebPreferences& preferences) { // universal access. settings->setAllowUniversalAccessFromFileURLs(false); + // We prevent WebKit from checking if it needs to add a "text direction" + // submenu to a context menu. it is not only because we don't need the result + // but also because it cause a possible crash in Editor::hasBidiSelection(). + settings->setTextDirectionSubmenuInclusionBehavior( + TextDirectionSubmenuNeverIncluded); + #if defined(OS_WIN) // RenderTheme is a singleton that needs to know the default font size to // draw some form controls. We let it know each time the size changes. -- cgit v1.1