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

Unified Diff: sky/engine/core/css/FontFace.cpp

Issue 1223843003: Remove support for loading remote font faces (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 | « sky/engine/core/css/DocumentFontFaceSet.idl ('k') | sky/engine/core/css/FontFaceCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/FontFace.cpp
diff --git a/sky/engine/core/css/FontFace.cpp b/sky/engine/core/css/FontFace.cpp
index d6468726a7c94ace432222725b7d87fc03393a01..5f678114bce65dbeed971f992dd77f33fe451708 100644
--- a/sky/engine/core/css/FontFace.cpp
+++ b/sky/engine/core/css/FontFace.cpp
@@ -35,13 +35,11 @@
#include "sky/engine/bindings/exception_state.h"
#include "sky/engine/core/css/BinaryDataFontFaceSource.h"
#include "sky/engine/core/css/CSSFontFace.h"
-#include "sky/engine/core/css/CSSFontFaceSrcValue.h"
#include "sky/engine/core/css/CSSFontSelector.h"
#include "sky/engine/core/css/CSSPrimitiveValue.h"
#include "sky/engine/core/css/CSSUnicodeRangeValue.h"
#include "sky/engine/core/css/CSSValueList.h"
#include "sky/engine/core/css/LocalFontFaceSource.h"
-#include "sky/engine/core/css/RemoteFontFaceSource.h"
#include "sky/engine/core/css/StylePropertySet.h"
#include "sky/engine/core/css/StyleRule.h"
#include "sky/engine/core/css/parser/BisonCSSParser.h"
@@ -341,7 +339,6 @@ void FontFace::loadInternal(ExecutionContext* context)
return;
m_cssFontFace->load();
- toDocument(context)->styleEngine()->fontSelector()->fontLoader()->loadPendingFonts();
}
FontTraits FontFace::traits() const
@@ -456,37 +453,6 @@ static PassOwnPtr<CSSFontFace> createCSSFontFace(FontFace* fontFace, CSSValue* u
void FontFace::initCSSFontFace(Document* document, PassRefPtr<CSSValue> src)
{
m_cssFontFace = createCSSFontFace(this, m_unicodeRange.get());
- if (m_error)
- return;
-
- // Each item in the src property's list is a single CSSFontFaceSource. Put them all into a CSSFontFace.
- ASSERT(src);
- ASSERT(src->isValueList());
- CSSValueList* srcList = toCSSValueList(src.get());
- int srcLength = srcList->length();
-
- 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));
- OwnPtr<CSSFontFaceSource> source = nullptr;
-
- if (!item->isLocal()) {
- Settings* settings = document ? document->frame() ? document->frame()->settings() : 0 : 0;
- bool allowDownloading = settings && settings->downloadableBinaryFontsEnabled();
- if (allowDownloading && item->isSupportedFormat() && document) {
- FontResource* fetched = item->fetch(document);
- if (fetched) {
- FontLoader* fontLoader = document->styleEngine()->fontSelector()->fontLoader();
- source = adoptPtr(new RemoteFontFaceSource(fetched, fontLoader));
- }
- }
- } else {
- source = adoptPtr(new LocalFontFaceSource(item->resource()));
- }
-
- if (source)
- m_cssFontFace->addSource(source.release());
- }
}
void FontFace::initCSSFontFace(const unsigned char* data, unsigned size)
« no previous file with comments | « sky/engine/core/css/DocumentFontFaceSet.idl ('k') | sky/engine/core/css/FontFaceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698