Skip to content

Commit

Permalink
[ios] Cleaned up -[CRWWebController prepareForGoBack].
Browse files Browse the repository at this point in the history
Removed injectWindowID call and |wasShowingInterstitial| local variable.
|injectWindowID| is leftover from UIWebView world where it was necessary
to check for URL changes and to check for URL changes it was necessary
to inject early scripts:
https://codereview.chromium.org/1892483007/diff/20001/ios/web/web_state/ui/crw_web_controller.mm

BUG=628832

Review-Url: https://codereview.chromium.org/2165103002
Cr-Commit-Position: refs/heads/master@{#407813}
  • Loading branch information
eugenebut authored and Commit bot committed Jul 26, 2016
1 parent 0497412 commit 5f3be87
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions ios/web/web_state/ui/crw_web_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2219,17 +2219,8 @@ - (void)loadCancelled {
}

- (void)prepareForGoBack {
// Make sure any transitions that may have occurred have been seen and acted
// on by the CRWWebController, so the history stack and state of the
// CRWWebController is 100% up to date before the stack navigation starts.
if (_webView) {
[self injectWindowID];
}

bool wasShowingInterstitial = _webStateImpl->IsShowingWebInterstitial();

// Before changing the current session history entry, record the tab state.
if (!wasShowingInterstitial) {
if (!_webStateImpl->IsShowingWebInterstitial()) {
[self recordStateInHistory];
}
}
Expand Down

0 comments on commit 5f3be87

Please sign in to comment.