| OLD | NEW |
| 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 25 matching lines...) Expand all Loading... |
| 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 WTF_MAKE_NONCOPYABLE(FontBuilder); WTF_MAKE_FAST_ALLOCATED; |
| 42 public: | 42 public: |
| 43 FontBuilder(); | 43 FontBuilder(); |
| 44 | 44 |
| 45 // FIXME: The name is probably wrong, but matches StyleResolverState callsit
e for consistency. | 45 // FIXME: The name is probably wrong, but matches StyleResolverState callsit
e for consistency. |
| 46 void initForStyleResolve(const Document&, RenderStyle*, bool useSVGZoomRules
); | 46 void initForStyleResolve(const Document&, RenderStyle*); |
| 47 | 47 |
| 48 void setInitial(float effectiveZoom); | 48 void setInitial(float effectiveZoom); |
| 49 | 49 |
| 50 void didChangeFontParameters(bool); | 50 void didChangeFontParameters(bool); |
| 51 | 51 |
| 52 void inheritFrom(const FontDescription&); | 52 void inheritFrom(const FontDescription&); |
| 53 void fromSystemFont(CSSValueID, float effectiveZoom); | 53 void fromSystemFont(CSSValueID, float effectiveZoom); |
| 54 | 54 |
| 55 void setFontFamilyInitial(); | 55 void setFontFamilyInitial(); |
| 56 void setFontFamilyInherit(const FontDescription&); | 56 void setFontFamilyInherit(const FontDescription&); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // FIXME: "size" arg should be first for consistency with other similar func
tions. | 105 // FIXME: "size" arg should be first for consistency with other similar func
tions. |
| 106 void setSize(FontDescription&, float effectiveZoom, float size); | 106 void setSize(FontDescription&, float effectiveZoom, float size); |
| 107 void checkForOrientationChange(RenderStyle*); | 107 void checkForOrientationChange(RenderStyle*); |
| 108 // This function fixes up the default font size if it detects that the curre
nt generic font family has changed. -dwh | 108 // This function fixes up the default font size if it detects that the curre
nt generic font family has changed. -dwh |
| 109 void checkForGenericFamilyChange(RenderStyle*, const RenderStyle* parentStyl
e); | 109 void checkForGenericFamilyChange(RenderStyle*, const RenderStyle* parentStyl
e); |
| 110 void updateComputedSize(RenderStyle*, const RenderStyle* parentStyle); | 110 void updateComputedSize(RenderStyle*, const RenderStyle* parentStyle); |
| 111 | 111 |
| 112 float getComputedSizeFromSpecifiedSize(FontDescription&, float effectiveZoom
, float specifiedSize); | 112 float getComputedSizeFromSpecifiedSize(FontDescription&, float effectiveZoom
, float specifiedSize); |
| 113 | 113 |
| 114 const Document* m_document; | 114 const Document* m_document; |
| 115 bool m_useSVGZoomRules; | |
| 116 bool m_fontSizehasViewportUnits; | 115 bool m_fontSizehasViewportUnits; |
| 117 // FIXME: This member is here on a short-term lease. The plan is to remove | 116 // 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 | 117 // 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. | 118 // directly, rather than as a byproduct of calling RenderStyle::setFontDescr
iption. |
| 120 // FontDescriptionChangeScope should be the only consumer of this member. | 119 // FontDescriptionChangeScope should be the only consumer of this member. |
| 121 // If you're using it, U R DOIN IT WRONG. | 120 // If you're using it, U R DOIN IT WRONG. |
| 122 RenderStyle* m_style; | 121 RenderStyle* m_style; |
| 123 | 122 |
| 124 // Fontbuilder is responsbile for creating the Font() | 123 // Fontbuilder is responsbile for creating the Font() |
| 125 // object on RenderStyle from various other font-related | 124 // object on RenderStyle from various other font-related |
| 126 // properties on RenderStyle. Whenever one of those | 125 // properties on RenderStyle. Whenever one of those |
| 127 // is changed, FontBuilder tracks the need to update | 126 // is changed, FontBuilder tracks the need to update |
| 128 // style->font() with this bool. | 127 // style->font() with this bool. |
| 129 bool m_fontDirty; | 128 bool m_fontDirty; |
| 130 | 129 |
| 131 friend class FontBuilderTest; | 130 friend class FontBuilderTest; |
| 132 }; | 131 }; |
| 133 | 132 |
| 134 } | 133 } |
| 135 | 134 |
| 136 #endif | 135 #endif |
| OLD | NEW |