| 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 10 matching lines...) Expand all Loading... |
| 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include "core/svg/graphics/SVGImage.h" | 28 #include "core/svg/graphics/SVGImage.h" |
| 29 | 29 |
| 30 #include "core/animation/AnimationTimeline.h" | 30 #include "core/animation/AnimationTimeline.h" |
| 31 #include "core/css/CSSFontSelector.h" |
| 31 #include "core/dom/NodeTraversal.h" | 32 #include "core/dom/NodeTraversal.h" |
| 33 #include "core/dom/StyleEngine.h" |
| 32 #include "core/dom/shadow/FlatTreeTraversal.h" | 34 #include "core/dom/shadow/FlatTreeTraversal.h" |
| 35 #include "core/fetch/ResourceFetcher.h" |
| 33 #include "core/frame/Deprecation.h" | 36 #include "core/frame/Deprecation.h" |
| 34 #include "core/frame/FrameView.h" | 37 #include "core/frame/FrameView.h" |
| 35 #include "core/frame/LocalFrame.h" | 38 #include "core/frame/LocalFrame.h" |
| 36 #include "core/frame/Settings.h" | 39 #include "core/frame/Settings.h" |
| 37 #include "core/style/ComputedStyle.h" | 40 #include "core/style/ComputedStyle.h" |
| 38 #include "core/layout/svg/LayoutSVGRoot.h" | 41 #include "core/layout/svg/LayoutSVGRoot.h" |
| 39 #include "core/loader/FrameLoadRequest.h" | 42 #include "core/loader/FrameLoadRequest.h" |
| 40 #include "core/paint/FloatClipRecorder.h" | 43 #include "core/paint/FloatClipRecorder.h" |
| 41 #include "core/paint/TransformRecorder.h" | 44 #include "core/paint/TransformRecorder.h" |
| 42 #include "core/svg/SVGDocumentExtensions.h" | 45 #include "core/svg/SVGDocumentExtensions.h" |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 frame->view()->setTransparent(true); // SVG Images are transparent. | 532 frame->view()->setTransparent(true); // SVG Images are transparent. |
| 530 | 533 |
| 531 m_page = page.release(); | 534 m_page = page.release(); |
| 532 | 535 |
| 533 TRACE_EVENT0("blink", "SVGImage::dataChanged::load"); | 536 TRACE_EVENT0("blink", "SVGImage::dataChanged::load"); |
| 534 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data(), Atomi
cString("image/svg+xml", AtomicString::ConstructFromLiteral), | 537 loader.load(FrameLoadRequest(0, blankURL(), SubstituteData(data(), Atomi
cString("image/svg+xml", AtomicString::ConstructFromLiteral), |
| 535 AtomicString("UTF-8", AtomicString::ConstructFromLiteral), KURL(), F
orceSynchronousLoad))); | 538 AtomicString("UTF-8", AtomicString::ConstructFromLiteral), KURL(), F
orceSynchronousLoad))); |
| 536 | 539 |
| 537 // Set the concrete object size before a container size is available. | 540 // Set the concrete object size before a container size is available. |
| 538 m_concreteObjectSize = roundedIntSize(calculateConcreteObjectSize(FloatS
ize(300, 150))); | 541 m_concreteObjectSize = roundedIntSize(calculateConcreteObjectSize(FloatS
ize(300, 150))); |
| 542 |
| 543 // Forces pending font loading to start (and we assume loading completes
sychronously here). |
| 544 toLocalFrame(m_page->mainFrame())->document()->styleEngine().fontSelecto
r()->fontLoader()->loadPendingFonts(); |
| 545 // Forces SVG's document's load completion. |
| 546 loader.checkCompleted(); |
| 539 } | 547 } |
| 540 | 548 |
| 541 return m_page; | 549 return m_page; |
| 542 } | 550 } |
| 543 | 551 |
| 544 String SVGImage::filenameExtension() const | 552 String SVGImage::filenameExtension() const |
| 545 { | 553 { |
| 546 return "svg"; | 554 return "svg"; |
| 547 } | 555 } |
| 548 | 556 |
| 549 } // namespace blink | 557 } // namespace blink |
| OLD | NEW |