Changeset 26027 for branches/feature-branch/WebCore/platform/Font.cpp
- Timestamp:
- 10/03/07 14:04:03 (14 months ago)
- Files:
-
- 1 modified
-
branches/feature-branch/WebCore/platform/Font.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-branch/WebCore/platform/Font.cpp
r25887 r26027 334 334 } 335 335 336 bool Font::operator==(const Font& other) const 337 { 338 // Our FontData don't have to be checked, since checking the font description will be fine. 339 // FIXME: This does not work if the font was made with the FontPlatformData constructor. 340 if ((m_fontList && m_fontList->loadingCustomFonts()) || 341 (other.m_fontList && other.m_fontList->loadingCustomFonts())) 342 return false; 343 344 FontSelector* first = m_fontList ? m_fontList->fontSelector() : 0; 345 FontSelector* second = other.m_fontList ? other.m_fontList->fontSelector() : 0; 346 347 return first == second 348 && m_fontDescription == other.m_fontDescription 349 && m_letterSpacing == other.m_letterSpacing 350 && m_wordSpacing == other.m_wordSpacing; 351 } 352 336 353 // FIXME: It is unfortunate that this function needs to be passed the original cluster. 337 354 // It is only required for the platform's FontCache::getFontDataForCharacters(), and it means … … 464 481 } 465 482 466 void Font::update( ) const483 void Font::update(PassRefPtr<FontSelector> fontSelector) const 467 484 { 468 485 // FIXME: It is pretty crazy that we are willing to just poke into a RefPtr, but it ends up … … 472 489 // and could eventually be rectified by using RefPtrs for Fonts themselves. 473 490 if (!m_fontList) 474 m_fontList = new FontFallbackList ;475 m_fontList->invalidate( );491 m_fontList = new FontFallbackList(); 492 m_fontList->invalidate(fontSelector); 476 493 m_pageZero = 0; 477 494 m_pages.clear(); … … 651 668 void Font::drawText(GraphicsContext* context, const TextRun& run, const TextStyle& style, const FloatPoint& point, int from, int to) const 652 669 { 670 // Don't draw anything while we are using custom fonts that are in the process of loading. 671 if (m_fontList && m_fontList->loadingCustomFonts()) 672 return; 673 653 674 to = (to == -1 ? run.length() : to); 654 675 if (canUseGlyphCache(run))