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

Issue 2180823004: Migrate <cr-dialog> from PaperDialogBehavior to native <dialog>. (Closed)

Created:
4 years, 5 months ago by dpapad
Modified:
4 years, 4 months ago
Reviewers:
Dan Beam
CC:
arv+watch_chromium.org, chromium-reviews, dbeam+watch-settings_chromium.org, dbeam+watch-closure_chromium.org, dbeam+watch-elements_chromium.org, dbeam+watch-history_chromium.org, Patrick Dubroy, gcasto+watchlist_chromium.org, jlklein+watch-closure_chromium.org, michaelpg+watch-md-ui_chromium.org, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-elements_chromium.org, oshima+watch_chromium.org, pam+watch_chromium.org, stevenjb+watch-md-settings_chromium.org, vabr+watchlistpasswordmanager_chromium.org, vitalyp+closure_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Migrate <cr-dialog> from PaperDialogBehavior to native <dialog>. - Make <cr-dialog> extend a native <dialog> element. - Modify <cr-dialog> API as follows Events renamed: 'iron-overlay-closed' -> 'close' 'iron-overlay-canceled' -> 'cancel' 'iron-overlay-opened' -> No equivalent event. Can be added if it turns out to be necessary. Method rename: 'open()' -> 'showModal()' Attribute rename: 'opened' -> 'open' Also since HTMLDialogElement#showModal() and HTMLDialogElement#close() are stricter than equivalent PaperDialogBehavior methods, the following <cr-dialog> behavioral changes are caused by this migration. 1) Calling showModal() when the element is not in the DOM throws exception. 2) Calling showModal()/close() when dialog is already opened/closed throws exception. BUG=625332 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/0501e1b4e707a2d7f4a0525f2f9b0b1ba2dac644 Cr-Commit-Position: refs/heads/master@{#408495}

Patch Set 1 #

Total comments: 10

Patch Set 2 : Populating |returnValue|. #

Total comments: 4

Patch Set 3 : Address comments. #

Total comments: 11

Patch Set 4 : Address comments, fix cancel() #

Patch Set 5 : Merge conflicts with Tommy's CL. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+257 lines, -263 lines) Patch
M chrome/browser/resources/md_history/list_container.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/md_history/list_container.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/about_page/channel_switcher_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/about_page/channel_switcher_dialog.js View 3 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/resources/settings/about_page/detailed_build_info.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js View 1 2 3 chunks +16 lines, -12 lines 0 comments Download
M chrome/browser/resources/settings/bluetooth_page/bluetooth_page.html View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js View 2 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/resources/settings/bluetooth_page/compiled_resources2.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/settings/certificate_manager_page/ca_trust_edit_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/certificate_manager_page/ca_trust_edit_dialog.js View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/certificate_manager_page/certificate_delete_confirmation_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/certificate_manager_page/certificate_delete_confirmation_dialog.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/certificate_manager_page/certificate_manager_page.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/certificate_manager_page/certificate_password_decryption_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/certificate_manager_page/certificate_password_decryption_dialog.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/certificate_manager_page/certificate_password_encryption_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/certificate_manager_page/certificate_password_encryption_dialog.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/certificate_manager_page/certificates_error_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/certificate_manager_page/certificates_error_dialog.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.html View 1 2 3 3 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_dialog.js View 4 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/resources/settings/clear_browsing_data_dialog/history_deletion_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/clear_browsing_data_dialog/history_deletion_dialog.js View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/device_page/display_overscan_dialog.html View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/resources/settings/device_page/display_overscan_dialog.js View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/on_startup_page/startup_url_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/on_startup_page/startup_url_dialog.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/on_startup_page/startup_urls_page.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.js View 2 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.html View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.js View 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/browser/resources/settings/passwords_and_forms_page/credit_card_edit_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/passwords_and_forms_page/credit_card_edit_dialog.js View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.js View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M chrome/browser/resources/settings/people_page/compiled_resources2.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/settings/people_page/easy_unlock_turn_off_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/people_page/easy_unlock_turn_off_dialog.js View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/resources/settings/people_page/people_page.html View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/people_page/people_page.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/people_page/users_add_user_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/people_page/users_add_user_dialog.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/privacy_page/privacy_page.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/privacy_page/privacy_page.js View 1 2 3 4 2 chunks +3 lines, -18 lines 0 comments Download
M chrome/browser/resources/settings/reset_page/powerwash_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/reset_page/powerwash_dialog.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/reset_page/reset_page.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/reset_page/reset_profile_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/reset_page/reset_profile_dialog.js View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/search_engines_page/search_engine_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/search_engines_page/search_engine_dialog.js View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/search_engines_page/search_engine_entry.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/search_engines_page/search_engines_page.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/site_settings/add_site_dialog.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/site_settings/add_site_dialog.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/site_settings/site_data_details_dialog.html View 1 2 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/resources/settings/site_settings/site_data_details_dialog.js View 1 2 7 chunks +14 lines, -1 line 0 comments Download
M chrome/browser/resources/settings/site_settings/site_list.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/webui/md_history/history_list_test.js View 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/test/data/webui/settings/bluetooth_page_browsertest_chromeos.js View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/test/data/webui/settings/certificate_manager_page_test.js View 1 2 13 chunks +35 lines, -14 lines 0 comments Download
M chrome/test/data/webui/settings/device_page_tests.js View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M chrome/test/data/webui/settings/easy_unlock_browsertest_chromeos.js View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/webui/settings/fake_bluetooth.js View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/test/data/webui/settings/people_page_test.js View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/test/data/webui/settings/privacy_page_test.js View 6 chunks +8 lines, -8 lines 0 comments Download
M chrome/test/data/webui/settings/reset_page_test.js View 3 chunks +15 lines, -25 lines 0 comments Download
M chrome/test/data/webui/settings/settings_autofill_section_browsertest.js View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/test/data/webui/settings/startup_urls_page_test.js View 4 chunks +4 lines, -4 lines 0 comments Download
M ui/webui/resources/cr_elements/cr_dialog/cr_dialog.html View 1 2 3 chunks +14 lines, -16 lines 0 comments Download
M ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js View 1 2 3 1 chunk +18 lines, -31 lines 0 comments Download

