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 30 matching lines...) Expand all Loading... |
41 class FontDescription; | 41 class FontDescription; |
42 class StyleRuleFontFace; | 42 class StyleRuleFontFace; |
43 | 43 |
44 class FontFaceCache final { | 44 class FontFaceCache final { |
45 DISALLOW_NEW(); | 45 DISALLOW_NEW(); |
46 public: | 46 public: |
47 FontFaceCache(); | 47 FontFaceCache(); |
48 | 48 |
49 // FIXME: Remove CSSFontSelector as argument. Passing CSSFontSelector here i
s | 49 // FIXME: Remove CSSFontSelector as argument. Passing CSSFontSelector here i
s |
50 // a result of egregious spaghettification in FontFace/FontFaceSet. | 50 // a result of egregious spaghettification in FontFace/FontFaceSet. |
51 void add(CSSFontSelector*, const StyleRuleFontFace*, RawPtr<FontFace>); | 51 void add(CSSFontSelector*, const StyleRuleFontFace*, FontFace*); |
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*, RawPtr<FontFace>, bool cssConnected); | 55 void addFontFace(CSSFontSelector*, FontFace*, bool cssConnected); |
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 HeapListHashSet<Member<FontFace>>& cssConnectedFontFaces() const { ret
urn m_cssConnectedFontFaces; } | 62 const HeapListHashSet<Member<FontFace>>& cssConnectedFontFaces() const { ret
urn 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; } |
(...skipping 10 matching lines...) Expand all Loading... |
76 HeapListHashSet<Member<FontFace>> m_cssConnectedFontFaces; | 76 HeapListHashSet<Member<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 } // namespace blink | 83 } // namespace blink |
84 | 84 |
85 #endif | 85 #endif |
OLD | NEW |