Changeset 91710 in webkit
- Timestamp:
- Jul 25, 2011 3:23:50 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r91707 r91710 1 2011-07-25 Dan Bernstein <mitz@apple.com> 2 3 Reverted r91699 due to 4 <http://webkit.org/b/65134> REGRESSION: r91699 broke some font tests (image+text) 5 6 Many tests relied on font loading occurring synchronously in the cached and local cases. 7 8 * css/CSSFontFaceSource.cpp: 9 (WebCore::CSSFontFaceSource::CSSFontFaceSource): 10 (WebCore::CSSFontFaceSource::~CSSFontFaceSource): 11 (WebCore::CSSFontFaceSource::getFontData): 12 * css/CSSFontFaceSource.h: 13 1 14 2011-06-07 Martin Robinson <mrobinson@igalia.com> 2 15 -
trunk/Source/WebCore/css/CSSFontFaceSource.cpp
r91699 r91710 51 51 , m_font(font) 52 52 , m_face(0) 53 , m_startLoadingTimer(this, &CSSFontFaceSource::startLoadingTimerFired)54 53 #if ENABLE(SVG_FONTS) 55 54 , m_hasExternalSVGFont(false) … … 62 61 CSSFontFaceSource::~CSSFontFaceSource() 63 62 { 64 m_startLoadingTimer.stop();65 63 if (m_font) 66 64 m_font->removeClient(this); … … 175 173 } 176 174 } else { 177 // Kick off the load now. Do it on a zero-delay timer rather than synchronously, because we may be in 178 // the middle of layout, and the loader may invoke aribtrary delegate or event handler code. 179 m_fontSelector = fontSelector; 180 if (!m_startLoadingTimer.isActive()) 181 m_startLoadingTimer.startOneShot(0); 182 175 // Kick off the load now. 176 if (CachedResourceLoader* cachedResourceLoader = fontSelector->cachedResourceLoader()) 177 m_font->beginLoadIfNeeded(cachedResourceLoader); 183 178 // FIXME: m_string is a URL so it makes no sense to pass it as a family name. 184 179 SimpleFontData* tempData = fontCache()->getCachedFontData(fontDescription, m_string); … … 195 190 } 196 191 197 void CSSFontFaceSource::startLoadingTimerFired(Timer<WebCore::CSSFontFaceSource>*)198 {199 ASSERT(m_font);200 ASSERT(m_fontSelector);201 202 if (CachedResourceLoader* cachedResourceLoader = m_fontSelector->cachedResourceLoader())203 m_font->beginLoadIfNeeded(cachedResourceLoader);204 205 m_fontSelector = nullptr;206 }207 208 192 #if ENABLE(SVG_FONTS) 209 193 SVGFontFaceElement* CSSFontFaceSource::svgFontFaceElement() const -
trunk/Source/WebCore/css/CSSFontFaceSource.h
r91699 r91710 29 29 #include "CachedResourceClient.h" 30 30 #include "CachedResourceHandle.h" 31 #include "Timer.h"32 31 #include <wtf/HashMap.h> 33 32 #include <wtf/text/AtomicString.h> … … 72 71 73 72 private: 74 void startLoadingTimerFired(Timer<CSSFontFaceSource>*);75 76 73 AtomicString m_string; // URI for remote, built-in font name for local. 77 74 CachedResourceHandle<CachedFont> m_font; // For remote fonts, a pointer to our cached resource. 78 75 CSSFontFace* m_face; // Our owning font face. 79 76 HashMap<unsigned, SimpleFontData*> m_fontDataTable; // The hash key is composed of size synthetic styles. 80 81 Timer<CSSFontFaceSource> m_startLoadingTimer;82 RefPtr<CSSFontSelector> m_fontSelector;83 77 84 78 #if ENABLE(SVG_FONTS)
Note: See TracChangeset
for help on using the changeset viewer.