OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 return; | 351 return; |
352 | 352 |
353 appendRedirect(newRequest.url()); | 353 appendRedirect(newRequest.url()); |
354 frameLoader()->client()->dispatchDidReceiveServerRedirectForProvisionalLoad(
); | 354 frameLoader()->client()->dispatchDidReceiveServerRedirectForProvisionalLoad(
); |
355 if (!shouldContinueForNavigationPolicy(newRequest, CheckContentSecurityPolic
y)) | 355 if (!shouldContinueForNavigationPolicy(newRequest, CheckContentSecurityPolic
y)) |
356 cancelMainResourceLoad(ResourceError::cancelledError(m_request.url())); | 356 cancelMainResourceLoad(ResourceError::cancelledError(m_request.url())); |
357 } | 357 } |
358 | 358 |
359 static bool canShowMIMEType(const String& mimeType, Page* page) | 359 static bool canShowMIMEType(const String& mimeType, Page* page) |
360 { | 360 { |
361 if (blink::Platform::current()->mimeRegistry()->supportsMIMEType(mimeType) =
= blink::WebMimeRegistry::IsSupported) | 361 if (Platform::current()->mimeRegistry()->supportsMIMEType(mimeType) == WebMi
meRegistry::IsSupported) |
362 return true; | 362 return true; |
363 PluginData* pluginData = page->pluginData(); | 363 PluginData* pluginData = page->pluginData(); |
364 return !mimeType.isEmpty() && pluginData && pluginData->supportsMimeType(mim
eType); | 364 return !mimeType.isEmpty() && pluginData && pluginData->supportsMimeType(mim
eType); |
365 } | 365 } |
366 | 366 |
367 bool DocumentLoader::shouldContinueForResponse() const | 367 bool DocumentLoader::shouldContinueForResponse() const |
368 { | 368 { |
369 if (m_substituteData.isValid()) | 369 if (m_substituteData.isValid()) |
370 return true; | 370 return true; |
371 | 371 |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() | 784 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() |
785 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) | 785 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) |
786 { | 786 { |
787 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); | 787 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); |
788 if (!source.isNull()) | 788 if (!source.isNull()) |
789 m_writer->appendReplacingData(source); | 789 m_writer->appendReplacingData(source); |
790 endWriting(m_writer.get()); | 790 endWriting(m_writer.get()); |
791 } | 791 } |
792 | 792 |
793 } // namespace blink | 793 } // namespace blink |
OLD | NEW |