Index: content/browser/renderer_host/render_view_host.cc |
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc |
index 96eb779197adf1d95a319c8970562f077ba82f88..7f0b92be3287431759504b8cc1f35fce94a15f9f 100644 |
--- a/content/browser/renderer_host/render_view_host.cc |
+++ b/content/browser/renderer_host/render_view_host.cc |
@@ -652,7 +652,6 @@ bool RenderViewHost::OnMessageReceived(const IPC::Message& msg) { |
IPC_MESSAGE_HANDLER(ViewHostMsg_OpenURL, OnMsgOpenURL) |
IPC_MESSAGE_HANDLER(ViewHostMsg_DidContentsPreferredSizeChange, |
OnMsgDidContentsPreferredSizeChange) |
- IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnMsgSetTooltipText) |
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunJavaScriptMessage, |
OnMsgRunJavaScriptMessage) |
IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_RunBeforeUnloadConfirm, |
@@ -957,38 +956,6 @@ void RenderViewHost::OnMsgDidContentsPreferredSizeChange( |
view->UpdatePreferredSize(new_size); |
} |
-void RenderViewHost::OnMsgSetTooltipText( |
- const std::wstring& tooltip_text, |
- WebTextDirection text_direction_hint) { |
- // First, add directionality marks around tooltip text if necessary. |
- // A naive solution would be to simply always wrap the text. However, on |
- // windows, Unicode directional embedding characters can't be displayed on |
- // systems that lack RTL fonts and are instead displayed as empty squares. |
- // |
- // To get around this we only wrap the string when we deem it necessary i.e. |
- // when the locale direction is different than the tooltip direction hint. |
- // |
- // Currently, we use element's directionality as the tooltip direction hint. |
- // An alternate solution would be to set the overall directionality based on |
- // trying to detect the directionality from the tooltip text rather than the |
- // element direction. One could argue that would be a preferable solution |
- // but we use the current approach to match Fx & IE's behavior. |
- string16 wrapped_tooltip_text = WideToUTF16(tooltip_text); |
- if (!tooltip_text.empty()) { |
- if (text_direction_hint == WebKit::WebTextDirectionLeftToRight) { |
- // Force the tooltip to have LTR directionality. |
- wrapped_tooltip_text = |
- base::i18n::GetDisplayStringInLTRDirectionality(wrapped_tooltip_text); |
- } else if (text_direction_hint == WebKit::WebTextDirectionRightToLeft && |
- !base::i18n::IsRTL()) { |
- // Force the tooltip to have RTL directionality. |
- base::i18n::WrapStringWithRTLFormatting(&wrapped_tooltip_text); |
- } |
- } |
- if (view()) |
- view()->SetTooltipText(UTF16ToWide(wrapped_tooltip_text)); |
-} |
- |
void RenderViewHost::OnMsgSelectionChanged(const std::string& text, |
const ui::Range& range) { |
if (view()) |