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

Side by Side Diff: third_party/WebKit/Source/core/css/FontFaceSet.cpp

Issue 2721613002: Fix matching Roboto Bold for src: local("Roboto Regular") (Closed)
Patch Set: Fix test case for Mac Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met: 5 * modification, are permitted provided that the following conditions are met:
6 * 6 *
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 if (face) { 420 if (face) {
421 if (!face->checkFont(text)) 421 if (!face->checkFont(text))
422 return false; 422 return false;
423 hasLoadedFaces = true; 423 hasLoadedFaces = true;
424 } 424 }
425 } 425 }
426 if (hasLoadedFaces) 426 if (hasLoadedFaces)
427 return true; 427 return true;
428 for (const FontFamily* f = &font.getFontDescription().family(); f; 428 for (const FontFamily* f = &font.getFontDescription().family(); f;
429 f = f->next()) { 429 f = f->next()) {
430 if (fontSelector->isPlatformFontAvailable(font.getFontDescription(), 430 if (fontSelector->isPlatformFamilyMatchAvailable(font.getFontDescription(),
431 f->family())) 431 f->family()))
432 return true; 432 return true;
433 } 433 }
434 return false; 434 return false;
435 } 435 }
436 436
437 bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font) { 437 bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font) {
438 if (fontString.isEmpty()) 438 if (fontString.isEmpty())
439 return false; 439 return false;
440 440
441 // Interpret fontString in the same way as the 'font' attribute of 441 // Interpret fontString in the same way as the 'font' attribute of
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 visitor->trace(m_failedFonts); 557 visitor->trace(m_failedFonts);
558 visitor->trace(m_nonCSSConnectedFaces); 558 visitor->trace(m_nonCSSConnectedFaces);
559 visitor->trace(m_asyncRunner); 559 visitor->trace(m_asyncRunner);
560 EventTargetWithInlineData::trace(visitor); 560 EventTargetWithInlineData::trace(visitor);
561 Supplement<Document>::trace(visitor); 561 Supplement<Document>::trace(visitor);
562 SuspendableObject::trace(visitor); 562 SuspendableObject::trace(visitor);
563 FontFace::LoadFontCallback::trace(visitor); 563 FontFace::LoadFontCallback::trace(visitor);
564 } 564 }
565 565
566 } // namespace blink 566 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontSelector.cpp ('k') | third_party/WebKit/Source/core/css/LocalFontFaceSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698