| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 | 27 |
| 28 #include "sky/engine/core/css/FontFaceCache.h" | 28 #include "sky/engine/core/css/FontFaceCache.h" |
| 29 | 29 |
| 30 #include "gen/sky/platform/FontFamilyNames.h" | 30 #include "gen/sky/platform/FontFamilyNames.h" |
| 31 #include "sky/engine/core/css/CSSFontSelector.h" | 31 #include "sky/engine/core/css/CSSFontSelector.h" |
| 32 #include "sky/engine/core/css/CSSSegmentedFontFace.h" | 32 #include "sky/engine/core/css/CSSSegmentedFontFace.h" |
| 33 #include "sky/engine/core/css/CSSValueList.h" | 33 #include "sky/engine/core/css/CSSValueList.h" |
| 34 #include "sky/engine/core/css/FontFace.h" | 34 #include "sky/engine/core/css/FontFace.h" |
| 35 #include "sky/engine/core/css/StyleRule.h" | 35 #include "sky/engine/core/css/StyleRule.h" |
| 36 #include "sky/engine/core/fetch/FontResource.h" | |
| 37 #include "sky/engine/core/fetch/ResourceFetcher.h" | 36 #include "sky/engine/core/fetch/ResourceFetcher.h" |
| 38 #include "sky/engine/platform/fonts/FontDescription.h" | 37 #include "sky/engine/platform/fonts/FontDescription.h" |
| 39 #include "sky/engine/wtf/text/AtomicString.h" | 38 #include "sky/engine/wtf/text/AtomicString.h" |
| 40 | 39 |
| 41 namespace blink { | 40 namespace blink { |
| 42 | 41 |
| 43 FontFaceCache::FontFaceCache() | 42 FontFaceCache::FontFaceCache() |
| 44 : m_version(0) | 43 : m_version(0) |
| 45 { | 44 { |
| 46 } | 45 } |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 if (traits.variant() == FontVariantNormal && candidateTraits.variant
() != FontVariantNormal) | 218 if (traits.variant() == FontVariantNormal && candidateTraits.variant
() != FontVariantNormal) |
| 220 continue; | 219 continue; |
| 221 if (!faceResult.storedValue->value || compareFontFaces(candidate, fa
ceResult.storedValue->value.get(), traits)) | 220 if (!faceResult.storedValue->value || compareFontFaces(candidate, fa
ceResult.storedValue->value.get(), traits)) |
| 222 faceResult.storedValue->value = candidate; | 221 faceResult.storedValue->value = candidate; |
| 223 } | 222 } |
| 224 } | 223 } |
| 225 return faceResult.storedValue->value.get(); | 224 return faceResult.storedValue->value.get(); |
| 226 } | 225 } |
| 227 | 226 |
| 228 } | 227 } |
| OLD | NEW |