| 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 ASSERT(result->length() <= 3); | 472 ASSERT(result->length() <= 3); |
| 473 return result.release(); | 473 return result.release(); |
| 474 } | 474 } |
| 475 | 475 |
| 476 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForLineHeight(const Comput
edStyle& style) | 476 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForLineHeight(const Comput
edStyle& style) |
| 477 { | 477 { |
| 478 Length length = style.lineHeight(); | 478 Length length = style.lineHeight(); |
| 479 if (length.isNegative()) | 479 if (length.isNegative()) |
| 480 return cssValuePool().createIdentifierValue(CSSValueNormal); | 480 return cssValuePool().createIdentifierValue(CSSValueNormal); |
| 481 | 481 |
| 482 float floatValue = floatValueForLength(length, style.fontDescription().speci
fiedSize()); | 482 return zoomAdjustedPixelValue(floatValueForLength(length, style.fontDescript
ion().specifiedSize()), style); |
| 483 if (length.isPercent()) | |
| 484 return cssValuePool().createValue(floatValue, CSSPrimitiveValue::CSS_PX)
; | |
| 485 | |
| 486 return zoomAdjustedPixelValue(floatValue, style); | |
| 487 } | 483 } |
| 488 | 484 |
| 489 static CSSValueID identifierForFamily(const AtomicString& family) | 485 static CSSValueID identifierForFamily(const AtomicString& family) |
| 490 { | 486 { |
| 491 if (family == FontFamilyNames::webkit_cursive) | 487 if (family == FontFamilyNames::webkit_cursive) |
| 492 return CSSValueCursive; | 488 return CSSValueCursive; |
| 493 if (family == FontFamilyNames::webkit_fantasy) | 489 if (family == FontFamilyNames::webkit_fantasy) |
| 494 return CSSValueFantasy; | 490 return CSSValueFantasy; |
| 495 if (family == FontFamilyNames::webkit_monospace) | 491 if (family == FontFamilyNames::webkit_monospace) |
| 496 return CSSValueMonospace; | 492 return CSSValueMonospace; |
| (...skipping 2077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2574 case CSSPropertyAll: | 2570 case CSSPropertyAll: |
| 2575 return nullptr; | 2571 return nullptr; |
| 2576 default: | 2572 default: |
| 2577 break; | 2573 break; |
| 2578 } | 2574 } |
| 2579 ASSERT_NOT_REACHED(); | 2575 ASSERT_NOT_REACHED(); |
| 2580 return nullptr; | 2576 return nullptr; |
| 2581 } | 2577 } |
| 2582 | 2578 |
| 2583 } | 2579 } |
| OLD | NEW |