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

Unified Diff: content/renderer/text_input_client_observer.cc

Issue 1318483007: Implement "Look Up In Dictionary" context menu item asynchronously. (OS X) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed review comments. Created 5 years, 3 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 | « content/common/text_input_client_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/text_input_client_observer.cc
diff --git a/content/renderer/text_input_client_observer.cc b/content/renderer/text_input_client_observer.cc
index 049f87c5e025f26fdb51d285074d7d3d5f5a16ea..87c7486f7b291aed8db0115ee5ffa40698821763 100644
--- a/content/renderer/text_input_client_observer.cc
+++ b/content/renderer/text_input_client_observer.cc
@@ -88,16 +88,17 @@ void TextInputClientObserver::OnFirstRectForCharacterRange(gfx::Range range) {
void TextInputClientObserver::OnStringForRange(gfx::Range range) {
#if defined(OS_MACOSX)
+ blink::WebPoint baselinePoint;
NSAttributedString* string = nil;
blink::WebLocalFrame* frame = webview()->focusedFrame()->toWebLocalFrame();
if (frame) {
string = blink::WebSubstringUtil::attributedSubstringInRange(
- frame, range.start(), range.length());
+ frame, range.start(), range.length(), &baselinePoint);
}
scoped_ptr<const mac::AttributedStringCoder::EncodedString> encoded(
mac::AttributedStringCoder::Encode(string));
Send(new TextInputClientReplyMsg_GotStringForRange(routing_id(),
- *encoded.get()));
+ *encoded.get(), baselinePoint));
#else
NOTIMPLEMENTED();
#endif
« no previous file with comments | « content/common/text_input_client_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698