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

Unified Diff: Source/core/rendering/style/RenderStyle.cpp

Issue 721773002: Build animated font properties through FontBuilder. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove body tags. Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/style/RenderStyle.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/RenderStyle.cpp
diff --git a/Source/core/rendering/style/RenderStyle.cpp b/Source/core/rendering/style/RenderStyle.cpp
index 86e8b6e4dc58ed2963064f60ebbe98bc93875ac8..bebe7765b23f70668e4336f2463a04179b65949f 100644
--- a/Source/core/rendering/style/RenderStyle.cpp
+++ b/Source/core/rendering/style/RenderStyle.cpp
@@ -1223,10 +1223,11 @@ void RenderStyle::setLetterSpacing(float letterSpacing)
font().update(currentFontSelector);
}
-void RenderStyle::setFontSize(float size)
+void RenderStyle::setTextAutosizingMultiplier(float multiplier)
{
- // size must be specifiedSize if Text Autosizing is enabled, but computedSize if text
- // zoom is enabled (if neither is enabled it's irrelevant as they're probably the same).
+ SET_VAR(inherited, textAutosizingMultiplier, multiplier);
+
+ float size = specifiedFontSize();
ASSERT(std::isfinite(size));
if (!std::isfinite(size) || size < 0)
@@ -1239,7 +1240,6 @@ void RenderStyle::setFontSize(float size)
desc.setSpecifiedSize(size);
desc.setComputedSize(size);
- float multiplier = textAutosizingMultiplier();
if (multiplier > 1) {
float autosizedFontSize = TextAutosizer::computeAutosizedFontSize(size, multiplier);
desc.setComputedSize(std::min(maximumAllowedFontSize, autosizedFontSize));
@@ -1249,15 +1249,6 @@ void RenderStyle::setFontSize(float size)
font().update(currentFontSelector);
}
-void RenderStyle::setFontWeight(FontWeight weight)
-{
- FontSelector* currentFontSelector = font().fontSelector();
- FontDescription desc(fontDescription());
- desc.setWeight(weight);
- setFontDescription(desc);
- font().update(currentFontSelector);
-}
-
void RenderStyle::addAppliedTextDecoration(const AppliedTextDecoration& decoration)
{
RefPtr<AppliedTextDecorationList>& list = rareInheritedData.access()->appliedTextDecorations;
@@ -1315,15 +1306,6 @@ void RenderStyle::clearMultiCol()
rareNonInheritedData.access()->m_multiCol.init();
}
-void RenderStyle::setFontStretch(FontStretch stretch)
-{
- FontSelector* currentFontSelector = font().fontSelector();
- FontDescription desc(fontDescription());
- desc.setStretch(stretch);
- setFontDescription(desc);
- font().update(currentFontSelector);
-}
-
void RenderStyle::getShadowExtent(const ShadowList* shadowList, LayoutUnit &top, LayoutUnit &right, LayoutUnit &bottom, LayoutUnit &left) const
{
top = 0;
« no previous file with comments | « Source/core/rendering/style/RenderStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698