Index: Source/core/css/FontFace.cpp |
diff --git a/Source/core/css/FontFace.cpp b/Source/core/css/FontFace.cpp |
index 306cdfdd3b2bcec6ea3086e06921dcbc76686792..29d02b3eb995f4190557d52c95c6b4666309d1cf 100644 |
--- a/Source/core/css/FontFace.cpp |
+++ b/Source/core/css/FontFace.cpp |
@@ -56,9 +56,6 @@ |
#include "core/frame/LocalFrame.h" |
#include "core/frame/Settings.h" |
#include "core/frame/UseCounter.h" |
-#include "core/svg/SVGFontFaceElement.h" |
-#include "core/svg/SVGFontFaceSource.h" |
-#include "core/svg/SVGRemoteFontFaceSource.h" |
#include "platform/FontFamilyNames.h" |
#include "platform/SharedBuffer.h" |
#include "wtf/ArrayBufferView.h" |
@@ -512,48 +509,23 @@ void FontFace::initCSSFontFace(Document* document, PassRefPtrWillBeRawPtr<CSSVal |
CSSValueList* srcList = toCSSValueList(src.get()); |
int srcLength = srcList->length(); |
- bool foundSVGFont = false; |
- |
for (int i = 0; i < srcLength; i++) { |
// An item in the list either specifies a string (local font name) or a URL (remote font to download). |
CSSFontFaceSrcValue* item = toCSSFontFaceSrcValue(srcList->item(i)); |
OwnPtrWillBeRawPtr<CSSFontFaceSource> source = nullptr; |
-#if ENABLE(SVG_FONTS) |
- foundSVGFont = item->isSVGFontFaceSrc() || item->svgFontFaceElement(); |
-#endif |
if (!item->isLocal()) { |
Settings* settings = document ? document->frame() ? document->frame()->settings() : 0 : 0; |
- bool allowDownloading = foundSVGFont || (settings && settings->downloadableBinaryFontsEnabled()); |
+ bool allowDownloading = settings && settings->downloadableBinaryFontsEnabled(); |
if (allowDownloading && item->isSupportedFormat() && document) { |
FontResource* fetched = item->fetch(document); |
if (fetched) { |
FontLoader* fontLoader = document->styleEngine()->fontSelector()->fontLoader(); |
- |
-#if ENABLE(SVG_FONTS) |
- if (foundSVGFont) { |
- source = adoptPtrWillBeNoop(new SVGRemoteFontFaceSource(item->resource(), fetched, fontLoader)); |
- } else |
-#endif |
- { |
- source = adoptPtrWillBeNoop(new RemoteFontFaceSource(fetched, fontLoader)); |
- } |
+ source = adoptPtrWillBeNoop(new RemoteFontFaceSource(fetched, fontLoader)); |
} |
} |
} else { |
-#if ENABLE(SVG_FONTS) |
- if (item->svgFontFaceElement()) { |
- RefPtrWillBeRawPtr<SVGFontFaceElement> fontfaceElement = item->svgFontFaceElement(); |
- // SVGFontFaceSource assumes that it is the case where <font-face> element resides in the same document. |
- // We put a RELEASE_ASSERT here as it will cause UAF if the assumption is false. |
- RELEASE_ASSERT(fontfaceElement->inDocument()); |
- RELEASE_ASSERT(fontfaceElement->document() == document); |
- source = adoptPtrWillBeNoop(new SVGFontFaceSource(fontfaceElement.get())); |
- } else |
-#endif |
- { |
- source = adoptPtrWillBeNoop(new LocalFontFaceSource(item->resource())); |
- } |
+ source = adoptPtrWillBeNoop(new LocalFontFaceSource(item->resource())); |
} |
if (source) |