| 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 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 // use a recursive algorithm here. | 903 // use a recursive algorithm here. |
| 904 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree
().nextSibling()) | 904 for (Frame* child = m_frame->tree().firstChild(); child; child = child->tree
().nextSibling()) |
| 905 child->loader().closeOldDataSources(); | 905 child->loader().closeOldDataSources(); |
| 906 | 906 |
| 907 if (m_documentLoader) | 907 if (m_documentLoader) |
| 908 m_client->dispatchWillClose(); | 908 m_client->dispatchWillClose(); |
| 909 } | 909 } |
| 910 | 910 |
| 911 bool FrameLoader::isLoadingMainFrame() const | 911 bool FrameLoader::isLoadingMainFrame() const |
| 912 { | 912 { |
| 913 Page* page = m_frame->page(); | 913 return m_frame->isMainFrame(); |
| 914 return page && m_frame == page->mainFrame(); | |
| 915 } | 914 } |
| 916 | 915 |
| 917 bool FrameLoader::subframeIsLoading() const | 916 bool FrameLoader::subframeIsLoading() const |
| 918 { | 917 { |
| 919 // It's most likely that the last added frame is the last to load so we walk
backwards. | 918 // It's most likely that the last added frame is the last to load so we walk
backwards. |
| 920 for (Frame* child = m_frame->tree().lastChild(); child; child = child->tree(
).previousSibling()) { | 919 for (Frame* child = m_frame->tree().lastChild(); child; child = child->tree(
).previousSibling()) { |
| 921 const FrameLoader& childLoader = child->loader(); | 920 const FrameLoader& childLoader = child->loader(); |
| 922 DocumentLoader* documentLoader = childLoader.documentLoader(); | 921 DocumentLoader* documentLoader = childLoader.documentLoader(); |
| 923 if (documentLoader && documentLoader->isLoadingInAPISense()) | 922 if (documentLoader && documentLoader->isLoadingInAPISense()) |
| 924 return true; | 923 return true; |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1574 { | 1573 { |
| 1575 SandboxFlags flags = m_forcedSandboxFlags; | 1574 SandboxFlags flags = m_forcedSandboxFlags; |
| 1576 if (Frame* parentFrame = m_frame->tree().parent()) | 1575 if (Frame* parentFrame = m_frame->tree().parent()) |
| 1577 flags |= parentFrame->document()->sandboxFlags(); | 1576 flags |= parentFrame->document()->sandboxFlags(); |
| 1578 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) | 1577 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) |
| 1579 flags |= ownerElement->sandboxFlags(); | 1578 flags |= ownerElement->sandboxFlags(); |
| 1580 return flags; | 1579 return flags; |
| 1581 } | 1580 } |
| 1582 | 1581 |
| 1583 } // namespace WebCore | 1582 } // namespace WebCore |
| OLD | NEW |