| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 void setTextRenderingMode(TextRenderingMode); | 76 void setTextRenderingMode(TextRenderingMode); |
| 77 void setKerning(FontDescription::Kerning); | 77 void setKerning(FontDescription::Kerning); |
| 78 void setFontSmoothing(FontSmoothingMode); | 78 void setFontSmoothing(FontSmoothingMode); |
| 79 | 79 |
| 80 // FIXME: These need to just vend a Font object eventually. | 80 // FIXME: These need to just vend a Font object eventually. |
| 81 void createFont(PassRefPtr<FontSelector>, const RenderStyle* parentStyle, Re
nderStyle*); | 81 void createFont(PassRefPtr<FontSelector>, const RenderStyle* parentStyle, Re
nderStyle*); |
| 82 // FIXME: This is nearly static, should either made fully static or decompos
ed into | 82 // FIXME: This is nearly static, should either made fully static or decompos
ed into |
| 83 // FontBuilder calls at the callsite. | 83 // FontBuilder calls at the callsite. |
| 84 void createFontForDocument(PassRefPtr<FontSelector>, RenderStyle*); | 84 void createFontForDocument(PassRefPtr<FontSelector>, RenderStyle*); |
| 85 | 85 |
| 86 bool fontSizeHasViewportUnits() { return m_fontSizehasViewportUnits; } |
| 87 |
| 86 // FIXME: These should not be necessary eventually. | 88 // FIXME: These should not be necessary eventually. |
| 87 void setFontDirty(bool fontDirty) { m_fontDirty = fontDirty; } | 89 void setFontDirty(bool fontDirty) { m_fontDirty = fontDirty; } |
| 88 // FIXME: This is only used by an ASSERT in StyleResolver. Remove? | 90 // FIXME: This is only used by an ASSERT in StyleResolver. Remove? |
| 89 bool fontDirty() const { return m_fontDirty; } | 91 bool fontDirty() const { return m_fontDirty; } |
| 90 | 92 |
| 91 friend class FontDescriptionChangeScope; | 93 friend class FontDescriptionChangeScope; |
| 92 private: | 94 private: |
| 93 | 95 |
| 94 // FIXME: "size" arg should be first for consistency with other similar func
tions. | 96 // FIXME: "size" arg should be first for consistency with other similar func
tions. |
| 95 void setSize(FontDescription&, float effectiveZoom, float size); | 97 void setSize(FontDescription&, float effectiveZoom, float size); |
| 96 void checkForOrientationChange(RenderStyle*); | 98 void checkForOrientationChange(RenderStyle*); |
| 97 // This function fixes up the default font size if it detects that the curre
nt generic font family has changed. -dwh | 99 // This function fixes up the default font size if it detects that the curre
nt generic font family has changed. -dwh |
| 98 void checkForGenericFamilyChange(RenderStyle*, const RenderStyle* parentStyl
e); | 100 void checkForGenericFamilyChange(RenderStyle*, const RenderStyle* parentStyl
e); |
| 99 void checkForZoomChange(RenderStyle*, const RenderStyle* parentStyle); | 101 void checkForZoomChange(RenderStyle*, const RenderStyle* parentStyle); |
| 100 | 102 |
| 101 float getComputedSizeFromSpecifiedSize(FontDescription&, float effectiveZoom
, float specifiedSize); | 103 float getComputedSizeFromSpecifiedSize(FontDescription&, float effectiveZoom
, float specifiedSize); |
| 102 | 104 |
| 103 const Document* m_document; | 105 const Document* m_document; |
| 104 bool m_useSVGZoomRules; | 106 bool m_useSVGZoomRules; |
| 107 bool m_fontSizehasViewportUnits; |
| 105 // FIXME: This member is here on a short-term lease. The plan is to remove | 108 // FIXME: This member is here on a short-term lease. The plan is to remove |
| 106 // any notion of RenderStyle from here, allowing FontBuilder to build Font o
bjects | 109 // any notion of RenderStyle from here, allowing FontBuilder to build Font o
bjects |
| 107 // directly, rather than as a byproduct of calling RenderStyle::setFontDescr
iption. | 110 // directly, rather than as a byproduct of calling RenderStyle::setFontDescr
iption. |
| 108 // FontDescriptionChangeScope should be the only consumer of this member. | 111 // FontDescriptionChangeScope should be the only consumer of this member. |
| 109 // If you're using it, U R DOIN IT WRONG. | 112 // If you're using it, U R DOIN IT WRONG. |
| 110 RenderStyle* m_style; | 113 RenderStyle* m_style; |
| 111 | 114 |
| 112 // Fontbuilder is responsbile for creating the Font() | 115 // Fontbuilder is responsbile for creating the Font() |
| 113 // object on RenderStyle from various other font-related | 116 // object on RenderStyle from various other font-related |
| 114 // properties on RenderStyle. Whenever one of those | 117 // properties on RenderStyle. Whenever one of those |
| 115 // is changed, FontBuilder tracks the need to update | 118 // is changed, FontBuilder tracks the need to update |
| 116 // style->font() with this bool. | 119 // style->font() with this bool. |
| 117 bool m_fontDirty; | 120 bool m_fontDirty; |
| 118 }; | 121 }; |
| 119 | 122 |
| 120 } | 123 } |
| 121 | 124 |
| 122 #endif | 125 #endif |
| OLD | NEW |