Commit ed2fb50e authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

Clip the BVC content to the BVC's view's bounds

The content of the WebView overflows its bounds to be displayed below
the toolbars (allowing to have a blur effect on the toolbars).
But during the rotation the content is displayed outside the bounds of
the main view, creating a weird effect.

This CL fixes it by clipping the content of the BVC to BVC's bounds.

Bug: 809103
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ica7a34fab6070a780b3e1eb03cae1ae2ad43e04b
Reviewed-on: https://chromium-review.googlesource.com/924150Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537764}
parent ccf160ca
...@@ -1574,6 +1574,11 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint { ...@@ -1574,6 +1574,11 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
UIViewAutoresizing initialViewAutoresizing = UIViewAutoresizing initialViewAutoresizing =
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
// Clip the content to the bounds of the view. This prevents the WebView to
// overflow outside of the BVC, which is particularly visible during rotation.
// The WebView is overflowing its bounds to be displayed below the toolbars.
self.view.clipsToBounds = YES;
self.contentArea = self.contentArea =
[[BrowserContainerView alloc] initWithFrame:initialViewsRect]; [[BrowserContainerView alloc] initWithFrame:initialViewsRect];
self.contentArea.autoresizingMask = initialViewAutoresizing; self.contentArea.autoresizingMask = initialViewAutoresizing;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment