DescriptionMD Settings: Stop using IronMenuBehavior from cr-profile-avatar-selector-grid.
This both simplifies the code and fixes the selection bug. The original
code relied on multiple inherited Polymer behaviors which stomped on each other
causing what seems like a race condition per findings at
https://bugs.chromium.org/p/chromium/issues/detail?id=734789#c2.
Specifically:
- Simplify logic within cr-profile-avatar-selector-grid, no more inherited
behaviors.
- Update both settings/ and md_user_manager/ client code.
- Stop relying on bubbling 'iron-activate' event in manage_profile.html.
Instead use a Polymer binding + observer.
Regarding the race condition: The previous code, was seemingly attempting to
highlight the grid with the currently selected avatar icon on creation, but
unsuccessfully because this was intentionally broken within the C++ side at
crbug.com/710660. As a side-effect, the 'profile-info-changed' event
propagating back from C++ after every user-initiated change, was causing the
selection of the user to be immediately discarded.
It would make little sense to re-implement JS functionality that is already not
working. Instead I am removing such tests, since they are meaningless until/if
the C++ side is fixed.
BUG=734789
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Review-Url: https://codereview.chromium.org/2950943002
Cr-Commit-Position: refs/heads/master@{#481776}
Committed: https://chromium.googlesource.com/chromium/src/+/e67dbad97952415cabff9444ed85f543579240e6
Patch Set 1 #Patch Set 2 : Remove more #Patch Set 3 : More work #Patch Set 4 : Fix compilation. #Patch Set 5 : More #Patch Set 6 : Fixing most tests. #Patch Set 7 : Fix more tests. #Patch Set 8 : Cleanup #Patch Set 9 : Nits. #Patch Set 10 : Simplify key handler. #Patch Set 11 : Delete commented out test. #
Total comments: 11
Patch Set 12 : Address comments. #Patch Set 13 : Added comment. #Messages
Total messages: 40 (32 generated)
|