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

Side by Side Diff: Source/core/css/resolver/FontBuilder.h

Issue 420273005: Oilpan: Remove Document* pointers in objects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | « no previous file | Source/core/css/resolver/FontBuilder.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 20 matching lines...) Expand all
31 31
32 namespace blink { 32 namespace blink {
33 33
34 class CSSValue; 34 class CSSValue;
35 class FontSelector; 35 class FontSelector;
36 class RenderStyle; 36 class RenderStyle;
37 37
38 class FontDescriptionChangeScope; 38 class FontDescriptionChangeScope;
39 39
40 class FontBuilder { 40 class FontBuilder {
41 WTF_MAKE_NONCOPYABLE(FontBuilder); WTF_MAKE_FAST_ALLOCATED; 41 STACK_ALLOCATED();
42 WTF_MAKE_NONCOPYABLE(FontBuilder);
42 public: 43 public:
43 FontBuilder(); 44 FontBuilder();
44 45
45 // FIXME: The name is probably wrong, but matches StyleResolverState callsit e for consistency. 46 // FIXME: The name is probably wrong, but matches StyleResolverState callsit e for consistency.
46 void initForStyleResolve(const Document&, RenderStyle*); 47 void initForStyleResolve(const Document&, RenderStyle*);
47 48
48 void setInitial(float effectiveZoom); 49 void setInitial(float effectiveZoom);
49 50
50 void didChangeFontParameters(bool); 51 void didChangeFontParameters(bool);
51 52
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 106
106 // FIXME: "size" arg should be first for consistency with other similar func tions. 107 // FIXME: "size" arg should be first for consistency with other similar func tions.
107 void setSize(FontDescription&, float effectiveZoom, float size); 108 void setSize(FontDescription&, float effectiveZoom, float size);
108 void checkForOrientationChange(RenderStyle*); 109 void checkForOrientationChange(RenderStyle*);
109 // This function fixes up the default font size if it detects that the curre nt generic font family has changed. -dwh 110 // This function fixes up the default font size if it detects that the curre nt generic font family has changed. -dwh
110 void checkForGenericFamilyChange(RenderStyle*, const RenderStyle* parentStyl e); 111 void checkForGenericFamilyChange(RenderStyle*, const RenderStyle* parentStyl e);
111 void updateComputedSize(RenderStyle*, const RenderStyle* parentStyle); 112 void updateComputedSize(RenderStyle*, const RenderStyle* parentStyle);
112 113
113 float getComputedSizeFromSpecifiedSize(FontDescription&, float effectiveZoom , float specifiedSize); 114 float getComputedSizeFromSpecifiedSize(FontDescription&, float effectiveZoom , float specifiedSize);
114 115
115 const Document* m_document; 116 RawPtrWillBeMember<const Document> m_document;
116 bool m_fontSizehasViewportUnits; 117 bool m_fontSizehasViewportUnits;
117 // FIXME: This member is here on a short-term lease. The plan is to remove 118 // FIXME: This member is here on a short-term lease. The plan is to remove
118 // any notion of RenderStyle from here, allowing FontBuilder to build Font o bjects 119 // any notion of RenderStyle from here, allowing FontBuilder to build Font o bjects
119 // directly, rather than as a byproduct of calling RenderStyle::setFontDescr iption. 120 // directly, rather than as a byproduct of calling RenderStyle::setFontDescr iption.
120 // FontDescriptionChangeScope should be the only consumer of this member. 121 // FontDescriptionChangeScope should be the only consumer of this member.
121 // If you're using it, U R DOIN IT WRONG. 122 // If you're using it, U R DOIN IT WRONG.
122 RenderStyle* m_style; 123 RenderStyle* m_style;
123 124
124 // Fontbuilder is responsbile for creating the Font() 125 // Fontbuilder is responsbile for creating the Font()
125 // object on RenderStyle from various other font-related 126 // object on RenderStyle from various other font-related
126 // properties on RenderStyle. Whenever one of those 127 // properties on RenderStyle. Whenever one of those
127 // is changed, FontBuilder tracks the need to update 128 // is changed, FontBuilder tracks the need to update
128 // style->font() with this bool. 129 // style->font() with this bool.
129 bool m_fontDirty; 130 bool m_fontDirty;
130 131
131 friend class FontBuilderTest; 132 friend class FontBuilderTest;
132 }; 133 };
133 134
134 } 135 }
135 136
136 #endif 137 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/resolver/FontBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698