OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
9 * | 9 * |
10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 ASSERT(m_frame->document()->fetcher()); | 358 ASSERT(m_frame->document()->fetcher()); |
359 m_frame->document()->setReadyState(Document::Loading); | 359 m_frame->document()->setReadyState(Document::Loading); |
360 | 360 |
361 if (dispatch) | 361 if (dispatch) |
362 dispatchDidClearDocumentOfWindowObject(); | 362 dispatchDidClearDocumentOfWindowObject(); |
363 | 363 |
364 m_frame->document()->initContentSecurityPolicy(m_documentLoader ? m_document
Loader->releaseContentSecurityPolicy() : ContentSecurityPolicy::create()); | 364 m_frame->document()->initContentSecurityPolicy(m_documentLoader ? m_document
Loader->releaseContentSecurityPolicy() : ContentSecurityPolicy::create()); |
365 if (m_documentLoader) | 365 if (m_documentLoader) |
366 m_frame->document()->setClientHintsPreferences(m_documentLoader->clientH
intsPreferences()); | 366 m_frame->document()->setClientHintsPreferences(m_documentLoader->clientH
intsPreferences()); |
367 | 367 |
368 Settings* settings = m_frame->document()->settings(); | 368 if (Settings* settings = m_frame->document()->settings()) { |
369 if (settings) { | |
370 m_frame->document()->fetcher()->setImagesEnabled(settings->imagesEnabled
()); | 369 m_frame->document()->fetcher()->setImagesEnabled(settings->imagesEnabled
()); |
371 m_frame->document()->fetcher()->setAutoLoadImages(settings->loadsImagesA
utomatically()); | 370 m_frame->document()->fetcher()->setAutoLoadImages(settings->loadsImagesA
utomatically()); |
372 } | 371 } |
373 | 372 |
374 if (m_documentLoader) { | 373 if (m_documentLoader) { |
375 const AtomicString& dnsPrefetchControl = m_documentLoader->response().ht
tpHeaderField("X-DNS-Prefetch-Control"); | 374 const AtomicString& dnsPrefetchControl = m_documentLoader->response().ht
tpHeaderField("X-DNS-Prefetch-Control"); |
376 if (!dnsPrefetchControl.isEmpty()) | 375 if (!dnsPrefetchControl.isEmpty()) |
377 m_frame->document()->parseDNSPrefetchControlHeader(dnsPrefetchContro
l); | 376 m_frame->document()->parseDNSPrefetchControlHeader(dnsPrefetchContro
l); |
378 | 377 |
379 String headerContentLanguage = m_documentLoader->response().httpHeaderFi
eld("Content-Language"); | 378 String headerContentLanguage = m_documentLoader->response().httpHeaderFi
eld("Content-Language"); |
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1451 // FIXME: We need a way to propagate insecure requests policy flags to | 1450 // FIXME: We need a way to propagate insecure requests policy flags to |
1452 // out-of-process frames. For now, we'll always use default behavior. | 1451 // out-of-process frames. For now, we'll always use default behavior. |
1453 if (!parentFrame->isLocalFrame()) | 1452 if (!parentFrame->isLocalFrame()) |
1454 return nullptr; | 1453 return nullptr; |
1455 | 1454 |
1456 ASSERT(toLocalFrame(parentFrame)->document()); | 1455 ASSERT(toLocalFrame(parentFrame)->document()); |
1457 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1456 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
1458 } | 1457 } |
1459 | 1458 |
1460 } // namespace blink | 1459 } // namespace blink |
OLD | NEW |