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

Issue 1318483007: Implement "Look Up In Dictionary" context menu item asynchronously. (OS X) (Closed)

Created:
5 years, 3 months ago by Shu Chen
Modified:
5 years, 3 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, yusukes+watch_chromium.org, shuchen+watch_chromium.org, jam, nona+watch_chromium.org, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, James Su
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement "Look Up In Dictionary" context menu item asynchronously. (OS X) Reduces the number of callers of the synchronous IPC in TextInputClientMac::GetAttributedSubstringFromRange() (so that eventually we can remove it). Note: This is the second attempt to commit cl https://codereview.chromium.org/1313553006, which caused regression crbug.com/528929, because the point getten from selection range may not be accurate to get the string through GetStringAtPoint. This cl fixes that issue by leveraging TextInputClientMsg_StringForRange IPCs instead of TextInputClientMsg_StringAtPoint. The change is cross browser & blink so it is 2-way patches. This cl is based on the blink cl https://codereview.chromium.org/1329103002. TextInputClientObserver::OnStringForRange() will send the IPC TextInputClientReplyMsg_GotStringForRange to carry the basepiont info, which is got by the new change in blink. So this cl should be landed after https://codereview.chromium.org/1329103002 is landed. TBR=sievers@chromium.org BUG=121917 TEST=crbug.com/528929 not repro; Select multiple words and lookup dictionary by context menu can work well; Select non-English words (e.g. Japanese/Chinese) and lookup dictionary by context menu can work well. Committed: https://crrev.com/3146b3a43b240dcc6d64d5dc6986a311505104e8 Cr-Commit-Position: refs/heads/master@{#350164}

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : addressed palmer's comment. #

Total comments: 14

Patch Set 4 : addressed asvitkine@'s comments. #

Total comments: 16

Patch Set 5 : addressed review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -61 lines) Patch
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 2 chunks +46 lines, -10 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_dictionary_helper.mm View 1 chunk +1 line, -32 lines 0 comments Download
M content/browser/renderer_host/text_input_client_mac.h View 1 2 3 4 2 chunks +25 lines, -4 lines 0 comments Download
M content/browser/renderer_host/text_input_client_mac.mm View 1 2 3 4 1 chunk +26 lines, -6 lines 0 comments Download
M content/browser/renderer_host/text_input_client_message_filter.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/text_input_client_message_filter.mm View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M content/common/text_input_client_messages.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/text_input_client_observer.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 27 (5 generated)
Shu Chen
Please review the cl, thanks.
5 years, 3 months ago (2015-09-08 05:33:57 UTC) #2
Shu Chen
This cl should be combined with another cl in blink: https://codereview.chromium.org/1329103002. How to combine the ...
5 years, 3 months ago (2015-09-08 05:47:51 UTC) #3
Alexei Svitkine (slow)
On 2015/09/08 05:47:51, Shu Chen wrote: > This cl should be combined with another cl ...
5 years, 3 months ago (2015-09-08 15:56:45 UTC) #4
palmer
https://codereview.chromium.org/1318483007/diff/20001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/1318483007/diff/20001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode2448 content/browser/renderer_host/render_widget_host_view_mac.mm:2448: // TODO: support GetStringAtPoint() for PDF. See crbug.com/152438. Why ...
5 years, 3 months ago (2015-09-09 23:24:17 UTC) #5
Shu Chen
https://codereview.chromium.org/1318483007/diff/20001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/1318483007/diff/20001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode2448 content/browser/renderer_host/render_widget_host_view_mac.mm:2448: // TODO: support GetStringAtPoint() for PDF. See crbug.com/152438. On ...
5 years, 3 months ago (2015-09-10 01:26:03 UTC) #6
Alexei Svitkine (slow)
Can you expand the TEST= section with more concrete steps to test the various edge ...
5 years, 3 months ago (2015-09-10 04:27:46 UTC) #7
Shu Chen
On 2015/09/10 04:27:46, Alexei Svitkine wrote: > Can you expand the TEST= section with more ...
5 years, 3 months ago (2015-09-11 02:41:54 UTC) #8
palmer
lgtm
5 years, 3 months ago (2015-09-11 21:34:36 UTC) #9
Alexei Svitkine (slow)
Can you summarize the approach you'll use for the 2-way patch between Chromium and Blink? ...
5 years, 3 months ago (2015-09-14 14:56:31 UTC) #10
Shu Chen
On 2015/09/14 14:56:31, Alexei Svitkine wrote: > Can you summarize the approach you'll use for ...
5 years, 3 months ago (2015-09-15 01:40:04 UTC) #11
Shu Chen
Pinging. Alexei, mind taking another look? Thanks
5 years, 3 months ago (2015-09-18 02:40:56 UTC) #12
Alexei Svitkine (slow)
https://codereview.chromium.org/1318483007/diff/40001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/1318483007/diff/40001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode2435 content/browser/renderer_host/render_widget_host_view_mac.mm:2435: ^(NSAttributedString* string, NSPoint baselinePoint) { Is there a reason ...
5 years, 3 months ago (2015-09-18 16:48:43 UTC) #13
Shu Chen
https://codereview.chromium.org/1318483007/diff/40001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/1318483007/diff/40001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode2435 content/browser/renderer_host/render_widget_host_view_mac.mm:2435: ^(NSAttributedString* string, NSPoint baselinePoint) { On 2015/09/18 16:48:43, Alexei ...
5 years, 3 months ago (2015-09-21 02:47:40 UTC) #14
Alexei Svitkine (slow)
https://codereview.chromium.org/1318483007/diff/60001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/1318483007/diff/60001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode2441 content/browser/renderer_host/render_widget_host_view_mac.mm:2441: // at point. Until it does, use NSPerformService(), which ...
5 years, 3 months ago (2015-09-21 15:47:56 UTC) #15
Shu Chen
https://codereview.chromium.org/1318483007/diff/60001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/1318483007/diff/60001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode2441 content/browser/renderer_host/render_widget_host_view_mac.mm:2441: // at point. Until it does, use NSPerformService(), which ...
5 years, 3 months ago (2015-09-22 05:46:09 UTC) #16
Alexei Svitkine (slow)
lgtm
5 years, 3 months ago (2015-09-22 14:59:27 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1318483007/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1318483007/80001
5 years, 3 months ago (2015-09-22 15:05:49 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/102460)
5 years, 3 months ago (2015-09-22 15:14:54 UTC) #22
Shu Chen
TBR'ed sievers@ for rubber stamp on text_input_client_observer.cc.
5 years, 3 months ago (2015-09-22 15:23:06 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1318483007/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1318483007/80001
5 years, 3 months ago (2015-09-22 15:24:16 UTC) #25
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 3 months ago (2015-09-22 16:08:34 UTC) #26
commit-bot: I haz the power
5 years, 3 months ago (2015-09-22 16:09:19 UTC) #27
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/3146b3a43b240dcc6d64d5dc6986a311505104e8
Cr-Commit-Position: refs/heads/master@{#350164}

Powered by Google App Engine
This is Rietveld 408576698