| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> |
| 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 return page->chromeClient().isSVGImageChromeClient(); | 92 return page->chromeClient().isSVGImageChromeClient(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 bool SVGImage::currentFrameHasSingleSecurityOrigin() const { | 95 bool SVGImage::currentFrameHasSingleSecurityOrigin() const { |
| 96 if (!m_page) | 96 if (!m_page) |
| 97 return true; | 97 return true; |
| 98 | 98 |
| 99 LocalFrame* frame = toLocalFrame(m_page->mainFrame()); | 99 LocalFrame* frame = toLocalFrame(m_page->mainFrame()); |
| 100 | 100 |
| 101 RELEASE_ASSERT(frame->document()->loadEventFinished()); | 101 CHECK(frame->document()->loadEventFinished()); |
| 102 | 102 |
| 103 SVGSVGElement* rootElement = | 103 SVGSVGElement* rootElement = |
| 104 frame->document()->accessSVGExtensions().rootElement(); | 104 frame->document()->accessSVGExtensions().rootElement(); |
| 105 if (!rootElement) | 105 if (!rootElement) |
| 106 return true; | 106 return true; |
| 107 | 107 |
| 108 // Don't allow foreignObject elements or images that are not known to be | 108 // Don't allow foreignObject elements or images that are not known to be |
| 109 // single-origin since these can leak cross-origin information. | 109 // single-origin since these can leak cross-origin information. |
| 110 for (Node* node = rootElement; node; node = FlatTreeTraversal::next(*node)) { | 110 for (Node* node = rootElement; node; node = FlatTreeTraversal::next(*node)) { |
| 111 if (isSVGForeignObjectElement(*node)) | 111 if (isSVGForeignObjectElement(*node)) |
| (...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 } | 658 } |
| 659 | 659 |
| 660 return m_page ? SizeAvailable : SizeUnavailable; | 660 return m_page ? SizeAvailable : SizeUnavailable; |
| 661 } | 661 } |
| 662 | 662 |
| 663 String SVGImage::filenameExtension() const { | 663 String SVGImage::filenameExtension() const { |
| 664 return "svg"; | 664 return "svg"; |
| 665 } | 665 } |
| 666 | 666 |
| 667 } // namespace blink | 667 } // namespace blink |
| OLD | NEW |