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

Side by Side Diff: trunk/Source/core/rendering/style/RenderStyle.cpp

Issue 195823006: Revert 169264 "Add plumbing for font-stretch" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 9 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 | « trunk/Source/core/rendering/style/RenderStyle.h ('k') | no next file » | 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 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. 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 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 1260
1261 void RenderStyle::setFontWeight(FontWeight weight) 1261 void RenderStyle::setFontWeight(FontWeight weight)
1262 { 1262 {
1263 FontSelector* currentFontSelector = font().fontSelector(); 1263 FontSelector* currentFontSelector = font().fontSelector();
1264 FontDescription desc(fontDescription()); 1264 FontDescription desc(fontDescription());
1265 desc.setWeight(weight); 1265 desc.setWeight(weight);
1266 setFontDescription(desc); 1266 setFontDescription(desc);
1267 font().update(currentFontSelector); 1267 font().update(currentFontSelector);
1268 } 1268 }
1269 1269
1270 void RenderStyle::setFontStretch(FontStretch stretch)
1271 {
1272 FontSelector* currentFontSelector = font().fontSelector();
1273 FontDescription desc(fontDescription());
1274 desc.setStretch(stretch);
1275 setFontDescription(desc);
1276 font().update(currentFontSelector);
1277 }
1278
1279 void RenderStyle::getShadowExtent(const ShadowList* shadowList, LayoutUnit &top, LayoutUnit &right, LayoutUnit &bottom, LayoutUnit &left) const 1270 void RenderStyle::getShadowExtent(const ShadowList* shadowList, LayoutUnit &top, LayoutUnit &right, LayoutUnit &bottom, LayoutUnit &left) const
1280 { 1271 {
1281 top = 0; 1272 top = 0;
1282 right = 0; 1273 right = 0;
1283 bottom = 0; 1274 bottom = 0;
1284 left = 0; 1275 left = 0;
1285 1276
1286 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0; 1277 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0;
1287 for (size_t i = 0; i < shadowCount; ++i) { 1278 for (size_t i = 0; i < shadowCount; ++i) {
1288 const ShadowData& shadow = shadowList->shadows()[i]; 1279 const ShadowData& shadow = shadowList->shadows()[i];
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 // right 1640 // right
1650 radiiSum = radii.topRight().height() + radii.bottomRight().height(); 1641 radiiSum = radii.topRight().height() + radii.bottomRight().height();
1651 if (radiiSum > rect.height()) 1642 if (radiiSum > rect.height())
1652 factor = std::min(rect.height() / radiiSum, factor); 1643 factor = std::min(rect.height() / radiiSum, factor);
1653 1644
1654 ASSERT(factor <= 1); 1645 ASSERT(factor <= 1);
1655 return factor; 1646 return factor;
1656 } 1647 }
1657 1648
1658 } // namespace WebCore 1649 } // namespace WebCore
OLDNEW
« no previous file with comments | « trunk/Source/core/rendering/style/RenderStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698