| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 | 438 |
| 439 MutableStylePropertySet* inlineStyle = copyStyleOrCreateEmpty(element->i
nlineStyle()); | 439 MutableStylePropertySet* inlineStyle = copyStyleOrCreateEmpty(element->i
nlineStyle()); |
| 440 float currentFontSize = computedFontSize(node); | 440 float currentFontSize = computedFontSize(node); |
| 441 float desiredFontSize = max(MinimumFontSize, startingFontSizes.get(node)
+ style->fontSizeDelta()); | 441 float desiredFontSize = max(MinimumFontSize, startingFontSizes.get(node)
+ style->fontSizeDelta()); |
| 442 const CSSValue* value = inlineStyle->getPropertyCSSValue(CSSPropertyFont
Size); | 442 const CSSValue* value = inlineStyle->getPropertyCSSValue(CSSPropertyFont
Size); |
| 443 if (value) { | 443 if (value) { |
| 444 element->removeInlineStyleProperty(CSSPropertyFontSize); | 444 element->removeInlineStyleProperty(CSSPropertyFontSize); |
| 445 currentFontSize = computedFontSize(node); | 445 currentFontSize = computedFontSize(node); |
| 446 } | 446 } |
| 447 if (currentFontSize != desiredFontSize) { | 447 if (currentFontSize != desiredFontSize) { |
| 448 inlineStyle->setProperty(CSSPropertyFontSize, CSSPrimitiveValue::cre
ate(desiredFontSize, CSSPrimitiveValue::UnitType::Pixels), false); | 448 inlineStyle->setProperty(CSSPropertyFontSize, *CSSPrimitiveValue::cr
eate(desiredFontSize, CSSPrimitiveValue::UnitType::Pixels), false); |
| 449 setNodeAttribute(element, styleAttr, AtomicString(inlineStyle->asTex
t())); | 449 setNodeAttribute(element, styleAttr, AtomicString(inlineStyle->asTex
t())); |
| 450 } | 450 } |
| 451 if (inlineStyle->isEmpty()) { | 451 if (inlineStyle->isEmpty()) { |
| 452 removeElementAttribute(element, styleAttr); | 452 removeElementAttribute(element, styleAttr); |
| 453 if (isSpanWithoutAttributesOrUnstyledStyleSpan(element)) | 453 if (isSpanWithoutAttributesOrUnstyledStyleSpan(element)) |
| 454 unstyledSpans.append(element); | 454 unstyledSpans.append(element); |
| 455 } | 455 } |
| 456 } | 456 } |
| 457 | 457 |
| 458 for (const auto& unstyledSpan : unstyledSpans) { | 458 for (const auto& unstyledSpan : unstyledSpans) { |
| (...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1756 DEFINE_TRACE(ApplyStyleCommand) | 1756 DEFINE_TRACE(ApplyStyleCommand) |
| 1757 { | 1757 { |
| 1758 visitor->trace(m_style); | 1758 visitor->trace(m_style); |
| 1759 visitor->trace(m_start); | 1759 visitor->trace(m_start); |
| 1760 visitor->trace(m_end); | 1760 visitor->trace(m_end); |
| 1761 visitor->trace(m_styledInlineElement); | 1761 visitor->trace(m_styledInlineElement); |
| 1762 CompositeEditCommand::trace(visitor); | 1762 CompositeEditCommand::trace(visitor); |
| 1763 } | 1763 } |
| 1764 | 1764 |
| 1765 } // namespace blink | 1765 } // namespace blink |
| OLD | NEW |