Commit ebcf8f6f authored by Yi Su's avatar Yi Su Committed by Commit Bot

Fix missing image of "new tab" button in incognito mode

TabGridNewTabButton is inited with page=TabGridPageIncognitoTabs, and
depends on "setPage:" method to set the image of button. However this
"setPage" has an early return for same page value, so when app is
launched in incognito mode, the image will be missing.

Bug: 991994
Change-Id: I7fd4f90a57486392f12ffab339f81517dbf25bcf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1746262
Commit-Queue: Yi Su <mrsuyi@chromium.org>
Reviewed-by: default avataredchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#686345}
parent f167be1e
......@@ -33,8 +33,9 @@
#pragma mark - Public
- (void)setPage:(TabGridPage)page {
if (page == _page)
return;
// self.page is inited to 0 (i.e. TabGridPageIncognito) so do not early return
// here, otherwise when app is launched in incognito mode the image will be
// missing.
UIImage* renderedImage;
switch (page) {
case TabGridPageIncognitoTabs:
......
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