From de570ef650283a86f90d6179568b49a76df4f1d7 Mon Sep 17 00:00:00 2001 From: "xji@chromium.org" Date: Wed, 29 Jul 2009 18:27:52 +0000 Subject: This CL fixes issue 17468: Regression: Directionality marks should not be inserted for LTR systems To avoid empty square displayed around tooltip when system does not have RTL support, only add Unicode marks when element's directionality is not the same as UI's directionality. Note: 1. tooltip will be displayed using its element's directionality. 2. in system without RTL support, tooltip will only be displayed correctly (in its element's directionality and without empty square around) when both UI and element's directionality is LTR. BUG=http://crbug.com/17468 TEST= 1. Uninstall the right-to-left script and east Asian script through the Control Panel and restart system. 2. Run English Chrome. 3. given the following HTML, the displayed tooltip should not have empty square around. And now here! Review URL: http://codereview.chromium.org/160262 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21975 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/render_view.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chrome/renderer/render_view.h') diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index 7f2749e..91c69039 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -27,6 +27,7 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "testing/gtest/include/gtest/gtest_prod.h" #include "webkit/api/public/WebConsoleMessage.h" +#include "webkit/api/public/WebTextDirection.h" #include "webkit/glue/dom_serializer_delegate.h" #include "webkit/glue/form_data.h" #include "webkit/glue/password_form_dom_manager.h" @@ -287,7 +288,8 @@ class RenderView : public RenderWidget, virtual int GetHistoryForwardListCount(); virtual void OnNavStateChanged(WebView* webview); virtual void SetTooltipText(WebView* webview, - const std::wstring& tooltip_text); + const std::wstring& tooltip_text, + WebKit::WebTextDirection text_direction_hint); // Called when the text selection changed. This is only called on linux since // on other platforms the RenderView doesn't act as an editor client delegate. virtual void DidChangeSelection(bool is_empty_selection); -- cgit v1.1