| Index: ios/web/web_state/ui/crw_web_controller.mm
|
| diff --git a/ios/web/web_state/ui/crw_web_controller.mm b/ios/web/web_state/ui/crw_web_controller.mm
|
| index ccd31a039220858dec9b95c4540a465aae73177c..edc3f53d1e78f8c322f74ce8e5c246ea0f83404a 100644
|
| --- a/ios/web/web_state/ui/crw_web_controller.mm
|
| +++ b/ios/web/web_state/ui/crw_web_controller.mm
|
| @@ -1266,14 +1266,7 @@ const NSTimeInterval kSnapshotOverlayTransition = 0.5;
|
| - (GURL)currentURLWithTrustLevel:(web::URLVerificationTrustLevel*)trustLevel {
|
| DCHECK(trustLevel) << "Verification of the trustLevel state is mandatory";
|
| if (_webView) {
|
| - GURL url([self webURLWithTrustLevel:trustLevel]);
|
| - // Web views treat all about: URLs as the same origin, which makes it
|
| - // possible for pages to document.write into about:<foo> pages, where <foo>
|
| - // can be something misleading. Report any about: URL as about:blank to
|
| - // prevent that. See crbug.com/326118
|
| - if (url.scheme() == url::kAboutScheme)
|
| - return GURL(url::kAboutBlankURL);
|
| - return url;
|
| + return [self webURLWithTrustLevel:trustLevel];
|
| }
|
| // Any non-web URL source is trusted.
|
| *trustLevel = web::URLVerificationTrustLevel::kAbsolute;
|
| @@ -2141,7 +2134,10 @@ registerLoadRequestForURL:(const GURL&)requestURL
|
| ![[_navigationStates lastAddedNavigation] isEqual:navigation] ||
|
| // invalid URL load
|
| (!_lastRegisteredRequestURL.is_valid() &&
|
| - _documentURL.spec() == url::kAboutBlankURL))
|
| + _documentURL.spec() == url::kAboutBlankURL) ||
|
| + // about URL was changed by WebKit (e.g. about:newtab -> about:blank)
|
| + (_lastRegisteredRequestURL.scheme() == url::kAboutScheme &&
|
| + currentURL.spec() == url::kAboutBlankURL))
|
| << std::endl
|
| << "currentURL = [" << currentURL << "]" << std::endl
|
| << "_lastRegisteredRequestURL = [" << _lastRegisteredRequestURL << "]";
|
|
|