| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
| 5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
| 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
| 8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 3619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3630 } | 3630 } |
| 3631 | 3631 |
| 3632 void Element::setInlineStyleProperty(CSSPropertyID propertyID, double value, CSS
PrimitiveValue::UnitType unit, bool important) | 3632 void Element::setInlineStyleProperty(CSSPropertyID propertyID, double value, CSS
PrimitiveValue::UnitType unit, bool important) |
| 3633 { | 3633 { |
| 3634 setInlineStyleProperty(propertyID, CSSPrimitiveValue::create(value, unit), i
mportant); | 3634 setInlineStyleProperty(propertyID, CSSPrimitiveValue::create(value, unit), i
mportant); |
| 3635 } | 3635 } |
| 3636 | 3636 |
| 3637 void Element::setInlineStyleProperty(CSSPropertyID propertyID, const CSSValue* v
alue, bool important) | 3637 void Element::setInlineStyleProperty(CSSPropertyID propertyID, const CSSValue* v
alue, bool important) |
| 3638 { | 3638 { |
| 3639 DCHECK(isStyledElement()); | 3639 DCHECK(isStyledElement()); |
| 3640 ensureMutableInlineStyle().setProperty(propertyID, value, important); | 3640 ensureMutableInlineStyle().setProperty(propertyID, *value, important); |
| 3641 inlineStyleChanged(); | 3641 inlineStyleChanged(); |
| 3642 } | 3642 } |
| 3643 | 3643 |
| 3644 bool Element::setInlineStyleProperty(CSSPropertyID propertyID, const String& val
ue, bool important) | 3644 bool Element::setInlineStyleProperty(CSSPropertyID propertyID, const String& val
ue, bool important) |
| 3645 { | 3645 { |
| 3646 DCHECK(isStyledElement()); | 3646 DCHECK(isStyledElement()); |
| 3647 bool changes = ensureMutableInlineStyle().setProperty(propertyID, value, imp
ortant, document().elementSheet().contents()); | 3647 bool changes = ensureMutableInlineStyle().setProperty(propertyID, value, imp
ortant, document().elementSheet().contents()); |
| 3648 if (changes) | 3648 if (changes) |
| 3649 inlineStyleChanged(); | 3649 inlineStyleChanged(); |
| 3650 return changes; | 3650 return changes; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 3675 synchronizeAllAttributes(); | 3675 synchronizeAllAttributes(); |
| 3676 // ShareableElementData doesn't store presentation attribute style, so make
sure we have a UniqueElementData. | 3676 // ShareableElementData doesn't store presentation attribute style, so make
sure we have a UniqueElementData. |
| 3677 UniqueElementData& elementData = ensureUniqueElementData(); | 3677 UniqueElementData& elementData = ensureUniqueElementData(); |
| 3678 elementData.m_presentationAttributeStyleIsDirty = false; | 3678 elementData.m_presentationAttributeStyleIsDirty = false; |
| 3679 elementData.m_presentationAttributeStyle = computePresentationAttributeStyle
(*this); | 3679 elementData.m_presentationAttributeStyle = computePresentationAttributeStyle
(*this); |
| 3680 } | 3680 } |
| 3681 | 3681 |
| 3682 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, CSSValueID identifier) | 3682 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, CSSValueID identifier) |
| 3683 { | 3683 { |
| 3684 DCHECK(isStyledElement()); | 3684 DCHECK(isStyledElement()); |
| 3685 style->setProperty(propertyID, CSSPrimitiveValue::createIdentifier(identifie
r)); | 3685 style->setProperty(propertyID, *CSSPrimitiveValue::createIdentifier(identifi
er)); |
| 3686 } | 3686 } |
| 3687 | 3687 |
| 3688 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, double value, CSSPrimitiveValue::UnitType unit) | 3688 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, double value, CSSPrimitiveValue::UnitType unit) |
| 3689 { | 3689 { |
| 3690 DCHECK(isStyledElement()); | 3690 DCHECK(isStyledElement()); |
| 3691 style->setProperty(propertyID, CSSPrimitiveValue::create(value, unit)); | 3691 style->setProperty(propertyID, *CSSPrimitiveValue::create(value, unit)); |
| 3692 } | 3692 } |
| 3693 | 3693 |
| 3694 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, const String& value) | 3694 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, const String& value) |
| 3695 { | 3695 { |
| 3696 DCHECK(isStyledElement()); | 3696 DCHECK(isStyledElement()); |
| 3697 style->setProperty(propertyID, value, false); | 3697 style->setProperty(propertyID, value, false); |
| 3698 } | 3698 } |
| 3699 | 3699 |
| 3700 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, const CSSValue* value) | 3700 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, const CSSValue* value) |
| 3701 { | 3701 { |
| 3702 DCHECK(isStyledElement()); | 3702 DCHECK(isStyledElement()); |
| 3703 style->setProperty(propertyID, value); | 3703 style->setProperty(propertyID, *value); |
| 3704 } | 3704 } |
| 3705 | 3705 |
| 3706 bool Element::supportsStyleSharing() const | 3706 bool Element::supportsStyleSharing() const |
| 3707 { | 3707 { |
| 3708 if (!isStyledElement() || !parentOrShadowHostElement()) | 3708 if (!isStyledElement() || !parentOrShadowHostElement()) |
| 3709 return false; | 3709 return false; |
| 3710 // If the element has inline style it is probably unique. | 3710 // If the element has inline style it is probably unique. |
| 3711 if (inlineStyle()) | 3711 if (inlineStyle()) |
| 3712 return false; | 3712 return false; |
| 3713 if (isSVGElement() && toSVGElement(this)->animatedSMILStyleProperties()) | 3713 if (isSVGElement() && toSVGElement(this)->animatedSMILStyleProperties()) |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3804 | 3804 |
| 3805 DEFINE_TRACE_WRAPPERS(Element) | 3805 DEFINE_TRACE_WRAPPERS(Element) |
| 3806 { | 3806 { |
| 3807 if (hasRareData()) { | 3807 if (hasRareData()) { |
| 3808 visitor->traceWrappers(elementRareData()); | 3808 visitor->traceWrappers(elementRareData()); |
| 3809 } | 3809 } |
| 3810 ContainerNode::traceWrappers(visitor); | 3810 ContainerNode::traceWrappers(visitor); |
| 3811 } | 3811 } |
| 3812 | 3812 |
| 3813 } // namespace blink | 3813 } // namespace blink |
| OLD | NEW |