Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1240)

Side by Side Diff: Source/core/css/FontFaceCache.h

Issue 335393002: Should update FontFaceCache version when updating generic font-family settings. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSFontSelector.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/core/css/CSSFontSelector.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698