[WebView] Add display cutout controller for P+
Design doc: http://go/webview-display-cutout (Google internal) This is the core logic for display cutout support in WebView. We cannot get the onApplyWindowInsets() for P, Q, R, and sometimes view signals should update safe area insets, so we are currently triggering window inset updates on certain view callbacks. https://crrev.com/c/chromium/src/+/2299461 is the next CL that has more information on how this can be integrated into AwContents. Once the controller sets the insets and pass it to WebContents#setDisplayCutoutSafeArea(insets), then the webpages can use these values as safe-area-inset-* CSS properties. Note that these CSS values will be automatically updated when we set the values again, and set to zero on navigation away from the current page. Tested: AwDisplayCutoutControllerTest, also tested manually. Bug: 1094366 Change-Id: I53461689ca065651d382ad2bb5c4cd1d09591df4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298728Reviewed-by:Bo <boliu@chromium.org> Commit-Queue: Changwan Ryu <changwan@chromium.org> Cr-Commit-Position: refs/heads/master@{#798948}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment