Chromium Code Reviews| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 497 if (delegate) { | 498 if (delegate) { |
| 498 if (result.isLiveLink() && !result.absoluteLinkURL().string().isEmpty()) { | 499 if (result.isLiveLink() && !result.absoluteLinkURL().string().isEmpty()) { |
| 499 delegate->UpdateTargetURL( | 500 delegate->UpdateTargetURL( |
| 500 webview_, webkit_glue::KURLToGURL(result.absoluteLinkURL())); | 501 webview_, webkit_glue::KURLToGURL(result.absoluteLinkURL())); |
| 501 } else { | 502 } else { |
| 502 delegate->UpdateTargetURL(webview_, GURL()); | 503 delegate->UpdateTargetURL(webview_, GURL()); |
| 503 } | 504 } |
| 504 } | 505 } |
| 505 } | 506 } |
| 506 | 507 |
| 507 void ChromeClientImpl::setToolTip(const WebCore::String& tooltip_text) { | 508 void ChromeClientImpl::setToolTip(const WebCore::String& tooltip_text, |
| 509 WebCore::TextDirection dir) { | |
| 508 if (webview_->delegate()) { | 510 if (webview_->delegate()) { |
| 509 std::wstring tooltip_text_as_wstring = | 511 std::wstring tooltip_text_as_wstring = |
| 510 webkit_glue::StringToStdWString(tooltip_text); | 512 webkit_glue::StringToStdWString(tooltip_text); |
| 513 if (dir == WebCore::LTR) { | |
| 514 // Force the tooltip to have LTR directionality. | |
| 515 tooltip_text_as_wstring.insert(0, 1, WebCore::leftToRightEmbed); | |
| 516 tooltip_text_as_wstring.push_back(WebCore::popDirectionalFormatting); | |
|
idana
2009/07/20 20:50:10
Are you sure that it is safe to insert these chara
jungshik at Google
2009/07/20 21:18:33
It's whether or not 'install files for complex scr
xji
2009/07/20 23:51:04
I unchecked "install files for complex script and
| |
| 517 } else { | |
| 518 // Force the tooltip to have RTL directionality. | |
| 519 tooltip_text_as_wstring.insert(0, 1, WebCore::rightToLeftEmbed); | |
| 520 tooltip_text_as_wstring.push_back(WebCore::popDirectionalFormatting); | |
| 521 } | |
| 511 webview_->delegate()->SetTooltipText(webview_, tooltip_text_as_wstring); | 522 webview_->delegate()->SetTooltipText(webview_, tooltip_text_as_wstring); |
| 512 } | 523 } |
| 513 } | 524 } |
| 514 | 525 |
| 515 void ChromeClientImpl::print(WebCore::Frame* frame) { | 526 void ChromeClientImpl::print(WebCore::Frame* frame) { |
| 516 WebViewDelegate* delegate = webview_->delegate(); | 527 WebViewDelegate* delegate = webview_->delegate(); |
| 517 if (delegate) { | 528 if (delegate) { |
| 518 delegate->ScriptedPrint(WebFrameImpl::FromFrame(frame)); | 529 delegate->ScriptedPrint(WebFrameImpl::FromFrame(frame)); |
| 519 } | 530 } |
| 520 } | 531 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 620 // EventHandler.cpp and since we don't want that we set a flag indicating | 631 // EventHandler.cpp and since we don't want that we set a flag indicating |
| 621 // that the next SetCursor call is to be ignored. | 632 // that the next SetCursor call is to be ignored. |
| 622 ignore_next_set_cursor_ = true; | 633 ignore_next_set_cursor_ = true; |
| 623 } | 634 } |
| 624 | 635 |
| 625 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { | 636 void ChromeClientImpl::formStateDidChange(const WebCore::Node*) { |
| 626 WebViewDelegate* delegate = webview_->delegate(); | 637 WebViewDelegate* delegate = webview_->delegate(); |
| 627 if (delegate) | 638 if (delegate) |
| 628 delegate->OnNavStateChanged(webview_); | 639 delegate->OnNavStateChanged(webview_); |
| 629 } | 640 } |
| OLD | NEW |