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

Unified Diff: sky/engine/core/css/CSSFontFace.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/CSSFontFace.h ('k') | sky/engine/core/css/CSSFontFaceSource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/CSSFontFace.cpp
diff --git a/sky/engine/core/css/CSSFontFace.cpp b/sky/engine/core/css/CSSFontFace.cpp
index 8f2c0b6687c18bbfad216072af5f5a1050e33db1..72af4a67a8363f464e1fa1e54100aaba6ee1e638 100644
--- a/sky/engine/core/css/CSSFontFace.cpp
+++ b/sky/engine/core/css/CSSFontFace.cpp
@@ -28,8 +28,6 @@
#include "sky/engine/core/css/CSSFontFaceSource.h"
#include "sky/engine/core/css/CSSFontSelector.h"
#include "sky/engine/core/css/CSSSegmentedFontFace.h"
-#include "sky/engine/core/css/FontFaceSet.h"
-#include "sky/engine/core/css/RemoteFontFaceSource.h"
#include "sky/engine/platform/fonts/FontDescription.h"
#include "sky/engine/platform/fonts/SimpleFontData.h"
@@ -47,38 +45,6 @@ void CSSFontFace::setSegmentedFontFace(CSSSegmentedFontFace* segmentedFontFace)
m_segmentedFontFace = segmentedFontFace;
}
-void CSSFontFace::didBeginLoad()
-{
- if (loadStatus() == FontFace::Unloaded)
- setLoadStatus(FontFace::Loading);
-}
-
-void CSSFontFace::fontLoaded(RemoteFontFaceSource* source)
-{
- if (!isValid() || source != m_sources.first())
- return;
-
- if (loadStatus() == FontFace::Loading) {
- if (source->ensureFontData()) {
- setLoadStatus(FontFace::Loaded);
- } else {
- m_sources.removeFirst();
- load();
- }
- }
-
- if (m_segmentedFontFace)
- m_segmentedFontFace->fontLoaded(this);
-}
-
-void CSSFontFace::fontLoadWaitLimitExceeded(RemoteFontFaceSource* source)
-{
- if (!isValid() || source != m_sources.first())
- return;
- if (m_segmentedFontFace)
- m_segmentedFontFace->fontLoadWaitLimitExceeded(this);
-}
-
PassRefPtr<SimpleFontData> CSSFontFace::getFontData(const FontDescription& fontDescription)
{
if (!isValid())
@@ -157,26 +123,6 @@ void CSSFontFace::setLoadStatus(FontFace::LoadStatus newStatus)
m_fontFace->setError();
else
m_fontFace->setLoadStatus(newStatus);
-
- if (!m_segmentedFontFace)
- return;
- Document* document = m_segmentedFontFace->fontSelector()->document();
- if (!document)
- return;
-
- switch (newStatus) {
- case FontFace::Loading:
- FontFaceSet::from(*document)->beginFontLoading(m_fontFace);
- break;
- case FontFace::Loaded:
- FontFaceSet::from(*document)->fontLoaded(m_fontFace);
- break;
- case FontFace::Error:
- FontFaceSet::from(*document)->loadError(m_fontFace);
- break;
- default:
- break;
- }
}
CSSFontFace::UnicodeRangeSet::UnicodeRangeSet(const Vector<UnicodeRange>& ranges)
« no previous file with comments | « sky/engine/core/css/CSSFontFace.h ('k') | sky/engine/core/css/CSSFontFaceSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698