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

Issue 2341923005: MD WebUI: Make cr-lazy-render get() synchronous (Closed)

Created:
4 years, 3 months ago by tsergeant
Modified:
4 years, 3 months ago
Reviewers:
michaelpg
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, dbeam+watch-elements_chromium.org, Patrick Dubroy, michaelpg+watch-md-ui_chromium.org, dbeam+watch-history_chromium.org, pam+watch_chromium.org, arv+watch_chromium.org, oshima+watch_chromium.org, michaelpg+watch-elements_chromium.org, stevenjb+watch-md-settings_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MD WebUI: Make cr-lazy-render get() synchronous dom-if and similar stamp their templates asynchronously, because it's not a great idea to block execution to stamp out DOM as a result of changes to properties. cr-lazy-render does not really share the same concerns: it will only stamp when explicitly told to, and the caller should be aware of how long this could take. As such, there is no particular reason to prefer async stamping. This CL changes all existing usage of cr-lazy-render to be synchronous, which simplifies both application code and tests. An asynchronous API could still be added in the future, if required. BUG=642200 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/cede888c27275835e5aaadf5dac49379eb3ac106 Cr-Commit-Position: refs/heads/master@{#419407}

Patch Set 1 #

Patch Set 2 : Simplify test more #

Total comments: 2

Patch Set 3 : Closure #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -139 lines) Patch
M chrome/browser/resources/md_history/app.crisper.js View 1 2 3 5 chunks +13 lines, -27 lines 0 comments Download
M chrome/browser/resources/md_history/history_toolbar.js View 1 chunk +6 lines, -7 lines 0 comments Download
M chrome/browser/resources/md_history/list_container.js View 2 chunks +3 lines, -8 lines 0 comments Download
M chrome/browser/resources/md_history/synced_device_manager.js View 1 2 1 chunk +7 lines, -8 lines 0 comments Download
M chrome/test/data/webui/cr_elements/cr_lazy_render_tests.js View 1 2 chunks +17 lines, -23 lines 0 comments Download
M chrome/test/data/webui/md_history/history_grouped_list_test.js View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/data/webui/md_history/history_list_test.js View 4 chunks +6 lines, -13 lines 0 comments Download
M chrome/test/data/webui/md_history/history_overflow_menu_test.js View 2 chunks +25 lines, -32 lines 0 comments Download
M ui/webui/resources/cr_elements/cr_lazy_render/cr_lazy_render.js View 2 chunks +6 lines, -19 lines 0 comments Download

Messages

Total messages: 20 (12 generated)
tsergeant
As discussed, PTAL
4 years, 3 months ago (2016-09-16 06:40:42 UTC) #7
michaelpg
lgtm https://codereview.chromium.org/2341923005/diff/20001/chrome/browser/resources/md_history/synced_device_manager.js File chrome/browser/resources/md_history/synced_device_manager.js (right): https://codereview.chromium.org/2341923005/diff/20001/chrome/browser/resources/md_history/synced_device_manager.js#newcode137 chrome/browser/resources/md_history/synced_device_manager.js:137: var menu = this.$.menu.get(); /** @type {CrSharedMenuElement} */
4 years, 3 months ago (2016-09-16 23:18:41 UTC) #8
tsergeant
https://codereview.chromium.org/2341923005/diff/20001/chrome/browser/resources/md_history/synced_device_manager.js File chrome/browser/resources/md_history/synced_device_manager.js (right): https://codereview.chromium.org/2341923005/diff/20001/chrome/browser/resources/md_history/synced_device_manager.js#newcode137 chrome/browser/resources/md_history/synced_device_manager.js:137: var menu = this.$.menu.get(); On 2016/09/16 23:18:40, michaelpg wrote: ...
4 years, 3 months ago (2016-09-19 00:39:18 UTC) #9
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/2341923005/40001
4 years, 3 months ago (2016-09-19 00:39:54 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/270550)
4 years, 3 months ago (2016-09-19 00:42:24 UTC) #14
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/2341923005/60001
4 years, 3 months ago (2016-09-19 00:49:18 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-09-19 01:55:13 UTC) #18
commit-bot: I haz the power
4 years, 3 months ago (2016-09-19 01:57:17 UTC) #20
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/cede888c27275835e5aaadf5dac49379eb3ac106
Cr-Commit-Position: refs/heads/master@{#419407}

Powered by Google App Engine
This is Rietveld 408576698