[iOS] Fix NTP presentation on bad ssl pages
This CL makes sure that we don't display the NTP if the loaded page is an interstitial page. This is caused by the behaviour of interstitial when the committed interstitial feature isn't enabled. In that case the workflow is: 1. about:newtab is loaded 2. User loads bad.badssl.com 3. Navigation did start for bad.badssl.com 4. Navigation ends for bad.badssl.com 5. This is a bad ssl page so Chrome actually reverts to about:newtab 6. Load stops, but at this point the visible URL is about:newtab 7. The interstitial is displayed and the visible URL is updated to bad.badssl.com 8. The observers are notified through DidChangeVisibleSecurityState 9. No further callbacks So the main issue is that there is not callback notifying that the visible URL has changed. This CL fixes it by adding a callback on DidChangeVisibleSecurityState and also on LoadStop to avoid having the NTP flashing between 6 and 7. Fixed: 1067250 Change-Id: Ifc57addf5a6fa9e6295446da34e117028add73fb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2141971 Commit-Queue: Gauthier Ambard <gambard@chromium.org> Reviewed-by:Livvie Lin <livvielin@chromium.org> Reviewed-by:
Justin Cohen <justincohen@chromium.org> Cr-Commit-Position: refs/heads/master@{#758163}
Showing
Please register or sign in to comment