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

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

Issue 68933007: Add CSSFontSelector::removeFontFaceRule() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Avoid double hash lookups Created 7 years, 1 month 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') | Source/core/css/CSSSegmentedFontFace.cpp » ('j') | 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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 static PassRefPtr<CSSSegmentedFontFace> create(CSSFontSelector* selector, Fo ntTraitsMask traitsMask, bool isLocalFallback) { return adoptRef(new CSSSegmente dFontFace(selector, traitsMask, isLocalFallback)); } 47 static PassRefPtr<CSSSegmentedFontFace> create(CSSFontSelector* selector, Fo ntTraitsMask traitsMask, bool isLocalFallback) { return adoptRef(new CSSSegmente dFontFace(selector, traitsMask, isLocalFallback)); }
48 ~CSSSegmentedFontFace(); 48 ~CSSSegmentedFontFace();
49 49
50 CSSFontSelector* fontSelector() const { return m_fontSelector; } 50 CSSFontSelector* fontSelector() const { return m_fontSelector; }
51 FontTraitsMask traitsMask() const { return m_traitsMask; } 51 FontTraitsMask traitsMask() const { return m_traitsMask; }
52 bool isLocalFallback() const { return m_isLocalFallback; } 52 bool isLocalFallback() const { return m_isLocalFallback; }
53 53
54 void fontLoaded(CSSFontFace*); 54 void fontLoaded(CSSFontFace*);
55 55
56 void appendFontFace(PassRefPtr<CSSFontFace>); 56 void appendFontFace(PassRefPtr<CSSFontFace>);
57 void removeFontFace(PassRefPtr<CSSFontFace>);
58 bool isEmpty() const { return m_fontFaces.isEmpty(); }
57 59
58 PassRefPtr<FontData> getFontData(const FontDescription&); 60 PassRefPtr<FontData> getFontData(const FontDescription&);
59 61
60 class LoadFontCallback : public RefCounted<LoadFontCallback> { 62 class LoadFontCallback : public RefCounted<LoadFontCallback> {
61 public: 63 public:
62 virtual ~LoadFontCallback() { } 64 virtual ~LoadFontCallback() { }
63 virtual void notifyLoaded(CSSSegmentedFontFace*) = 0; 65 virtual void notifyLoaded(CSSSegmentedFontFace*) = 0;
64 virtual void notifyError(CSSSegmentedFontFace*) = 0; 66 virtual void notifyError(CSSSegmentedFontFace*) = 0;
65 }; 67 };
66 68
(...skipping 14 matching lines...) Expand all
81 FontTraitsMask m_traitsMask; 83 FontTraitsMask m_traitsMask;
82 bool m_isLocalFallback; 84 bool m_isLocalFallback;
83 HashMap<unsigned, RefPtr<SegmentedFontData> > m_fontDataTable; 85 HashMap<unsigned, RefPtr<SegmentedFontData> > m_fontDataTable;
84 Vector<RefPtr<CSSFontFace>, 1> m_fontFaces; 86 Vector<RefPtr<CSSFontFace>, 1> m_fontFaces;
85 Vector<RefPtr<LoadFontCallback> > m_callbacks; 87 Vector<RefPtr<LoadFontCallback> > m_callbacks;
86 }; 88 };
87 89
88 } // namespace WebCore 90 } // namespace WebCore
89 91
90 #endif // CSSSegmentedFontFace_h 92 #endif // CSSSegmentedFontFace_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSFontSelector.cpp ('k') | Source/core/css/CSSSegmentedFontFace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698