| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 using namespace HTMLNames; | 96 using namespace HTMLNames; |
| 97 | 97 |
| 98 static const char defaultAcceptHeader[] = "text/html,application/xhtml+xml,appli
cation/xml;q=0.9,image/webp,*/*;q=0.8"; | 98 static const char defaultAcceptHeader[] = "text/html,application/xhtml+xml,appli
cation/xml;q=0.9,image/webp,*/*;q=0.8"; |
| 99 | 99 |
| 100 bool isBackForwardLoadType(FrameLoadType type) | 100 bool isBackForwardLoadType(FrameLoadType type) |
| 101 { | 101 { |
| 102 return type == FrameLoadTypeBackForward; | 102 return type == FrameLoadTypeBackForward; |
| 103 } | 103 } |
| 104 | 104 |
| 105 // This is not in the FrameLoader class to emphasize that it does not depend on | |
| 106 // private FrameLoader data, and to avoid increasing the number of public functi
ons | |
| 107 // with access to private data. Since only this .cpp file needs it, making it | |
| 108 // non-member lets us exclude it from the header file, thus keeping core/loader/
FrameLoader.h's | |
| 109 // API simpler. | |
| 110 // | |
| 111 static bool isDocumentSandboxed(Frame* frame, SandboxFlags mask) | |
| 112 { | |
| 113 return frame->document() && frame->document()->isSandboxed(mask); | |
| 114 } | |
| 115 | |
| 116 class FrameLoader::FrameProgressTracker { | 105 class FrameLoader::FrameProgressTracker { |
| 117 public: | 106 public: |
| 118 static PassOwnPtr<FrameProgressTracker> create(Frame* frame) { return adoptP
tr(new FrameProgressTracker(frame)); } | 107 static PassOwnPtr<FrameProgressTracker> create(Frame* frame) { return adoptP
tr(new FrameProgressTracker(frame)); } |
| 119 ~FrameProgressTracker() | 108 ~FrameProgressTracker() |
| 120 { | 109 { |
| 121 ASSERT(!m_inProgress || m_frame->page()); | 110 ASSERT(!m_inProgress || m_frame->page()); |
| 122 if (m_inProgress) | 111 if (m_inProgress) |
| 123 m_frame->page()->progress().progressCompleted(m_frame); | 112 m_frame->page()->progress().progressCompleted(m_frame); |
| 124 } | 113 } |
| 125 | 114 |
| (...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 { | 1590 { |
| 1602 SandboxFlags flags = m_forcedSandboxFlags; | 1591 SandboxFlags flags = m_forcedSandboxFlags; |
| 1603 if (Frame* parentFrame = m_frame->tree().parent()) | 1592 if (Frame* parentFrame = m_frame->tree().parent()) |
| 1604 flags |= parentFrame->document()->sandboxFlags(); | 1593 flags |= parentFrame->document()->sandboxFlags(); |
| 1605 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) | 1594 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) |
| 1606 flags |= ownerElement->sandboxFlags(); | 1595 flags |= ownerElement->sandboxFlags(); |
| 1607 return flags; | 1596 return flags; |
| 1608 } | 1597 } |
| 1609 | 1598 |
| 1610 } // namespace WebCore | 1599 } // namespace WebCore |
| OLD | NEW |