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 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1249 { | 1249 { |
1250 const Length& lh = lineHeight(); | 1250 const Length& lh = lineHeight(); |
1251 | 1251 |
1252 // Negative value means the line height is not set. Use the font's built-in
spacing. | 1252 // Negative value means the line height is not set. Use the font's built-in
spacing. |
1253 if (lh.isNegative()) | 1253 if (lh.isNegative()) |
1254 return fontMetrics().lineSpacing(); | 1254 return fontMetrics().lineSpacing(); |
1255 | 1255 |
1256 if (lh.isPercent()) | 1256 if (lh.isPercent()) |
1257 return minimumValueForLength(lh, fontSize()); | 1257 return minimumValueForLength(lh, fontSize()); |
1258 | 1258 |
1259 return lh.value(); | 1259 return std::min(lh.value(), LayoutUnit::max().toFloat()); |
1260 } | 1260 } |
1261 | 1261 |
1262 void ComputedStyle::setWordSpacing(float wordSpacing) | 1262 void ComputedStyle::setWordSpacing(float wordSpacing) |
1263 { | 1263 { |
1264 FontSelector* currentFontSelector = font().fontSelector(); | 1264 FontSelector* currentFontSelector = font().fontSelector(); |
1265 FontDescription desc(fontDescription()); | 1265 FontDescription desc(fontDescription()); |
1266 desc.setWordSpacing(wordSpacing); | 1266 desc.setWordSpacing(wordSpacing); |
1267 setFontDescription(desc); | 1267 setFontDescription(desc); |
1268 font().update(currentFontSelector); | 1268 font().update(currentFontSelector); |
1269 } | 1269 } |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1722 horizontal || includeLogicalRightEdge); | 1722 horizontal || includeLogicalRightEdge); |
1723 | 1723 |
1724 edges[BSLeft] = BorderEdge(borderLeftWidth(), | 1724 edges[BSLeft] = BorderEdge(borderLeftWidth(), |
1725 visitedDependentColor(CSSPropertyBorderLeftColor), | 1725 visitedDependentColor(CSSPropertyBorderLeftColor), |
1726 borderLeftStyle(), | 1726 borderLeftStyle(), |
1727 borderLeftIsTransparent(), | 1727 borderLeftIsTransparent(), |
1728 !horizontal || includeLogicalLeftEdge); | 1728 !horizontal || includeLogicalLeftEdge); |
1729 } | 1729 } |
1730 | 1730 |
1731 } // namespace blink | 1731 } // namespace blink |
OLD | NEW |