Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Side by Side Diff: ios/web/web_state/ui/crw_web_controller.mm

Issue 2169703002: [ios] Do not signal finish load if currentURL != lastRegisteredURL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/web/web_state/ui/crw_web_controller.h" 5 #import "ios/web/web_state/ui/crw_web_controller.h"
6 6
7 #import <WebKit/WebKit.h> 7 #import <WebKit/WebKit.h>
8 8
9 #import <objc/runtime.h> 9 #import <objc/runtime.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 5305 matching lines...) Expand 10 before | Expand all | Expand 10 after
5316 GURL webViewURL = net::GURLWithNSURL([_webView URL]); 5316 GURL webViewURL = net::GURLWithNSURL([_webView URL]);
5317 if (_loadPhase == web::LOAD_REQUESTED && 5317 if (_loadPhase == web::LOAD_REQUESTED &&
5318 ![_pendingNavigationInfo cancelled]) { 5318 ![_pendingNavigationInfo cancelled]) {
5319 // A fast back/forward within the same origin does not call 5319 // A fast back/forward within the same origin does not call
5320 // |didCommitNavigation:|, so signal page change explicitly. 5320 // |didCommitNavigation:|, so signal page change explicitly.
5321 DCHECK_EQ(_documentURL.GetOrigin(), webViewURL.GetOrigin()); 5321 DCHECK_EQ(_documentURL.GetOrigin(), webViewURL.GetOrigin());
5322 [self setDocumentURL:webViewURL]; 5322 [self setDocumentURL:webViewURL];
5323 [self webPageChanged]; 5323 [self webPageChanged];
5324 } 5324 }
5325 5325
5326 // Fast back forward navigation does not call |didFinishNavigation:|, so 5326 [self updateSSLStatusForCurrentNavigationItem];
5327
5328 // Fast back forward navigation may not call |didFinishNavigation:|, so
5327 // signal did finish navigation explicitly. 5329 // signal did finish navigation explicitly.
5328 [self updateSSLStatusForCurrentNavigationItem]; 5330 if (_lastRegisteredRequestURL == _documentURL) {
5329 [self didFinishNavigation]; 5331 [self didFinishNavigation];
5332 }
5330 } 5333 }
5331 5334
5332 - (void)webViewTitleDidChange { 5335 - (void)webViewTitleDidChange {
5333 // WKWebView's title becomes empty when the web process dies; ignore that 5336 // WKWebView's title becomes empty when the web process dies; ignore that
5334 // update. 5337 // update.
5335 if (_webProcessIsDead) { 5338 if (_webProcessIsDead) {
5336 DCHECK_EQ([_webView title].length, 0U); 5339 DCHECK_EQ([_webView title].length, 0U);
5337 return; 5340 return;
5338 } 5341 }
5339 5342
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
5655 } 5658 }
5656 5659
5657 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC; 5660 return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
5658 } 5661 }
5659 5662
5660 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action { 5663 - (NSString*)refererFromNavigationAction:(WKNavigationAction*)action {
5661 return [action.request valueForHTTPHeaderField:@"Referer"]; 5664 return [action.request valueForHTTPHeaderField:@"Referer"];
5662 } 5665 }
5663 5666
5664 @end 5667 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698