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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
54 void addFontFace(CSSFontSelector*, PassRefPtrWillBeRawPtr<FontFace>, bool cs sConnected); | 54 void addFontFace(CSSFontSelector*, PassRefPtrWillBeRawPtr<FontFace>, bool cs sConnected); |
55 void removeFontFace(FontFace*, bool cssConnected); | 55 void removeFontFace(FontFace*, bool cssConnected); |
56 | 56 |
57 // FIXME: It's sort of weird that add/remove uses StyleRuleFontFace* as key, | 57 // FIXME: It's sort of weird that add/remove uses StyleRuleFontFace* as key, |
58 // but this function uses FontDescription/family pair. | 58 // but this function uses FontDescription/family pair. |
59 CSSSegmentedFontFace* get(const FontDescription&, const AtomicString& family ); | 59 CSSSegmentedFontFace* get(const FontDescription&, const AtomicString& family ); |
60 | 60 |
61 const ListHashSet<RefPtrWillBeMember<FontFace> >& cssConnectedFontFaces() co nst { return m_cssConnectedFontFaces; } | 61 const ListHashSet<RefPtrWillBeMember<FontFace> >& cssConnectedFontFaces() co nst { return m_cssConnectedFontFaces; } |
62 | 62 |
63 unsigned version() const { return m_version; } | 63 unsigned version() const { return m_version; } |
64 void update() { ++m_version; } | |
Kunihiko Sakamoto
2014/06/17 10:54:01
"update" sounds a little vague to me. How about "i
tasak
2014/06/17 11:36:20
Done.
| |
64 | 65 |
65 void trace(Visitor*); | 66 void trace(Visitor*); |
66 | 67 |
67 private: | 68 private: |
68 typedef WillBeHeapHashMap<unsigned, RefPtrWillBeMember<CSSSegmentedFontFace> > TraitsMap; | 69 typedef WillBeHeapHashMap<unsigned, RefPtrWillBeMember<CSSSegmentedFontFace> > TraitsMap; |
69 typedef WillBeHeapHashMap<String, OwnPtrWillBeMember<TraitsMap>, CaseFolding Hash> FamilyToTraitsMap; | 70 typedef WillBeHeapHashMap<String, OwnPtrWillBeMember<TraitsMap>, CaseFolding Hash> FamilyToTraitsMap; |
70 typedef WillBeHeapHashMap<const StyleRuleFontFace*, RefPtrWillBeMember<FontF ace> > StyleRuleToFontFace; | 71 typedef WillBeHeapHashMap<const StyleRuleFontFace*, RefPtrWillBeMember<FontF ace> > StyleRuleToFontFace; |
71 FamilyToTraitsMap m_fontFaces; | 72 FamilyToTraitsMap m_fontFaces; |
72 FamilyToTraitsMap m_fonts; | 73 FamilyToTraitsMap m_fonts; |
73 StyleRuleToFontFace m_styleRuleToFontFace; | 74 StyleRuleToFontFace m_styleRuleToFontFace; |
74 // FIXME: Oilpan: Replace by HeapLinkedHashSet or HeapListHashSet. | 75 // FIXME: Oilpan: Replace by HeapLinkedHashSet or HeapListHashSet. |
75 ListHashSet<RefPtrWillBeMember<FontFace> > m_cssConnectedFontFaces; | 76 ListHashSet<RefPtrWillBeMember<FontFace> > m_cssConnectedFontFaces; |
76 | 77 |
77 // FIXME: See if this could be ditched | 78 // FIXME: See if this could be ditched |
78 // Used to compare Font instances, and the usage seems suspect. | 79 // Used to compare Font instances, and the usage seems suspect. |
79 unsigned m_version; | 80 unsigned m_version; |
80 }; | 81 }; |
81 | 82 |
82 } | 83 } |
83 | 84 |
84 #endif | 85 #endif |
OLD | NEW |