| 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 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2047 | 2047 |
| 2048 switch (disposition) { | 2048 switch (disposition) { |
| 2049 case XFrameOptionsSameOrigin: { | 2049 case XFrameOptionsSameOrigin: { |
| 2050 UseCounter::count(m_frame->document(), UseCounter::XFrameOptionsSameOrig
in); | 2050 UseCounter::count(m_frame->document(), UseCounter::XFrameOptionsSameOrig
in); |
| 2051 RefPtr<SecurityOrigin> origin = SecurityOrigin::create(url); | 2051 RefPtr<SecurityOrigin> origin = SecurityOrigin::create(url); |
| 2052 if (!origin->isSameSchemeHostPort(topFrame->document()->securityOrigin()
)) | 2052 if (!origin->isSameSchemeHostPort(topFrame->document()->securityOrigin()
)) |
| 2053 return true; | 2053 return true; |
| 2054 for (Frame* frame = m_frame->tree()->parent(); frame; frame = frame->tre
e()->parent()) { | 2054 for (Frame* frame = m_frame->tree()->parent(); frame; frame = frame->tre
e()->parent()) { |
| 2055 if (!origin->isSameSchemeHostPort(frame->document()->securityOrigin(
))) { | 2055 if (!origin->isSameSchemeHostPort(frame->document()->securityOrigin(
))) { |
| 2056 UseCounter::count(m_frame->document(), UseCounter::XFrameOptions
SameOriginWithBadAncestorChain); | 2056 UseCounter::count(m_frame->document(), UseCounter::XFrameOptions
SameOriginWithBadAncestorChain); |
| 2057 break; | 2057 return true; |
| 2058 } | 2058 } |
| 2059 } | 2059 } |
| 2060 return false; | 2060 return false; |
| 2061 } | 2061 } |
| 2062 case XFrameOptionsDeny: | 2062 case XFrameOptionsDeny: |
| 2063 return true; | 2063 return true; |
| 2064 case XFrameOptionsAllowAll: | 2064 case XFrameOptionsAllowAll: |
| 2065 return false; | 2065 return false; |
| 2066 case XFrameOptionsConflict: | 2066 case XFrameOptionsConflict: |
| 2067 m_frame->document()->addConsoleMessage(JSMessageSource, ErrorMessageLeve
l, "Multiple 'X-Frame-Options' headers with conflicting values ('" + content + "
') encountered when loading '" + url.elidedString() + "'. Falling back to 'DENY'
.", requestIdentifier); | 2067 m_frame->document()->addConsoleMessage(JSMessageSource, ErrorMessageLeve
l, "Multiple 'X-Frame-Options' headers with conflicting values ('" + content + "
') encountered when loading '" + url.elidedString() + "'. Falling back to 'DENY'
.", requestIdentifier); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2260 InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get()); | 2260 InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get()); |
| 2261 | 2261 |
| 2262 m_frame->page()->didCommitLoad(m_frame); | 2262 m_frame->page()->didCommitLoad(m_frame); |
| 2263 | 2263 |
| 2264 if (m_frame->page()->mainFrame() == m_frame) | 2264 if (m_frame->page()->mainFrame() == m_frame) |
| 2265 m_frame->page()->useCounter()->didCommitLoad(); | 2265 m_frame->page()->useCounter()->didCommitLoad(); |
| 2266 | 2266 |
| 2267 } | 2267 } |
| 2268 | 2268 |
| 2269 } // namespace WebCore | 2269 } // namespace WebCore |
| OLD | NEW |