| 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 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 // too, though this involves messily poking into CalcExpressionLength. | 1345 // too, though this involves messily poking into CalcExpressionLength. |
| 1346 float multiplier = textAutosizingMultiplier(); | 1346 float multiplier = textAutosizingMultiplier(); |
| 1347 if (multiplier > 1 && lh.isFixed()) | 1347 if (multiplier > 1 && lh.isFixed()) |
| 1348 return Length(TextAutosizer::computeAutosizedFontSize(lh.value(), multip
lier), Fixed); | 1348 return Length(TextAutosizer::computeAutosizedFontSize(lh.value(), multip
lier), Fixed); |
| 1349 | 1349 |
| 1350 return lh; | 1350 return lh; |
| 1351 } | 1351 } |
| 1352 | 1352 |
| 1353 void ComputedStyle::setLineHeight(const Length& specifiedLineHeight) { SET_VAR(i
nherited, line_height, specifiedLineHeight); } | 1353 void ComputedStyle::setLineHeight(const Length& specifiedLineHeight) { SET_VAR(i
nherited, line_height, specifiedLineHeight); } |
| 1354 | 1354 |
| 1355 int ComputedStyle::computedLineHeight() const | 1355 float ComputedStyle::computedLineHeight() const |
| 1356 { | 1356 { |
| 1357 const Length& lh = lineHeight(); | 1357 const Length& lh = lineHeight(); |
| 1358 | 1358 |
| 1359 // Negative value means the line height is not set. Use the font's built-in | 1359 // Negative value means the line height is not set. Use the font's built-in |
| 1360 // spacing, if avalible. | 1360 // spacing, if avalible. |
| 1361 if (lh.isNegative() && font().primaryFont()) | 1361 if (lh.isNegative() && font().primaryFont()) |
| 1362 return getFontMetrics().lineSpacing(); | 1362 return getFontMetrics().lineSpacing(); |
| 1363 | 1363 |
| 1364 if (lh.hasPercent()) | 1364 if (lh.hasPercent()) |
| 1365 return minimumValueForLength(lh, LayoutUnit(computedFontSize())); | 1365 return minimumValueForLength(lh, LayoutUnit(computedFontSize())); |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1853 if (!shadowList) | 1853 if (!shadowList) |
| 1854 return false; | 1854 return false; |
| 1855 for (size_t i = shadowList->shadows().size(); i--; ) { | 1855 for (size_t i = shadowList->shadows().size(); i--; ) { |
| 1856 if (shadowList->shadows()[i].color().isCurrentColor()) | 1856 if (shadowList->shadows()[i].color().isCurrentColor()) |
| 1857 return true; | 1857 return true; |
| 1858 } | 1858 } |
| 1859 return false; | 1859 return false; |
| 1860 } | 1860 } |
| 1861 | 1861 |
| 1862 } // namespace blink | 1862 } // namespace blink |
| OLD | NEW |