Move DisplayCutoutController tracking to AwViewMethodsImpl.
This change calls DisplayCutoutController#onAttachedToWindow when either the WebView is attached to the window, or the FullScreenView is attached to the window (whichever the AwContents is displaying to). This is a change in behaviour, but should be more correct. There likely wasn't an issue beforehand because when switching to full screen, DisplayCutoutController#setCurrentContainerView was called, which also requested full screen insets. Bug: 380261043 Change-Id: I23a607b6450bb53cd37644e5a62ab708c97dfe90 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6513140 Reviewed-by: Peter Pakkenberg <pbirk@chromium.org> Commit-Queue: Peter Conn <peconn@chromium.org> Cr-Commit-Position: refs/heads/main@{#1456964}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
8d85dbe5fb
commit
2c1245a04f
@ -3351,8 +3351,6 @@ public class AwContents implements SmartClipProvider {
|
||||
// instead attached to a FullScreenView.
|
||||
mAwViewMethods.onAttachedToWindow();
|
||||
|
||||
if (mDisplayCutoutController != null) mDisplayCutoutController.onAttachedToWindow();
|
||||
|
||||
mAwFrameMetricsListener =
|
||||
AwFrameMetricsListener.maybeCreate(
|
||||
mContainerView, mWindowAndroid.getWindowAndroid());
|
||||
@ -4650,6 +4648,8 @@ public class AwContents implements SmartClipProvider {
|
||||
StylusWritingSettingsState.getInstance().registerObserver(mStylusWritingController);
|
||||
}
|
||||
|
||||
if (mDisplayCutoutController != null) mDisplayCutoutController.onAttachedToWindow();
|
||||
|
||||
mAwWindowCoverageTracker =
|
||||
AwWindowCoverageTracker.getOrCreateForRootView(
|
||||
AwContents.this, mContainerView.getRootView());
|
||||
|
Reference in New Issue
Block a user