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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 void remove(const StyleRuleFontFace*); | 52 void remove(const StyleRuleFontFace*); |
53 void clearCSSConnected(); | 53 void clearCSSConnected(); |
54 void clearAll(); | 54 void clearAll(); |
55 void addFontFace(CSSFontSelector*, PassRefPtrWillBeRawPtr<FontFace>, bool cs
sConnected); | 55 void addFontFace(CSSFontSelector*, PassRefPtrWillBeRawPtr<FontFace>, bool cs
sConnected); |
56 void removeFontFace(FontFace*, bool cssConnected); | 56 void removeFontFace(FontFace*, bool cssConnected); |
57 | 57 |
58 // FIXME: It's sort of weird that add/remove uses StyleRuleFontFace* as key, | 58 // FIXME: It's sort of weird that add/remove uses StyleRuleFontFace* as key, |
59 // but this function uses FontDescription/family pair. | 59 // but this function uses FontDescription/family pair. |
60 CSSSegmentedFontFace* get(const FontDescription&, const AtomicString& family
); | 60 CSSSegmentedFontFace* get(const FontDescription&, const AtomicString& family
); |
61 | 61 |
62 const WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> >& cssConnectedFont
Faces() const { return m_cssConnectedFontFaces; } | 62 const WillBeHeapListHashSet<RefPtrWillBeMember<FontFace>>& cssConnectedFontF
aces() const { return m_cssConnectedFontFaces; } |
63 | 63 |
64 unsigned version() const { return m_version; } | 64 unsigned version() const { return m_version; } |
65 void incrementVersion() { ++m_version; } | 65 void incrementVersion() { ++m_version; } |
66 | 66 |
67 DECLARE_TRACE(); | 67 DECLARE_TRACE(); |
68 | 68 |
69 private: | 69 private: |
70 typedef WillBeHeapHashMap<unsigned, RefPtrWillBeMember<CSSSegmentedFontFace>
> TraitsMap; | 70 typedef WillBeHeapHashMap<unsigned, RefPtrWillBeMember<CSSSegmentedFontFace>
> TraitsMap; |
71 typedef WillBeHeapHashMap<String, OwnPtrWillBeMember<TraitsMap>, CaseFolding
Hash> FamilyToTraitsMap; | 71 typedef WillBeHeapHashMap<String, OwnPtrWillBeMember<TraitsMap>, CaseFolding
Hash> FamilyToTraitsMap; |
72 typedef WillBeHeapHashMap<const StyleRuleFontFace*, RefPtrWillBeMember<FontF
ace> > StyleRuleToFontFace; | 72 typedef WillBeHeapHashMap<const StyleRuleFontFace*, RefPtrWillBeMember<FontF
ace>> StyleRuleToFontFace; |
73 FamilyToTraitsMap m_fontFaces; | 73 FamilyToTraitsMap m_fontFaces; |
74 FamilyToTraitsMap m_fonts; | 74 FamilyToTraitsMap m_fonts; |
75 StyleRuleToFontFace m_styleRuleToFontFace; | 75 StyleRuleToFontFace m_styleRuleToFontFace; |
76 WillBeHeapListHashSet<RefPtrWillBeMember<FontFace> > m_cssConnectedFontFaces
; | 76 WillBeHeapListHashSet<RefPtrWillBeMember<FontFace>> m_cssConnectedFontFaces; |
77 | 77 |
78 // FIXME: See if this could be ditched | 78 // FIXME: See if this could be ditched |
79 // Used to compare Font instances, and the usage seems suspect. | 79 // Used to compare Font instances, and the usage seems suspect. |
80 unsigned m_version; | 80 unsigned m_version; |
81 }; | 81 }; |
82 | 82 |
83 } | 83 } |
84 | 84 |
85 #endif | 85 #endif |
OLD | NEW |