| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
| 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
| 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
| 7 * Copyright (C) 2015 Google Inc. All rights reserved. | 7 * Copyright (C) 2015 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 ASSERT(result->length() <= 3); | 469 ASSERT(result->length() <= 3); |
| 470 return result.release(); | 470 return result.release(); |
| 471 } | 471 } |
| 472 | 472 |
| 473 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForLineHeight(const Layout
Style& style) | 473 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForLineHeight(const Layout
Style& style) |
| 474 { | 474 { |
| 475 Length length = style.lineHeight(); | 475 Length length = style.lineHeight(); |
| 476 if (length.isNegative()) | 476 if (length.isNegative()) |
| 477 return cssValuePool().createIdentifierValue(CSSValueNormal); | 477 return cssValuePool().createIdentifierValue(CSSValueNormal); |
| 478 | 478 |
| 479 return zoomAdjustedPixelValue(floatValueForLength(length, style.fontDescript
ion().specifiedSize()), style); | 479 float floatValue = floatValueForLength(length, style.fontDescription().speci
fiedSize()); |
| 480 if (length.isPercent()) |
| 481 return cssValuePool().createValue(floatValue, CSSPrimitiveValue::CSS_PX)
; |
| 482 |
| 483 return zoomAdjustedPixelValue(floatValue, style); |
| 480 } | 484 } |
| 481 | 485 |
| 482 static CSSValueID identifierForFamily(const AtomicString& family) | 486 static CSSValueID identifierForFamily(const AtomicString& family) |
| 483 { | 487 { |
| 484 if (family == FontFamilyNames::webkit_cursive) | 488 if (family == FontFamilyNames::webkit_cursive) |
| 485 return CSSValueCursive; | 489 return CSSValueCursive; |
| 486 if (family == FontFamilyNames::webkit_fantasy) | 490 if (family == FontFamilyNames::webkit_fantasy) |
| 487 return CSSValueFantasy; | 491 return CSSValueFantasy; |
| 488 if (family == FontFamilyNames::webkit_monospace) | 492 if (family == FontFamilyNames::webkit_monospace) |
| 489 return CSSValueMonospace; | 493 return CSSValueMonospace; |
| (...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2568 return zoomAdjustedPixelValueForLength(svgStyle.ry(), style); | 2572 return zoomAdjustedPixelValueForLength(svgStyle.ry(), style); |
| 2569 | 2573 |
| 2570 case CSSPropertyAll: | 2574 case CSSPropertyAll: |
| 2571 return nullptr; | 2575 return nullptr; |
| 2572 } | 2576 } |
| 2573 ASSERT_NOT_REACHED(); | 2577 ASSERT_NOT_REACHED(); |
| 2574 return nullptr; | 2578 return nullptr; |
| 2575 } | 2579 } |
| 2576 | 2580 |
| 2577 } | 2581 } |
| OLD | NEW |