| OLD | NEW |
| 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 void CSSFontSelector::fontLoaded() | 372 void CSSFontSelector::fontLoaded() |
| 373 { | 373 { |
| 374 dispatchInvalidationCallbacks(); | 374 dispatchInvalidationCallbacks(); |
| 375 } | 375 } |
| 376 | 376 |
| 377 void CSSFontSelector::fontCacheInvalidated() | 377 void CSSFontSelector::fontCacheInvalidated() |
| 378 { | 378 { |
| 379 dispatchInvalidationCallbacks(); | 379 dispatchInvalidationCallbacks(); |
| 380 } | 380 } |
| 381 | 381 |
| 382 void CSSFontSelector::retireCustomFont(FontData* fontData) |
| 383 { |
| 384 if (m_document) |
| 385 m_document->retireCustomFont(fontData); |
| 386 else { |
| 387 GlyphPageTreeNode::pruneTreeCustomFontData(fontData); |
| 388 delete fontData; |
| 389 } |
| 390 } |
| 391 |
| 382 static FontData* fontDataForGenericFamily(Document* document, const FontDescript
ion& fontDescription, const AtomicString& familyName) | 392 static FontData* fontDataForGenericFamily(Document* document, const FontDescript
ion& fontDescription, const AtomicString& familyName) |
| 383 { | 393 { |
| 384 if (!document || !document->frame()) | 394 if (!document || !document->frame()) |
| 385 return 0; | 395 return 0; |
| 386 | 396 |
| 387 const Settings* settings = document->frame()->settings(); | 397 const Settings* settings = document->frame()->settings(); |
| 388 if (!settings) | 398 if (!settings) |
| 389 return 0; | 399 return 0; |
| 390 | 400 |
| 391 AtomicString genericFamily; | 401 AtomicString genericFamily; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 unsigned numCandidates = candidateFontFaces.size(); | 567 unsigned numCandidates = candidateFontFaces.size(); |
| 558 for (unsigned i = 0; i < numCandidates; ++i) | 568 for (unsigned i = 0; i < numCandidates; ++i) |
| 559 face->appendFontFace(candidateFontFaces[i]); | 569 face->appendFontFace(candidateFontFaces[i]); |
| 560 } | 570 } |
| 561 | 571 |
| 562 // 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. | 572 // 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. |
| 563 return face->getFontData(fontDescription); | 573 return face->getFontData(fontDescription); |
| 564 } | 574 } |
| 565 | 575 |
| 566 } | 576 } |
| OLD | NEW |