Commit f16dcd5e authored by Kurt Horimoto's avatar Kurt Horimoto Committed by Commit Bot

[iOS] Show toolbar for load events when UI refresh flag is enabled.

In the legacy UI, fullscren was disabled when the WKWebView was loading
so that the URL of the page is always visible.  After the UI refresh,
the URL is always visible, so fullscreen does not need to be disabled.
However, the toolbar should still be shown (but not disabled) upon load
events to ensure that navigation to AMP pages allows access to the
navigation controls on these pages.

Bug: 837254
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Icc9e54cd6972b481c9041fb547f4ab5e8ba40b81
Reviewed-on: https://chromium-review.googlesource.com/1048635
Commit-Queue: Kurt Horimoto <kkhorimoto@chromium.org>
Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556908}
parent fb1156b9
...@@ -129,12 +129,12 @@ void FullscreenWebStateObserver::SetDisableFullscreenForSSL(bool disable) { ...@@ -129,12 +129,12 @@ void FullscreenWebStateObserver::SetDisableFullscreenForSSL(bool disable) {
} }
void FullscreenWebStateObserver::SetIsLoading(bool loading) { void FullscreenWebStateObserver::SetIsLoading(bool loading) {
if (IsUIRefreshPhase1Enabled()) if (IsUIRefreshPhase1Enabled()) {
return; if (loading)
controller_->ResetModel();
if (!!loading_disabler_.get() == loading) } else {
return; loading_disabler_ =
loading_disabler_ = loading ? std::make_unique<ScopedFullscreenDisabler>(controller_)
loading ? std::make_unique<ScopedFullscreenDisabler>(controller_) : nullptr;
: nullptr; }
} }
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