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

Side by Side Diff: Source/WebCore/css/CSSFontSelector.cpp

Issue 8273018: Merge 97402 - Source/WebCore: Register custom fonts at their creation time, rather than at retire... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 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 | « Source/WebCore/css/CSSFontSelector.h ('k') | Source/WebCore/css/CSSSegmentedFontFace.cpp » ('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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 void CSSFontSelector::fontLoaded() 376 void CSSFontSelector::fontLoaded()
377 { 377 {
378 dispatchInvalidationCallbacks(); 378 dispatchInvalidationCallbacks();
379 } 379 }
380 380
381 void CSSFontSelector::fontCacheInvalidated() 381 void CSSFontSelector::fontCacheInvalidated()
382 { 382 {
383 dispatchInvalidationCallbacks(); 383 dispatchInvalidationCallbacks();
384 } 384 }
385 385
386 void CSSFontSelector::retireCustomFont(FontData* fontData)
387 {
388 if (m_document)
389 m_document->retireCustomFont(fontData);
390 else {
391 GlyphPageTreeNode::pruneTreeCustomFontData(fontData);
392 delete fontData;
393 }
394 }
395
396 static FontData* fontDataForGenericFamily(Document* document, const FontDescript ion& fontDescription, const AtomicString& familyName) 386 static FontData* fontDataForGenericFamily(Document* document, const FontDescript ion& fontDescription, const AtomicString& familyName)
397 { 387 {
398 if (!document || !document->frame()) 388 if (!document || !document->frame())
399 return 0; 389 return 0;
400 390
401 const Settings* settings = document->frame()->settings(); 391 const Settings* settings = document->frame()->settings();
402 if (!settings) 392 if (!settings)
403 return 0; 393 return 0;
404 394
405 AtomicString genericFamily; 395 AtomicString genericFamily;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 unsigned numCandidates = candidateFontFaces.size(); 569 unsigned numCandidates = candidateFontFaces.size();
580 for (unsigned i = 0; i < numCandidates; ++i) 570 for (unsigned i = 0; i < numCandidates; ++i)
581 face->appendFontFace(candidateFontFaces[i]); 571 face->appendFontFace(candidateFontFaces[i]);
582 } 572 }
583 573
584 // We have a face. Ask it for a font data. If it cannot produce one, it wi ll fail, and the OS will take over. 574 // We have a face. Ask it for a font data. If it cannot produce one, it wi ll fail, and the OS will take over.
585 return face->getFontData(fontDescription); 575 return face->getFontData(fontDescription);
586 } 576 }
587 577
588 } 578 }
OLDNEW
« no previous file with comments | « Source/WebCore/css/CSSFontSelector.h ('k') | Source/WebCore/css/CSSSegmentedFontFace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698