Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: webkit/glue/chrome_client_impl.cc

Issue 160189: Merge 21353 - This CL fixes issue 17468 Regression: Extra white rectangle sh... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/chrome_client_impl.cc
===================================================================
--- webkit/glue/chrome_client_impl.cc (revision 21688)
+++ webkit/glue/chrome_client_impl.cc (working copy)
@@ -517,14 +517,16 @@
if (webview_->delegate()) {
std::wstring tooltip_text_as_wstring =
webkit_glue::StringToStdWString(tooltip_text);
- if (dir == WebCore::LTR) {
- // Force the tooltip to have LTR directionality.
- tooltip_text_as_wstring.insert(0, 1, WebCore::leftToRightEmbed);
- tooltip_text_as_wstring.push_back(WebCore::popDirectionalFormatting);
- } else {
- // Force the tooltip to have RTL directionality.
- tooltip_text_as_wstring.insert(0, 1, WebCore::rightToLeftEmbed);
- tooltip_text_as_wstring.push_back(WebCore::popDirectionalFormatting);
+ if (!tooltip_text_as_wstring.empty()) {
+ if (dir == WebCore::LTR) {
+ // Force the tooltip to have LTR directionality.
+ tooltip_text_as_wstring.insert(0, 1, WebCore::leftToRightEmbed);
+ tooltip_text_as_wstring.push_back(WebCore::popDirectionalFormatting);
+ } else {
+ // Force the tooltip to have RTL directionality.
+ tooltip_text_as_wstring.insert(0, 1, WebCore::rightToLeftEmbed);
+ tooltip_text_as_wstring.push_back(WebCore::popDirectionalFormatting);
+ }
}
webview_->delegate()->SetTooltipText(webview_, tooltip_text_as_wstring);
}
Property changes on: webkit\glue\chrome_client_impl.cc
___________________________________________________________________
Modified: svn:mergeinfo
Merged /trunk/src/webkit/glue/chrome_client_impl.cc:r21353
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698