Commit 154819f0 authored by Robbie Gibson's avatar Robbie Gibson Committed by Chromium LUCI CQ

[iOS][Thumb Strip] Always take tab strip snapshot with clear background

When smooth scrolling is enabled, the tab strip background is set to
black to block out the web content behind the tab strip. However, the
tab strip snapshot should always have a clear background because the
web content is moved when using the snapshot.

Ths CL overrides the background color of the tab strip to clear when
taking the snapshot and resets it afterwards.

Fixed: 1163919
Change-Id: I945183e10633442ccf4f49c05ef6ceae85f3af59
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2614786Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Robbie Gibson <rkgibson@google.com>
Cr-Commit-Position: refs/heads/master@{#841099}
parent c6da83c2
......@@ -14,8 +14,15 @@
@implementation TabStripContainerView
- (UIView*)screenshotForAnimation {
// The tab strip snapshot should have a clear background color. When using
// smooth scrolling, the background color is black, because the web content
// extends behind the tab strip. Switch out the background color for the
// snapshot and restore it afterwards.
UIColor* backgroundColor = self.tabStripView.backgroundColor;
self.tabStripView.backgroundColor = UIColor.clearColor;
UIView* tabStripSnapshot =
[self.tabStripView snapshotViewAfterScreenUpdates:YES];
self.tabStripView.backgroundColor = backgroundColor;
tabStripSnapshot.transform =
[self adjustTransformForRTL:tabStripSnapshot.transform];
return tabStripSnapshot;
......
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