| OLD | NEW |
| 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 Loading... |
| 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 |
| 1270 void RenderStyle::getShadowExtent(const ShadowList* shadowList, LayoutUnit &top,
LayoutUnit &right, LayoutUnit &bottom, LayoutUnit &left) const | 1279 void RenderStyle::getShadowExtent(const ShadowList* shadowList, LayoutUnit &top,
LayoutUnit &right, LayoutUnit &bottom, LayoutUnit &left) const |
| 1271 { | 1280 { |
| 1272 top = 0; | 1281 top = 0; |
| 1273 right = 0; | 1282 right = 0; |
| 1274 bottom = 0; | 1283 bottom = 0; |
| 1275 left = 0; | 1284 left = 0; |
| 1276 | 1285 |
| 1277 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0; | 1286 size_t shadowCount = shadowList ? shadowList->shadows().size() : 0; |
| 1278 for (size_t i = 0; i < shadowCount; ++i) { | 1287 for (size_t i = 0; i < shadowCount; ++i) { |
| 1279 const ShadowData& shadow = shadowList->shadows()[i]; | 1288 const ShadowData& shadow = shadowList->shadows()[i]; |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 // right | 1649 // right |
| 1641 radiiSum = radii.topRight().height() + radii.bottomRight().height(); | 1650 radiiSum = radii.topRight().height() + radii.bottomRight().height(); |
| 1642 if (radiiSum > rect.height()) | 1651 if (radiiSum > rect.height()) |
| 1643 factor = std::min(rect.height() / radiiSum, factor); | 1652 factor = std::min(rect.height() / radiiSum, factor); |
| 1644 | 1653 |
| 1645 ASSERT(factor <= 1); | 1654 ASSERT(factor <= 1); |
| 1646 return factor; | 1655 return factor; |
| 1647 } | 1656 } |
| 1648 | 1657 |
| 1649 } // namespace WebCore | 1658 } // namespace WebCore |
| OLD | NEW |