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

Unified Diff: ios/web/web_state/ui/crw_wk_web_view_web_controller.mm

Issue 1458703004: Fixes document type detection on iOS 9. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments 1 Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
diff --git a/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm b/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
index 368587eab562249bab292466ff34a608391942d3..fec4c7154a4bc57b9d0340bf27b46136ebb69599 100644
--- a/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
+++ b/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm
@@ -42,8 +42,8 @@
#import "ios/web/web_state/web_view_internal_creation_util.h"
#import "ios/web/web_state/wk_web_view_security_util.h"
#import "ios/web/webui/crw_web_ui_manager.h"
-#include "net/cert/x509_certificate.h"
#import "net/base/mac/url_conversions.h"
+#include "net/cert/x509_certificate.h"
#include "net/ssl/ssl_info.h"
#include "url/url_constants.h"
@@ -435,13 +435,7 @@ WKWebViewErrorSource WKWebViewErrorSourceFromError(NSError* error) {
return web::WEB_VIEW_DOCUMENT_TYPE_UNKNOWN;
}
- if ([self.documentMIMEType isEqualToString:@"text/html"] ||
- [self.documentMIMEType isEqualToString:@"application/xhtml+xml"] ||
- [self.documentMIMEType isEqualToString:@"application/xml"]) {
- return web::WEB_VIEW_DOCUMENT_TYPE_HTML;
- }
-
- return web::WEB_VIEW_DOCUMENT_TYPE_GENERIC;
+ return [self documentTypeFromMIMEType:self.documentMIMEType];
}
- (void)loadRequest:(NSMutableURLRequest*)request {

Powered by Google App Engine
This is Rietveld 408576698