| 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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 | 777 |
| 778 void FrameLoader::reportLocalLoadFailed(Frame* frame, const String& url) | 778 void FrameLoader::reportLocalLoadFailed(Frame* frame, const String& url) |
| 779 { | 779 { |
| 780 ASSERT(!url.isEmpty()); | 780 ASSERT(!url.isEmpty()); |
| 781 if (!frame) | 781 if (!frame) |
| 782 return; | 782 return; |
| 783 | 783 |
| 784 frame->document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLeve
l, "Not allowed to load local resource: " + url); | 784 frame->document()->addConsoleMessage(SecurityMessageSource, ErrorMessageLeve
l, "Not allowed to load local resource: " + url); |
| 785 } | 785 } |
| 786 | 786 |
| 787 void FrameLoader::reload(ReloadPolicy reloadPolicy, const KURL& overrideURL, con
st String& overrideEncoding) | 787 void FrameLoader::reload(ReloadPolicy reloadPolicy, const KURL& overrideURL, con
st AtomicString& overrideEncoding) |
| 788 { | 788 { |
| 789 DocumentLoader* documentLoader = activeDocumentLoader(); | 789 DocumentLoader* documentLoader = activeDocumentLoader(); |
| 790 if (!documentLoader) | 790 if (!documentLoader) |
| 791 return; | 791 return; |
| 792 | 792 |
| 793 ResourceRequest request = documentLoader->request(); | 793 ResourceRequest request = documentLoader->request(); |
| 794 // FIXME: We need to reset cache policy to prevent it from being incorrectly
propagted to the reload. | 794 // FIXME: We need to reset cache policy to prevent it from being incorrectly
propagted to the reload. |
| 795 // Do we need to propagate anything other than the url? | 795 // Do we need to propagate anything other than the url? |
| 796 request.setCachePolicy(UseProtocolCachePolicy); | 796 request.setCachePolicy(UseProtocolCachePolicy); |
| 797 if (!overrideURL.isEmpty()) | 797 if (!overrideURL.isEmpty()) |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 if (!targetFrames[i]->document()->dispatchBeforeUnloadEvent(page->ch
rome(), didAllowNavigation)) | 1333 if (!targetFrames[i]->document()->dispatchBeforeUnloadEvent(page->ch
rome(), didAllowNavigation)) |
| 1334 break; | 1334 break; |
| 1335 } | 1335 } |
| 1336 | 1336 |
| 1337 if (i == targetFrames.size()) | 1337 if (i == targetFrames.size()) |
| 1338 shouldClose = true; | 1338 shouldClose = true; |
| 1339 } | 1339 } |
| 1340 return shouldClose; | 1340 return shouldClose; |
| 1341 } | 1341 } |
| 1342 | 1342 |
| 1343 void FrameLoader::loadWithNavigationAction(const NavigationAction& action, Frame
LoadType type, PassRefPtr<FormState> formState, const SubstituteData& substitute
Data, ClientRedirectPolicy clientRedirect, const String& overrideEncoding) | 1343 void FrameLoader::loadWithNavigationAction(const NavigationAction& action, Frame
LoadType type, PassRefPtr<FormState> formState, const SubstituteData& substitute
Data, ClientRedirectPolicy clientRedirect, const AtomicString& overrideEncoding) |
| 1344 { | 1344 { |
| 1345 ASSERT(m_client->hasWebView()); | 1345 ASSERT(m_client->hasWebView()); |
| 1346 if (m_frame->document()->pageDismissalEventBeingDispatched() != Document::No
Dismissal) | 1346 if (m_frame->document()->pageDismissalEventBeingDispatched() != Document::No
Dismissal) |
| 1347 return; | 1347 return; |
| 1348 | 1348 |
| 1349 // We skip dispatching the beforeload event on the frame owner if we've alre
ady committed a real | 1349 // We skip dispatching the beforeload event on the frame owner if we've alre
ady committed a real |
| 1350 // document load because the event would leak subsequent activity by the fra
me which the parent | 1350 // document load because the event would leak subsequent activity by the fra
me which the parent |
| 1351 // frame isn't supposed to learn. For example, if the child frame navigated
to a new URL, the | 1351 // frame isn't supposed to learn. For example, if the child frame navigated
to a new URL, the |
| 1352 // parent frame shouldn't learn the URL. | 1352 // parent frame shouldn't learn the URL. |
| 1353 const ResourceRequest& request = action.resourceRequest(); | 1353 const ResourceRequest& request = action.resourceRequest(); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1565 { | 1565 { |
| 1566 SandboxFlags flags = m_forcedSandboxFlags; | 1566 SandboxFlags flags = m_forcedSandboxFlags; |
| 1567 if (Frame* parentFrame = m_frame->tree().parent()) | 1567 if (Frame* parentFrame = m_frame->tree().parent()) |
| 1568 flags |= parentFrame->document()->sandboxFlags(); | 1568 flags |= parentFrame->document()->sandboxFlags(); |
| 1569 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) | 1569 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) |
| 1570 flags |= ownerElement->sandboxFlags(); | 1570 flags |= ownerElement->sandboxFlags(); |
| 1571 return flags; | 1571 return flags; |
| 1572 } | 1572 } |
| 1573 | 1573 |
| 1574 } // namespace WebCore | 1574 } // namespace WebCore |
| OLD | NEW |