| Index: content/browser/frame_host/navigation_handle_impl.cc
|
| diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
|
| index 30536bd306c76c4da490f9ea142210612c907d0c..1962a22ff92634284815cf791ae5bc70cdbb258b 100644
|
| --- a/content/browser/frame_host/navigation_handle_impl.cc
|
| +++ b/content/browser/frame_host/navigation_handle_impl.cc
|
| @@ -287,7 +287,14 @@ void NavigationHandleImpl::CancelDeferredNavigation(
|
| state_ == DEFERRING_REDIRECT ||
|
| state_ == DEFERRING_RESPONSE);
|
| DCHECK(result == NavigationThrottle::CANCEL_AND_IGNORE ||
|
| - result == NavigationThrottle::CANCEL);
|
| + result == NavigationThrottle::CANCEL ||
|
| + result == NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE);
|
| + DCHECK(state_ != DEFERRING_RESPONSE ||
|
| + result != NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE);
|
| +
|
| + if (result == NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE)
|
| + frame_tree_node_->SetFrameOwnerCollapsedState(true);
|
| +
|
| state_ = CANCELING;
|
| RunCompleteCallback(result);
|
| }
|
| @@ -560,6 +567,13 @@ void NavigationHandleImpl::DidCommitNavigation(
|
| state_ = DID_COMMIT_ERROR_PAGE;
|
| } else {
|
| state_ = DID_COMMIT;
|
| +
|
| + // Getting this far means that the navigation was not blocked, and neither
|
| + // is this the error page navigation following a blocked navigation. Ensure
|
| + // the frame owner element is no longer collapsed as a result of a prior
|
| + // navigation having been blocked with BLOCK_REQUEST_AND_COLLAPSE.
|
| + if (!frame_tree_node()->IsMainFrame())
|
| + frame_tree_node()->SetFrameOwnerCollapsedState(false);
|
| }
|
| }
|
|
|
| @@ -592,6 +606,11 @@ NavigationHandleImpl::CheckWillStartRequest() {
|
| state_ = CANCELING;
|
| return result;
|
|
|
| + case NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE:
|
| + frame_tree_node_->SetFrameOwnerCollapsedState(true);
|
| + state_ = CANCELING;
|
| + return result;
|
| +
|
| case NavigationThrottle::DEFER:
|
| state_ = DEFERRING_START;
|
| next_index_ = i + 1;
|
| @@ -623,6 +642,11 @@ NavigationHandleImpl::CheckWillRedirectRequest() {
|
| state_ = CANCELING;
|
| return result;
|
|
|
| + case NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE:
|
| + frame_tree_node_->SetFrameOwnerCollapsedState(true);
|
| + state_ = CANCELING;
|
| + return result;
|
| +
|
| case NavigationThrottle::DEFER:
|
| state_ = DEFERRING_REDIRECT;
|
| next_index_ = i + 1;
|
| @@ -667,6 +691,7 @@ NavigationHandleImpl::CheckWillProcessResponse() {
|
| return result;
|
|
|
| case NavigationThrottle::BLOCK_REQUEST:
|
| + case NavigationThrottle::BLOCK_REQUEST_AND_COLLAPSE:
|
| NOTREACHED();
|
| }
|
| }
|
|
|