-
Evan Stade authored
1. Make sure located events go to the top container when it's revealed. This is accomplished with an EventRewriter which clears the target window, which had been provided by the window service, from the event. Without this, clicks on the top container are targeted to the web contents window because the Window Service doesn't know about the top container's window. In the long term, we may be able to remove this EventRewriter with a more general solution (e.g. improving how the window service targets the event in the first place). 2. Instead of mirroring the top container's layers, make the widget completely transparent except for the ash-provided window controls. Mirroring doesn't update the reveal widget in response to changes in the top container's layers, such as when a button is hovered and an ink drop is added. 3. Allow the reveal widget to accept events so that it's possible to interact with the window controls. Resize the reveal widget to be just big enough for the window controls so that clicks anywhere else will go straight through to the underlying top container view. 4. Make the browser-side non client frame view paint the frame bg. This is necessary because the reveal widget (i.e. window controls) is now on top of the container view and has no client-side rendering (what the mirroring view used to provide). Future issues to address: - the cursor is not updated (e.g. when hovering the omnibox) presumably because the cursor is coming from the window that the WS thinks is underneath the pointer, i.e. the web contents. Alternatives considered: - update the mirrored layers every time the layer tree changes. This doesn't seem to be easy to accomplish or likely to be very performant. - move the top container into the reveal widget. This somewhat works with a few tweaks here and there to code that assumes the top container is always in the browser widget, but ultimately it seems that making the reveal widget focusable causes difficulties with window activation and focus traversal. Bug: 640365 Change-Id: I03956c07354e20dadc2919f9a0402ce1f7b4a672 Reviewed-on: https://chromium-review.googlesource.com/1171547 Commit-Queue: Evan Stade <estade@chromium.org> Reviewed-by:
Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#585649}
b2270914