| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 // FIXME: It's sort of weird that add/remove uses StyleRuleFontFace* as key, | 59 // FIXME: It's sort of weird that add/remove uses StyleRuleFontFace* as key, |
| 60 // but this function uses FontDescription/family pair. | 60 // but this function uses FontDescription/family pair. |
| 61 CSSSegmentedFontFace* get(const FontDescription&, const AtomicString& family); | 61 CSSSegmentedFontFace* get(const FontDescription&, const AtomicString& family); |
| 62 | 62 |
| 63 const HeapListHashSet<Member<FontFace>>& cssConnectedFontFaces() const { | 63 const HeapListHashSet<Member<FontFace>>& cssConnectedFontFaces() const { |
| 64 return m_cssConnectedFontFaces; | 64 return m_cssConnectedFontFaces; |
| 65 } | 65 } |
| 66 | 66 |
| 67 unsigned version() const { return m_version; } | 67 unsigned version() const { return m_version; } |
| 68 void incrementVersion() { ++m_version; } | 68 void incrementVersion(); |
| 69 | 69 |
| 70 DECLARE_TRACE(); | 70 DECLARE_TRACE(); |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 using TraitsMap = HeapHashMap<unsigned, Member<CSSSegmentedFontFace>>; | 73 using TraitsMap = HeapHashMap<unsigned, Member<CSSSegmentedFontFace>>; |
| 74 using FamilyToTraitsMap = | 74 using FamilyToTraitsMap = |
| 75 HeapHashMap<String, Member<TraitsMap>, CaseFoldingHash>; | 75 HeapHashMap<String, Member<TraitsMap>, CaseFoldingHash>; |
| 76 using StyleRuleToFontFace = | 76 using StyleRuleToFontFace = |
| 77 HeapHashMap<Member<const StyleRuleFontFace>, Member<FontFace>>; | 77 HeapHashMap<Member<const StyleRuleFontFace>, Member<FontFace>>; |
| 78 FamilyToTraitsMap m_fontFaces; | 78 FamilyToTraitsMap m_fontFaces; |
| 79 FamilyToTraitsMap m_fonts; | 79 FamilyToTraitsMap m_fonts; |
| 80 StyleRuleToFontFace m_styleRuleToFontFace; | 80 StyleRuleToFontFace m_styleRuleToFontFace; |
| 81 HeapListHashSet<Member<FontFace>> m_cssConnectedFontFaces; | 81 HeapListHashSet<Member<FontFace>> m_cssConnectedFontFaces; |
| 82 | 82 |
| 83 // FIXME: See if this could be ditched | 83 // FIXME: See if this could be ditched |
| 84 // Used to compare Font instances, and the usage seems suspect. | 84 // Used to compare Font instances, and the usage seems suspect. |
| 85 unsigned m_version; | 85 unsigned m_version; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace blink | 88 } // namespace blink |
| 89 | 89 |
| 90 #endif | 90 #endif |
| OLD | NEW |