MacViews: Fix RenderWidgetHostViewMac ui::Layer visibility
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:Avi Drissman <avi@chromium.org> Reviewed-by:
Sidney San Martín <sdy@chromium.org> Commit-Queue: ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#577334}
Showing
Please register or sign in to comment