Commit d4c213d3 authored by Yuheng Huang's avatar Yuheng Huang Committed by Commit Bot

Remove INVALIDATE_TYPE_LOAD and INVALIDATE_TYPE_TAB on WebContentsImpl::LoadStateChanged()

Since WebContentsImpl::DidStartLoading/DidStopLoading is already sending
NotifyNavigationStateChanged(INVALIDATE_TYPE_LOAD) by way of
LoadingStateChanged, it's no longer necessary to send this out in
WebContentsImpl::LoadStateChanged. This change can reduce the number
of call of TabStripModelObserver.TabChangedAt with TabChangeType.kAll
a lot to increase performance throughout the browser

Bug: 1112496
Change-Id: I96d8942d7e1ebd5ffc8b3f3389497936f62848c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2357960
Commit-Queue: Yuheng Huang <yuhengh@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798852}
parent fde0b72e
...@@ -4468,10 +4468,6 @@ void WebContentsImpl::LoadStateChanged( ...@@ -4468,10 +4468,6 @@ void WebContentsImpl::LoadStateChanged(
load_state_host_ = host16; load_state_host_ = host16;
if (load_state_.state == net::LOAD_STATE_READING_RESPONSE) if (load_state_.state == net::LOAD_STATE_READING_RESPONSE)
SetNotWaitingForResponse(); SetNotWaitingForResponse();
if (IsLoading()) {
NotifyNavigationStateChanged(static_cast<InvalidateTypes>(
INVALIDATE_TYPE_LOAD | INVALIDATE_TYPE_TAB));
}
} }
void WebContentsImpl::SetVisibilityAndNotifyObservers(Visibility visibility) { void WebContentsImpl::SetVisibilityAndNotifyObservers(Visibility visibility) {
......
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