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

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

Issue 7932007: Merge 94508 - <rdar://problem/10071256> Retain retired custom fonts until the next style recalc (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 3 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
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