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

Issue 2453923002: Tweak 'scroll' listener registration in CrScrollableBehavior. (Closed)

Created:
4 years, 1 month ago by dpapad
Modified:
4 years, 1 month ago
Reviewers:
stevenjb
CC:
chromium-reviews, dbeam+watch-elements_chromium.org, michaelpg+watch-elements_chromium.org, oshima+watch_chromium.org, stevenjb+watch-md-settings_chromium.org, stevenjb
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Tweak 'scroll' listener registration in CrScrollableBehavior. Previously listeners were added in attached() and were unsuccessfully removed in detached(). Unsuccessfully because removeEventListener() was called with a different function reference than the one used in addEventListener(). Now listeners are added in ready() which is guaranteed to execute once regardless of how many times an element is attached/detached. Removing the listeners is unncessary since a detached element can't be scrolled anyway (and most likely will get GCed). BUG=658450 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/fdb78fe88a06d28e76bf0e46346c19d2578c871a Cr-Commit-Position: refs/heads/master@{#427861}

Patch Set 1 #

Patch Set 2 : Remove attached/detached, use ready. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -10 lines) Patch
M ui/webui/resources/cr_elements/cr_scrollable_behavior.js View 1 2 chunks +1 line, -10 lines 0 comments Download

Messages

Total messages: 18 (12 generated)
dpapad
4 years, 1 month ago (2016-10-26 21:58:34 UTC) #6
Dan Beam
+stevenjb@ as majority author (I doubt attached -> ready makes much difference)
4 years, 1 month ago (2016-10-26 22:05:31 UTC) #9
stevenjb
lgtm
4 years, 1 month ago (2016-10-26 22:19:32 UTC) #10
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/2453923002/20001
4 years, 1 month ago (2016-10-26 22:53:58 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-10-26 23:06:39 UTC) #16
commit-bot: I haz the power
4 years, 1 month ago (2016-10-26 23:09:32 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/fdb78fe88a06d28e76bf0e46346c19d2578c871a
Cr-Commit-Position: refs/heads/master@{#427861}

Powered by Google App Engine
This is Rietveld 408576698