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

Issue 2801213004: Eliminate extra Native->JS->Native roundrip when showing context menu. (Closed)

Created:
3 years, 8 months ago by Eugene But (OOO till 7-30)
Modified:
3 years, 8 months ago
Reviewers:
michaeldo, danyao
CC:
chromium-reviews, Eugene But (OOO till 7-30), ios-reviews+web_chromium.org, ios-reviews_chromium.org, danyao
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Eliminate extra Native->JS->Native roundrip when showing context menu. Context menu presentation success relies on performance of getElementFromPoint. If getElementFromPoint returns after long press was recognized then Chrome misses the chance to show context menu and WKWebView context menu shows up. Merged |fetchWebPageWidthWithCompletionHandler:| and |__gCrWeb.getElementFromPoint| together to improve script execution speed. This should make Chrome context menu failures less frequent. BUG=542933 Review-Url: https://codereview.chromium.org/2801213004 Cr-Commit-Position: refs/heads/master@{#463288} Committed: https://chromium.googlesource.com/chromium/src/+/b35602e4c8046e6d97e65b2cd35036c29984ec9e

Patch Set 1 #

Patch Set 2 : Fixed tests #

Patch Set 3 : Fixed tests #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -66 lines) Patch
M ios/web/web_state/js/core_js_unittest.mm View 1 2 7 chunks +44 lines, -23 lines 2 comments Download
M ios/web/web_state/js/resources/context_menu.js View 3 chunks +38 lines, -18 lines 0 comments Download
M ios/web/web_state/ui/crw_context_menu_controller.mm View 1 2 chunks +11 lines, -25 lines 0 comments Download

Messages

Total messages: 21 (14 generated)
Eugene But (OOO till 7-30)
3 years, 8 months ago (2017-04-08 00:41:50 UTC) #11
michaeldo
lgtm!
3 years, 8 months ago (2017-04-10 16:08:02 UTC) #12
Eugene But (OOO till 7-30)
Thanks! I believe that eg test failure is unrelated to this change.
3 years, 8 months ago (2017-04-10 16:09:24 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2801213004/40001
3 years, 8 months ago (2017-04-10 16:09:59 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/b35602e4c8046e6d97e65b2cd35036c29984ec9e
3 years, 8 months ago (2017-04-10 16:25:37 UTC) #18
danyao
https://codereview.chromium.org/2801213004/diff/40001/ios/web/web_state/js/core_js_unittest.mm File ios/web/web_state/js/core_js_unittest.mm (right): https://codereview.chromium.org/2801213004/diff/40001/ios/web/web_state/js/core_js_unittest.mm#newcode24 ios/web/web_state/js/core_js_unittest.mm:24: struct TestScriptAndExpectedValue { Can we remove this struct now? ...
3 years, 8 months ago (2017-04-10 17:53:07 UTC) #20
danyao
3 years, 8 months ago (2017-04-10 18:32:57 UTC) #21
Message was sent while issue was closed.
https://codereview.chromium.org/2801213004/diff/40001/ios/web/web_state/js/co...
File ios/web/web_state/js/core_js_unittest.mm (right):

https://codereview.chromium.org/2801213004/diff/40001/ios/web/web_state/js/co...
ios/web/web_state/js/core_js_unittest.mm:24: struct TestScriptAndExpectedValue {
Never mind. I was blind and missed the usage in stringify().

Powered by Google App Engine
This is Rietveld 408576698