Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(786)

Unified Diff: third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp

Issue 1832333003: (1) Finish font subresource loading of SVG synchronously in SVGImage::dataChanged() Base URL: https://chromium.googlesource.com/chromium/src.git@SVG_new2_0
Patch Set: Rebase. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/as-image/resources/data-font-in-css-invalid-font.svg ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 590b80a3b1b71a7dfad4708b1d26412c4597c1d3..4573881f07b6fe821ea3cbb7c956bb668300e27f 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"
@@ -532,6 +535,9 @@ bool SVGImage::dataChanged(bool allDataReceived)
// Set the concrete object size before a container size is available.
m_intrinsicSize = roundedIntSize(concreteObjectSize(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();
}
return m_page;
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/as-image/resources/data-font-in-css-invalid-font.svg ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698