OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |