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 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 ASSERT_NOT_REACHED(); | 1393 ASSERT_NOT_REACHED(); |
1394 return false; | 1394 return false; |
1395 } | 1395 } |
1396 } | 1396 } |
1397 | 1397 |
1398 bool FrameLoader::shouldTreatURLAsSrcdocDocument(const KURL& url) const | 1398 bool FrameLoader::shouldTreatURLAsSrcdocDocument(const KURL& url) const |
1399 { | 1399 { |
1400 if (!equalIgnoringCase(url.string(), "about:srcdoc")) | 1400 if (!equalIgnoringCase(url.string(), "about:srcdoc")) |
1401 return false; | 1401 return false; |
1402 HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement(); | 1402 HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement(); |
1403 if (!ownerElement) | 1403 if (!isHTMLIFrameElement(ownerElement)) |
1404 return false; | |
1405 if (!ownerElement->hasTagName(iframeTag)) | |
1406 return false; | 1404 return false; |
1407 return ownerElement->fastHasAttribute(srcdocAttr); | 1405 return ownerElement->fastHasAttribute(srcdocAttr); |
1408 } | 1406 } |
1409 | 1407 |
1410 LocalFrame* FrameLoader::findFrameForNavigation(const AtomicString& name, Docume
nt* activeDocument) | 1408 LocalFrame* FrameLoader::findFrameForNavigation(const AtomicString& name, Docume
nt* activeDocument) |
1411 { | 1409 { |
1412 ASSERT(activeDocument); | 1410 ASSERT(activeDocument); |
1413 LocalFrame* frame = m_frame->tree().find(name); | 1411 LocalFrame* frame = m_frame->tree().find(name); |
1414 if (!activeDocument->canNavigate(frame)) | 1412 if (!activeDocument->canNavigate(frame)) |
1415 return 0; | 1413 return 0; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1460 { | 1458 { |
1461 SandboxFlags flags = m_forcedSandboxFlags; | 1459 SandboxFlags flags = m_forcedSandboxFlags; |
1462 if (LocalFrame* parentFrame = m_frame->tree().parent()) | 1460 if (LocalFrame* parentFrame = m_frame->tree().parent()) |
1463 flags |= parentFrame->document()->sandboxFlags(); | 1461 flags |= parentFrame->document()->sandboxFlags(); |
1464 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) | 1462 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) |
1465 flags |= ownerElement->sandboxFlags(); | 1463 flags |= ownerElement->sandboxFlags(); |
1466 return flags; | 1464 return flags; |
1467 } | 1465 } |
1468 | 1466 |
1469 } // namespace WebCore | 1467 } // namespace WebCore |
OLD | NEW |