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

Side by Side Diff: sky/engine/core/css/CSSSegmentedFontFace.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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/css/CSSSegmentedFontFace.h ('k') | sky/engine/core/css/CSSValue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 bool CSSSegmentedFontFace::isValid() const 64 bool CSSSegmentedFontFace::isValid() const
65 { 65 {
66 // Valid if at least one font face is valid. 66 // Valid if at least one font face is valid.
67 for (FontFaceList::const_iterator it = m_fontFaces.begin(); it != m_fontFace s.end(); ++it) { 67 for (FontFaceList::const_iterator it = m_fontFaces.begin(); it != m_fontFace s.end(); ++it) {
68 if ((*it)->cssFontFace()->isValid()) 68 if ((*it)->cssFontFace()->isValid())
69 return true; 69 return true;
70 } 70 }
71 return false; 71 return false;
72 } 72 }
73 73
74 void CSSSegmentedFontFace::fontLoaded(CSSFontFace*)
75 {
76 pruneTable();
77 }
78
79 void CSSSegmentedFontFace::fontLoadWaitLimitExceeded(CSSFontFace*)
80 {
81 pruneTable();
82 }
83
84 void CSSSegmentedFontFace::addFontFace(PassRefPtr<FontFace> prpFontFace, bool cs sConnected) 74 void CSSSegmentedFontFace::addFontFace(PassRefPtr<FontFace> prpFontFace, bool cs sConnected)
85 { 75 {
86 RefPtr<FontFace> fontFace = prpFontFace; 76 RefPtr<FontFace> fontFace = prpFontFace;
87 pruneTable(); 77 pruneTable();
88 fontFace->cssFontFace()->setSegmentedFontFace(this); 78 fontFace->cssFontFace()->setSegmentedFontFace(this);
89 if (cssConnected) { 79 if (cssConnected) {
90 m_fontFaces.insertBefore(m_firstNonCssConnectedFace, fontFace); 80 m_fontFaces.insertBefore(m_firstNonCssConnectedFace, fontFace);
91 } else { 81 } else {
92 // This is the only place in Blink that is using addReturnIterator. 82 // This is the only place in Blink that is using addReturnIterator.
93 FontFaceList::iterator iterator = m_fontFaces.addReturnIterator(fontFace ); 83 FontFaceList::iterator iterator = m_fontFaces.addReturnIterator(fontFace );
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 187
198 void CSSSegmentedFontFace::match(const String& text, Vector<RefPtr<FontFace> >& faces) const 188 void CSSSegmentedFontFace::match(const String& text, Vector<RefPtr<FontFace> >& faces) const
199 { 189 {
200 for (FontFaceList::const_iterator it = m_fontFaces.begin(); it != m_fontFace s.end(); ++it) { 190 for (FontFaceList::const_iterator it = m_fontFaces.begin(); it != m_fontFace s.end(); ++it) {
201 if ((*it)->cssFontFace()->ranges().intersectsWith(text)) 191 if ((*it)->cssFontFace()->ranges().intersectsWith(text))
202 faces.append(*it); 192 faces.append(*it);
203 } 193 }
204 } 194 }
205 195
206 } 196 }
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSSegmentedFontFace.h ('k') | sky/engine/core/css/CSSValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698