Messages

Total messages: 33 (14 generated)
dpapad
Per offline discussion, I merged the previous two <dialog> CLs (https://codereview.chromium.org/2059723003 and https://codereview.chromium.org/2170213002) to a ...
4 years, 5 months ago (2016-07-25 23:01:17 UTC) #6
dpapad
Uploaded changes regarding populating the |returnValue| to allow listeners to detect cancel from the 'close' ...
4 years, 4 months ago (2016-07-26 23:22:17 UTC) #9
Dan Beam
looks pretty good to em https://codereview.chromium.org/2180823004/diff/1/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js File chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js (right): https://codereview.chromium.org/2180823004/diff/1/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js#newcode357 chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js:357: }, arguable nit: this ...
4 years, 4 months ago (2016-07-26 23:36:13 UTC) #10
dpapad
https://codereview.chromium.org/2180823004/diff/1/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js File chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js (right): https://codereview.chromium.org/2180823004/diff/1/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js#newcode357 chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.js:357: }, On 2016/07/26 at 23:36:12, Dan Beam wrote: > ...
4 years, 4 months ago (2016-07-27 01:21:47 UTC) #11
dpapad
Regarding the CBD double dialog issue, here is the visual difference of before and after ...
4 years, 4 months ago (2016-07-27 01:54:16 UTC) #12
michaelpg
Not familiar with any of the dialog stuff, so don't consider me a reviewer, but ...
4 years, 4 months ago (2016-07-28 16:50:51 UTC) #13
Dan Beam
https://codereview.chromium.org/2180823004/diff/40001/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js File ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js (right): https://codereview.chromium.org/2180823004/diff/40001/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js#newcode10 ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js:10: * the 'close' callback to determine whether it was ...
4 years, 4 months ago (2016-07-28 17:31:44 UTC) #14
Dan Beam
On 2016/07/27 01:54:16, dpapad wrote: > Regarding the CBD double dialog issue, here is the ...
4 years, 4 months ago (2016-07-28 17:33:16 UTC) #15
dpapad
On 2016/07/28 at 17:33:16, dbeam wrote: > On 2016/07/27 01:54:16, dpapad wrote: > > Regarding ...
4 years, 4 months ago (2016-07-28 18:47:24 UTC) #16
dpapad
https://codereview.chromium.org/2180823004/diff/40001/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js File ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js (right): https://codereview.chromium.org/2180823004/diff/40001/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js#newcode19 ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js:19: HTMLDialogElement.prototype.close.call(this); On 2016/07/28 at 17:31:43, Dan Beam wrote: > ...
4 years, 4 months ago (2016-07-28 18:47:34 UTC) #17
Dan Beam
On 2016/07/28 18:47:34, dpapad wrote: > https://codereview.chromium.org/2180823004/diff/40001/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js > File ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js (right): > > https://codereview.chromium.org/2180823004/diff/40001/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js#newcode19 > ...
4 years, 4 months ago (2016-07-28 19:06:23 UTC) #18
Dan Beam
lgtm https://codereview.chromium.org/2180823004/diff/40001/chrome/test/data/webui/settings/certificate_manager_page_test.js File chrome/test/data/webui/settings/certificate_manager_page_test.js (right): https://codereview.chromium.org/2180823004/diff/40001/chrome/test/data/webui/settings/certificate_manager_page_test.js#newcode732 chrome/test/data/webui/settings/certificate_manager_page_test.js:732: var observer = new MutationObserver(function(mutations) { mind == ...
4 years, 4 months ago (2016-07-28 19:09:35 UTC) #19
dpapad
Thank you. https://codereview.chromium.org/2180823004/diff/40001/chrome/test/data/webui/settings/certificate_manager_page_test.js File chrome/test/data/webui/settings/certificate_manager_page_test.js (right): https://codereview.chromium.org/2180823004/diff/40001/chrome/test/data/webui/settings/certificate_manager_page_test.js#newcode732 chrome/test/data/webui/settings/certificate_manager_page_test.js:732: var observer = new MutationObserver(function(mutations) { On ...
4 years, 4 months ago (2016-07-28 19:29:31 UTC) #20
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/2180823004/60001
4 years, 4 months ago (2016-07-28 19:35:22 UTC) #22
commit-bot: I haz the power
Failed to apply patch for chrome/browser/resources/settings/privacy_page/privacy_page.js: While running git apply --index -3 -p1; error: patch ...
4 years, 4 months ago (2016-07-28 20:42:22 UTC) #24
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/2180823004/80001
4 years, 4 months ago (2016-07-28 20:54:23 UTC) #27
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/2180823004/80001
4 years, 4 months ago (2016-07-28 21:32:52 UTC) #30
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-07-28 21:54:49 UTC) #31
commit-bot: I haz the power
4 years, 4 months ago (2016-07-28 21:56:39 UTC) #33
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/0501e1b4e707a2d7f4a0525f2f9b0b1ba2dac644
Cr-Commit-Position: refs/heads/master@{#408495}

Powered by Google App Engine
This is Rietveld 408576698