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

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

Issue 444413003: Make style building for font-weight less custom. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
« no previous file with comments | « Source/core/css/CSSProperties.in ('k') | 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 void setFontFamilyInitial(); 56 void setFontFamilyInitial();
57 void setFontFamilyInherit(const FontDescription&); 57 void setFontFamilyInherit(const FontDescription&);
58 void setFontFamilyValue(CSSValue*); 58 void setFontFamilyValue(CSSValue*);
59 59
60 void setFontSizeInitial(); 60 void setFontSizeInitial();
61 void setFontSizeInherit(const FontDescription&); 61 void setFontSizeInherit(const FontDescription&);
62 void setFontSizeValue(CSSValue*, RenderStyle* parentStyle, const RenderStyle * rootElementStyle); 62 void setFontSizeValue(CSSValue*, RenderStyle* parentStyle, const RenderStyle * rootElementStyle);
63 63
64 void setWeight(FontWeight); 64 void setWeight(FontWeight);
65 void setWeightBolder();
66 void setWeightLighter();
67 void setStretch(FontStretch); 65 void setStretch(FontStretch);
68 66
69 void setFeatureSettingsNormal(); 67 void setFeatureSettingsNormal();
70 void setFeatureSettingsValue(CSSValue*); 68 void setFeatureSettingsValue(CSSValue*);
71 69
72 void setScript(const String& locale); 70 void setScript(const String& locale);
73 void setStyle(FontStyle); 71 void setStyle(FontStyle);
74 void setVariant(FontVariant); 72 void setVariant(FontVariant);
75 void setVariantLigatures(const FontDescription::VariantLigatures&); 73 void setVariantLigatures(const FontDescription::VariantLigatures&);
76 void setTextRendering(TextRenderingMode); 74 void setTextRendering(TextRenderingMode);
(...skipping 14 matching lines...) Expand all
91 bool fontDirty() const { return m_fontDirty; } 89 bool fontDirty() const { return m_fontDirty; }
92 90
93 static FontDescription::GenericFamilyType initialGenericFamily() { return Fo ntDescription::NoFamily; } 91 static FontDescription::GenericFamilyType initialGenericFamily() { return Fo ntDescription::NoFamily; }
94 static TextRenderingMode initialTextRendering() { return AutoTextRendering; } 92 static TextRenderingMode initialTextRendering() { return AutoTextRendering; }
95 static FontVariant initialVariant() { return FontVariantNormal; } 93 static FontVariant initialVariant() { return FontVariantNormal; }
96 static FontDescription::VariantLigatures initialVariantLigatures() { return FontDescription::VariantLigatures(); } 94 static FontDescription::VariantLigatures initialVariantLigatures() { return FontDescription::VariantLigatures(); }
97 static FontStyle initialStyle() { return FontStyleNormal; } 95 static FontStyle initialStyle() { return FontStyleNormal; }
98 static FontDescription::Kerning initialKerning() { return FontDescription::A utoKerning; } 96 static FontDescription::Kerning initialKerning() { return FontDescription::A utoKerning; }
99 static FontSmoothingMode initialFontSmoothing() { return AutoSmoothing; } 97 static FontSmoothingMode initialFontSmoothing() { return AutoSmoothing; }
100 static FontStretch initialStretch() { return FontStretchNormal; } 98 static FontStretch initialStretch() { return FontStretchNormal; }
99 static FontWeight initialWeight() { return FontWeightNormal; }
101 100
102 friend class FontDescriptionChangeScope; 101 friend class FontDescriptionChangeScope;
103 102
104 private: 103 private:
105 104
106 // 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.
107 void setSize(FontDescription&, float effectiveZoom, float size); 106 void setSize(FontDescription&, float effectiveZoom, float size);
108 void checkForOrientationChange(RenderStyle*); 107 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 108 // 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); 109 void checkForGenericFamilyChange(RenderStyle*, const RenderStyle* parentStyl e);
(...skipping 16 matching lines...) Expand all
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
OLDNEW
« no previous file with comments | « Source/core/css/CSSProperties.in ('k') | Source/core/css/resolver/FontBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698