Index: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp |
diff --git a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp |
index b1141564d2424c0a8a97b91a158ab1d1b222863c..9c752ac4191827d6a255f0fecee7787d2be28b1b 100644 |
--- a/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp |
+++ b/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp |
@@ -28,8 +28,11 @@ |
#include "core/svg/graphics/SVGImage.h" |
#include "core/animation/AnimationTimeline.h" |
+#include "core/css/CSSFontSelector.h" |
#include "core/dom/NodeTraversal.h" |
+#include "core/dom/StyleEngine.h" |
#include "core/dom/shadow/FlatTreeTraversal.h" |
+#include "core/fetch/ResourceFetcher.h" |
#include "core/frame/Deprecation.h" |
#include "core/frame/FrameView.h" |
#include "core/frame/LocalFrame.h" |
@@ -536,6 +539,11 @@ bool SVGImage::dataChanged(bool allDataReceived) |
// Set the concrete object size before a container size is available. |
m_concreteObjectSize = roundedIntSize(calculateConcreteObjectSize(FloatSize(300, 150))); |
+ |
+ // Forces pending font loading to start (and we assume loading completes sychronously here). |
+ toLocalFrame(m_page->mainFrame())->document()->styleEngine().fontSelector()->fontLoader()->loadPendingFonts(); |
+ // Forces SVG's document's load completion. |
+ loader.checkCompleted(); |
} |
return m_page; |