• Christopher Cameron's avatar
    MacViews: Fix RenderWidgetHostViewMac ui::Layer visibility · c27876f5
    Christopher Cameron authored
    Two bugs here.
    
    First bug: Interactions with calling RWHVMac::Show/Hide.
    
    With the non-unified compositor, calling RWHVMac::Show/Hide will cause
    the Cocoa NSView to have its show or hide method called.
    
    With the unified compositor, calls to RWHVMac::Show/Hide are largely
    ignored. The ui::Layer will always be visible if it has a parent
    ui::Layer. This is a bug -- the ui::Layer should be made visible or not
    based on the visibility specified by the calls to RWHVMac::Show/Hide.
    
    Second bug: Child NSViews not matching child ui::Layers
    
    It is possible for a WebContentsViewCocoa NSView to have multiple
    RenderWidgetHostViewCocoa NSViews. Which of these views is visible
    is controlled by called to RWHVMac::Show/Hide.
    
    Track the parent RenderWidgetHostViewBases that added NSViews, and
    iterate through all of them when updating the parent ui::Layer.
    
    Unrelated cleanup: Remove parameter from BrowserCompositorViewMac that
    is always false (and add a DCHECK that it is false, just for good
    measure).
    
    Bug: 859834, 865227
    Change-Id: I8767692443d5eb6381a8ea4b087c5c312fef305d
    Reviewed-on: https://chromium-review.googlesource.com/1141148Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Reviewed-by: default avatarSidney San Martín <sdy@chromium.org>
    Commit-Queue: ccameron <ccameron@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#577334}
    c27876f5
web_contents_view_mac.h 7.04 KB