Commit 4e780537 authored by Yuheng Huang's avatar Yuheng Huang Committed by Commit Bot

Reland "Remove INVALIDATE_TYPE_LOAD and INVALIDATE_TYPE_TAB on WebContentsImpl::LoadStateChanged()"

This is a reland of d4c213d3

Original change's description:
> 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: Avi Drissman <avi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#798852}

Bug: 1112496
Change-Id: I19b697d515cb56088a5dde836d51c7d5cf3c54b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2393155Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Yuheng Huang <yuhengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805007}
parent 52159b83
...@@ -4849,10 +4849,6 @@ void WebContentsImpl::LoadStateChanged( ...@@ -4849,10 +4849,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