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

Issue 1304883005: Make |context| passed to queryRequiredElement optional (Closed)

Created:
5 years, 3 months ago by Dan Beam
Modified:
5 years, 3 months ago
Reviewers:
fukino
CC:
chromium-reviews, tfarina, rginda+watch_chromium.org, mtomasz+watch_chromium.org, oshima+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make |context| passed to queryRequiredElement optional The default is document (which seems reasonable to me). This remove lots of cruft like queryRequiredElement(document, '.blah'). Also change some queryRequiredElement(document, '#blah') to getRequiredElement('blah') (which is shorter, simpler, and equivalent). I think we should additionally change to $('blah') when the result is immediately used, e.g. $('blah').addEventListener(...) is preferred to getRequiredElement('blah').addEventListener(...) because there's already going to be a null check. I'll leave that up to ui/file_manager/OWNERS, though. R=fukino@chromium.org BUG=425626 Committed: https://crrev.com/5057b24914b8899420887593363b89d6c44a4e6b Cr-Commit-Position: refs/heads/master@{#345925}

Patch Set 1 : asdf #

Total comments: 2

Patch Set 2 : whoops #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -121 lines) Patch
M ui/file_manager/file_manager/common/js/util.js View 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/file_manager/foreground/js/file_manager.js View 3 chunks +4 lines, -4 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/file_transfer_controller.js View 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/file_manager/foreground/js/import_controller.js View 1 chunk +5 lines, -6 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/sort_menu_controller.js View 1 chunk +4 lines, -4 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/toolbar_controller.js View 1 chunk +5 lines, -5 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/tooltip_controller.js View 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/file_manager/foreground/js/ui/banners.js View 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/file_manager/foreground/js/ui/dialog_footer.js View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/ui/directory_tree.js View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js View 12 chunks +17 lines, -17 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/ui/gear_menu.js View 4 chunks +6 lines, -6 lines 0 comments Download
M ui/file_manager/file_manager/foreground/js/ui/list_container.js View 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/file_manager/foreground/js/ui/progress_center_panel.js View 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/file_manager/foreground/js/ui/search_box.js View 1 chunk +1 line, -1 line 0 comments Download
M ui/file_manager/gallery/js/gallery.js View 6 chunks +15 lines, -15 lines 0 comments Download
M ui/file_manager/gallery/js/image_editor/image_editor.js View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/file_manager/gallery/js/slide_mode.js View 8 chunks +17 lines, -17 lines 0 comments Download
M ui/file_manager/video_player/js/video_player.js View 1 14 chunks +24 lines, -30 lines 0 comments Download
M ui/webui/resources/js/util.js View 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
Dan Beam
5 years, 3 months ago (2015-08-26 22:20:57 UTC) #2
fukino
lgtm if the comment is addressed and trybot passes. > $('blah').addEventListener(...) I thought it wouldn't ...
5 years, 3 months ago (2015-08-27 03:53:45 UTC) #3
Dan Beam
https://codereview.chromium.org/1304883005/diff/20001/ui/file_manager/video_player/js/video_player.js File ui/file_manager/video_player/js/video_player.js (right): https://codereview.chromium.org/1304883005/diff/20001/ui/file_manager/video_player/js/video_player.js#newcode275 ui/file_manager/video_player/js/video_player.js:275: var videoPlayerElement = queryRequiredElement('video-player'); On 2015/08/27 03:53:45, fukino wrote: ...
5 years, 3 months ago (2015-08-27 16:13:25 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1304883005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1304883005/40001
5 years, 3 months ago (2015-08-27 16:14:22 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:40001)
5 years, 3 months ago (2015-08-27 18:17:14 UTC) #8
commit-bot: I haz the power
5 years, 3 months ago (2015-08-27 18:18:13 UTC) #9
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/5057b24914b8899420887593363b89d6c44a4e6b
Cr-Commit-Position: refs/heads/master@{#345925}

Powered by Google App Engine
This is Rietveld 408576698