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

Side by Side Diff: webkit/glue/chrome_client_impl.cc

Issue 160169: Merge 21266 - This CL fixes issue 5996: Tooltip gets direction from Chrome la... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/chrome_client_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/src/webkit/glue/chrome_client_impl.cc:r3734-4217,4606-5108,5177-5263
Merged /trunk/src/webkit/glue/chrome_client_impl.cc:r21266
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 8
9 MSVC_PUSH_WARNING_LEVEL(0); 9 MSVC_PUSH_WARNING_LEVEL(0);
10 #include "AccessibilityObject.h" 10 #include "AccessibilityObject.h"
11 #include "AXObjectCache.h" 11 #include "AXObjectCache.h"
12 #include "CharacterNames.h"
12 #include "Console.h" 13 #include "Console.h"
13 #include "Cursor.h" 14 #include "Cursor.h"
14 #include "Document.h" 15 #include "Document.h"
15 #include "DocumentLoader.h" 16 #include "DocumentLoader.h"
16 #include "FloatRect.h" 17 #include "FloatRect.h"
17 #include "FileChooser.h" 18 #include "FileChooser.h"
18 #include "FrameLoadRequest.h" 19 #include "FrameLoadRequest.h"
19 #include "FrameView.h" 20 #include "FrameView.h"
20 #include "HitTestResult.h" 21 #include "HitTestResult.h"
21 #include "IntRect.h" 22 #include "IntRect.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 if (delegate) { 501 if (delegate) {
501 if (result.isLiveLink() && !result.absoluteLinkURL().string().isEmpty()) { 502 if (result.isLiveLink() && !result.absoluteLinkURL().string().isEmpty()) {
502 delegate->UpdateTargetURL( 503 delegate->UpdateTargetURL(
503 webview_, webkit_glue::KURLToGURL(result.absoluteLinkURL())); 504 webview_, webkit_glue::KURLToGURL(result.absoluteLinkURL()));
504 } else { 505 } else {
505 delegate->UpdateTargetURL(webview_, GURL()); 506 delegate->UpdateTargetURL(webview_, GURL());
506 } 507 }
507 } 508 }
508 } 509 }
509 510
510 void ChromeClientImpl::setToolTip(const WebCore::String& tooltip_text) { 511 void ChromeClientImpl::setToolTip(const WebCore::String& tooltip_text,
512 WebCore::TextDirection dir) {
511 if (webview_->delegate()) { 513 if (webview_->delegate()) {
512 std::wstring tooltip_text_as_wstring = 514 std::wstring tooltip_text_as_wstring =
513 webkit_glue::StringToStdWString(tooltip_text); 515 webkit_glue::StringToStdWString(tooltip_text);
516 if (dir == WebCore::LTR) {
517 // Force the tooltip to have LTR directionality.
518 tooltip_text_as_wstring.insert(0, 1, WebCore::leftToRightEmbed);
519 tooltip_text_as_wstring.push_back(WebCore::popDirectionalFormatting);
520 } else {
521 // Force the tooltip to have RTL directionality.
522 tooltip_text_as_wstring.insert(0, 1, WebCore::rightToLeftEmbed);
523 tooltip_text_as_wstring.push_back(WebCore::popDirectionalFormatting);
524 }
514 webview_->delegate()->SetTooltipText(webview_, tooltip_text_as_wstring); 525 webview_->delegate()->SetTooltipText(webview_, tooltip_text_as_wstring);
515 } 526 }
516 } 527 }
517 528
518 void ChromeClientImpl::print(WebCore::Frame* frame) { 529 void ChromeClientImpl::print(WebCore::Frame* frame) {
519 WebViewDelegate* delegate = webview_->delegate(); 530 WebViewDelegate* delegate = webview_->delegate();
520 if (delegate) { 531 if (delegate) {
521 delegate->ScriptedPrint(WebFrameImpl::FromFrame(frame)); 532 delegate->ScriptedPrint(WebFrameImpl::FromFrame(frame));
522 } 533 }
523 } 534 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 break; 627 break;
617 default: 628 default:
618 NOTREACHED(); 629 NOTREACHED();
619 } 630 }
620 } 631 }
621 632
622 info->itemHeight = popup_container->menuItemHeight(); 633 info->itemHeight = popup_container->menuItemHeight();
623 info->selectedIndex = popup_container->selectedIndex(); 634 info->selectedIndex = popup_container->selectedIndex();
624 info->items.swap(output_items); 635 info->items.swap(output_items);
625 } 636 }
OLDNEW
« no previous file with comments | « webkit/glue/chrome_client_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698