• Collin Baker's avatar
    Call OnViewVisibilityChanged when an ancestor's visibility changes · 375cda34
    Collin Baker authored
    ViewObserver::OnViewVisibilityChanged is currently only called when
    the observed view's visible() state changes. This is different than
    View::VisibilityChanged, which is called whenever SetVisible() is
    called on the observed view or any of its ancestors, or whenever the
    parent widget's visibility changes.
    
    This makes OnViewVisibilityChanged's behavior and interface match
    VisibilityChanged.
    
    In doing so, this fixes an InkDrop bug where InkDrop state incorrectly
    remained after a view was no longer drawn. This bug resulted from
    switching to the ViewObserver interface.
    
    Bug: 943979, 949067
    Change-Id: I35cb4db5625060e2564f6c295dd047ca57c7a8ff
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1553708
    Commit-Queue: Collin Baker <collinbaker@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#650441}
    375cda34
view.cc 80.6 KB