Commit be1c7a2e authored by Thomas Lukaszewicz's avatar Thomas Lukaszewicz Committed by Commit Bot

Tab Search: Ensure cached WebContents starts rendering when reloaded

A cached WebView's WebContents in WebUIBubbleManager may not
necessarily be in a visible state that enables processing of
rendering events.

Call WasShown() before reloading to ensure the WebContents propagates
these events and ShowUI() is eventually called.

Bug: None
Change-Id: I810b2e10e286e8cca1948ee6aab014efa843db86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2530192Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Commit-Queue: Thomas Lukaszewicz <tluk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826148}
parent 419139b3
...@@ -40,6 +40,10 @@ bool WebUIBubbleManagerBase::ShowBubble() { ...@@ -40,6 +40,10 @@ bool WebUIBubbleManagerBase::ShowBubble() {
cache_timer_->Stop(); cache_timer_->Stop();
if (cached_web_view_) { if (cached_web_view_) {
// The cached WebView's WebContents may not necessarily be in a visible
// state. Lie to WebContents so it starts rendering and eventually calls
// ShowUI().
cached_web_view_->GetWebContents()->WasShown();
cached_web_view_->GetWebContents()->ReloadFocusedFrame(); cached_web_view_->GetWebContents()->ReloadFocusedFrame();
bubble_using_cached_webview_ = true; bubble_using_cached_webview_ = true;
} else { } else {
......
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