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 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 int ComputedStyle::computedLineHeight() const | 1374 int ComputedStyle::computedLineHeight() const |
1375 { | 1375 { |
1376 const Length& lh = lineHeight(); | 1376 const Length& lh = lineHeight(); |
1377 | 1377 |
1378 // Negative value means the line height is not set. Use the font's built-in | 1378 // Negative value means the line height is not set. Use the font's built-in |
1379 // spacing, if avalible. | 1379 // spacing, if avalible. |
1380 if (lh.isNegative() && font().primaryFont()) | 1380 if (lh.isNegative() && font().primaryFont()) |
1381 return fontMetrics().lineSpacing(); | 1381 return fontMetrics().lineSpacing(); |
1382 | 1382 |
1383 if (lh.hasPercent()) | 1383 if (lh.hasPercent()) |
1384 return minimumValueForLength(lh, computedFontSize()); | 1384 return minimumValueForLength(lh, LayoutUnit(computedFontSize())); |
1385 | 1385 |
1386 return std::min(lh.value(), LayoutUnit::max().toFloat()); | 1386 return std::min(lh.value(), LayoutUnit::max().toFloat()); |
1387 } | 1387 } |
1388 | 1388 |
1389 void ComputedStyle::setWordSpacing(float wordSpacing) | 1389 void ComputedStyle::setWordSpacing(float wordSpacing) |
1390 { | 1390 { |
1391 FontSelector* currentFontSelector = font().fontSelector(); | 1391 FontSelector* currentFontSelector = font().fontSelector(); |
1392 FontDescription desc(fontDescription()); | 1392 FontDescription desc(fontDescription()); |
1393 desc.setWordSpacing(wordSpacing); | 1393 desc.setWordSpacing(wordSpacing); |
1394 setFontDescription(desc); | 1394 setFontDescription(desc); |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 if (!shadowList) | 1874 if (!shadowList) |
1875 return false; | 1875 return false; |
1876 for (size_t i = shadowList->shadows().size(); i--; ) { | 1876 for (size_t i = shadowList->shadows().size(); i--; ) { |
1877 if (shadowList->shadows()[i].color().isCurrentColor()) | 1877 if (shadowList->shadows()[i].color().isCurrentColor()) |
1878 return true; | 1878 return true; |
1879 } | 1879 } |
1880 return false; | 1880 return false; |
1881 } | 1881 } |
1882 | 1882 |
1883 } // namespace blink | 1883 } // namespace blink |
OLD | NEW |