OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008, 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1675 | 1675 |
1676 float ApplyStyleCommand::computedFontSize(Node* node) | 1676 float ApplyStyleCommand::computedFontSize(Node* node) |
1677 { | 1677 { |
1678 if (!node) | 1678 if (!node) |
1679 return 0; | 1679 return 0; |
1680 | 1680 |
1681 CSSComputedStyleDeclaration* style = CSSComputedStyleDeclaration::create(nod
e); | 1681 CSSComputedStyleDeclaration* style = CSSComputedStyleDeclaration::create(nod
e); |
1682 if (!style) | 1682 if (!style) |
1683 return 0; | 1683 return 0; |
1684 | 1684 |
1685 CSSPrimitiveValue* value = toCSSPrimitiveValue(style->getPropertyCSSValue(CS
SPropertyFontSize)); | 1685 const CSSPrimitiveValue* value = toCSSPrimitiveValue(style->getPropertyCSSVa
lue(CSSPropertyFontSize)); |
1686 if (!value) | 1686 if (!value) |
1687 return 0; | 1687 return 0; |
1688 | 1688 |
1689 // TODO(yosin): We should have printer for |CSSPrimitiveValue::UnitType|. | 1689 // TODO(yosin): We should have printer for |CSSPrimitiveValue::UnitType|. |
1690 DCHECK(value->typeWithCalcResolved() == CSSPrimitiveValue::UnitType::Pixels)
; | 1690 DCHECK(value->typeWithCalcResolved() == CSSPrimitiveValue::UnitType::Pixels)
; |
1691 return value->getFloatValue(); | 1691 return value->getFloatValue(); |
1692 } | 1692 } |
1693 | 1693 |
1694 void ApplyStyleCommand::joinChildTextNodes(ContainerNode* node, const Position&
start, const Position& end) | 1694 void ApplyStyleCommand::joinChildTextNodes(ContainerNode* node, const Position&
start, const Position& end) |
1695 { | 1695 { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1731 DEFINE_TRACE(ApplyStyleCommand) | 1731 DEFINE_TRACE(ApplyStyleCommand) |
1732 { | 1732 { |
1733 visitor->trace(m_style); | 1733 visitor->trace(m_style); |
1734 visitor->trace(m_start); | 1734 visitor->trace(m_start); |
1735 visitor->trace(m_end); | 1735 visitor->trace(m_end); |
1736 visitor->trace(m_styledInlineElement); | 1736 visitor->trace(m_styledInlineElement); |
1737 CompositeEditCommand::trace(visitor); | 1737 CompositeEditCommand::trace(visitor); |
1738 } | 1738 } |
1739 | 1739 |
1740 } // namespace blink | 1740 } // namespace blink |
OLD | NEW |