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

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

Issue 736883002: Implement <select> Popup Menu using PagePopup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed tests for mac Created 5 years, 10 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 | « ManualTests/forms/list-picker.html ('k') | Source/core/dom/StyleEngine.h » ('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) 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2011 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 23 matching lines...) Expand all
34 #include "wtf/Forward.h" 34 #include "wtf/Forward.h"
35 #include "wtf/HashMap.h" 35 #include "wtf/HashMap.h"
36 #include "wtf/HashSet.h" 36 #include "wtf/HashSet.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class CSSFontSelectorClient; 40 class CSSFontSelectorClient;
41 class Document; 41 class Document;
42 class FontDescription; 42 class FontDescription;
43 43
44 class CSSFontSelector final : public FontSelector { 44 class CSSFontSelector : public FontSelector {
45 public: 45 public:
46 static PassRefPtrWillBeRawPtr<CSSFontSelector> create(Document* document) 46 static PassRefPtrWillBeRawPtr<CSSFontSelector> create(Document* document)
47 { 47 {
48 return adoptRefWillBeNoop(new CSSFontSelector(document)); 48 return adoptRefWillBeNoop(new CSSFontSelector(document));
49 } 49 }
50 virtual ~CSSFontSelector(); 50 virtual ~CSSFontSelector();
51 51
52 virtual unsigned version() const override { return m_fontFaceCache.version() ; } 52 virtual unsigned version() const override { return m_fontFaceCache.version() ; }
53 53
54 virtual PassRefPtr<FontData> getFontData(const FontDescription&, const Atomi cString&) override; 54 virtual PassRefPtr<FontData> getFontData(const FontDescription&, const Atomi cString&) override;
(...skipping 16 matching lines...) Expand all
71 71
72 Document* document() const { return m_document; } 72 Document* document() const { return m_document; }
73 FontFaceCache* fontFaceCache() { return &m_fontFaceCache; } 73 FontFaceCache* fontFaceCache() { return &m_fontFaceCache; }
74 FontLoader* fontLoader() { return m_fontLoader.get(); } 74 FontLoader* fontLoader() { return m_fontLoader.get(); }
75 75
76 const GenericFontFamilySettings& genericFontFamilySettings() const { return m_genericFontFamilySettings; } 76 const GenericFontFamilySettings& genericFontFamilySettings() const { return m_genericFontFamilySettings; }
77 void updateGenericFontFamilySettings(Document&); 77 void updateGenericFontFamilySettings(Document&);
78 78
79 virtual void trace(Visitor*) override; 79 virtual void trace(Visitor*) override;
80 80
81 protected:
82 explicit CSSFontSelector(Document*);
83
81 private: 84 private:
82 explicit CSSFontSelector(Document*);
83 85
84 void dispatchInvalidationCallbacks(); 86 void dispatchInvalidationCallbacks();
85 87
86 // FIXME: Oilpan: Ideally this should just be a traced Member but that will 88 // FIXME: Oilpan: Ideally this should just be a traced Member but that will
87 // currently leak because RenderStyle and its data are not on the heap. 89 // currently leak because RenderStyle and its data are not on the heap.
88 // See crbug.com/383860 for details. 90 // See crbug.com/383860 for details.
89 RawPtrWillBeWeakMember<Document> m_document; 91 RawPtrWillBeWeakMember<Document> m_document;
90 // FIXME: Move to Document or StyleEngine. 92 // FIXME: Move to Document or StyleEngine.
91 FontFaceCache m_fontFaceCache; 93 FontFaceCache m_fontFaceCache;
92 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSFontSelectorClient> > m_clients; 94 WillBeHeapHashSet<RawPtrWillBeWeakMember<CSSFontSelectorClient> > m_clients;
93 95
94 RefPtrWillBeMember<FontLoader> m_fontLoader; 96 RefPtrWillBeMember<FontLoader> m_fontLoader;
95 GenericFontFamilySettings m_genericFontFamilySettings; 97 GenericFontFamilySettings m_genericFontFamilySettings;
96 }; 98 };
97 99
98 } // namespace blink 100 } // namespace blink
99 101
100 #endif // CSSFontSelector_h 102 #endif // CSSFontSelector_h
OLDNEW
« no previous file with comments | « ManualTests/forms/list-picker.html ('k') | Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698