| 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 20 matching lines...) Expand all Loading... |
| 31 #include "bindings/core/v8/ExceptionState.h" | 31 #include "bindings/core/v8/ExceptionState.h" |
| 32 #include "bindings/core/v8/V8DOMActivityLogger.h" | 32 #include "bindings/core/v8/V8DOMActivityLogger.h" |
| 33 #include "bindings/core/v8/V8DOMWrapper.h" | 33 #include "bindings/core/v8/V8DOMWrapper.h" |
| 34 #include "bindings/core/v8/V8PerContextData.h" | 34 #include "bindings/core/v8/V8PerContextData.h" |
| 35 #include "core/CSSValueKeywords.h" | 35 #include "core/CSSValueKeywords.h" |
| 36 #include "core/SVGNames.h" | 36 #include "core/SVGNames.h" |
| 37 #include "core/XMLNames.h" | 37 #include "core/XMLNames.h" |
| 38 #include "core/animation/AnimationTimeline.h" | 38 #include "core/animation/AnimationTimeline.h" |
| 39 #include "core/animation/CustomCompositorAnimations.h" | 39 #include "core/animation/CustomCompositorAnimations.h" |
| 40 #include "core/animation/css/CSSAnimations.h" | 40 #include "core/animation/css/CSSAnimations.h" |
| 41 #include "core/css/CSSIdentifierValue.h" |
| 41 #include "core/css/CSSImageValue.h" | 42 #include "core/css/CSSImageValue.h" |
| 42 #include "core/css/CSSPrimitiveValue.h" | 43 #include "core/css/CSSPrimitiveValue.h" |
| 43 #include "core/css/CSSStyleSheet.h" | 44 #include "core/css/CSSStyleSheet.h" |
| 44 #include "core/css/PropertySetCSSStyleDeclaration.h" | 45 #include "core/css/PropertySetCSSStyleDeclaration.h" |
| 45 #include "core/css/StylePropertySet.h" | 46 #include "core/css/StylePropertySet.h" |
| 46 #include "core/css/parser/CSSParser.h" | 47 #include "core/css/parser/CSSParser.h" |
| 47 #include "core/css/resolver/SelectorFilterParentScope.h" | 48 #include "core/css/resolver/SelectorFilterParentScope.h" |
| 48 #include "core/css/resolver/StyleResolver.h" | 49 #include "core/css/resolver/StyleResolver.h" |
| 49 #include "core/css/resolver/StyleResolverStats.h" | 50 #include "core/css/resolver/StyleResolverStats.h" |
| 50 #include "core/css/resolver/StyleSharingDepthScope.h" | 51 #include "core/css/resolver/StyleSharingDepthScope.h" |
| (...skipping 3601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3652 oldValue = attribute->value(); | 3653 oldValue = attribute->value(); |
| 3653 recipients->enqueueMutationRecord(MutationRecord::createAttributes(this,
styleAttr, oldValue)); | 3654 recipients->enqueueMutationRecord(MutationRecord::createAttributes(this,
styleAttr, oldValue)); |
| 3654 // Need to synchronize every time so that following MutationRecords will | 3655 // Need to synchronize every time so that following MutationRecords will |
| 3655 // have correct oldValues. | 3656 // have correct oldValues. |
| 3656 synchronizeAttribute(styleAttr); | 3657 synchronizeAttribute(styleAttr); |
| 3657 } | 3658 } |
| 3658 } | 3659 } |
| 3659 | 3660 |
| 3660 void Element::setInlineStyleProperty(CSSPropertyID propertyID, CSSValueID identi
fier, bool important) | 3661 void Element::setInlineStyleProperty(CSSPropertyID propertyID, CSSValueID identi
fier, bool important) |
| 3661 { | 3662 { |
| 3662 setInlineStyleProperty(propertyID, CSSPrimitiveValue::createIdentifier(ident
ifier), important); | 3663 setInlineStyleProperty(propertyID, CSSIdentifierValue::create(identifier), i
mportant); |
| 3663 } | 3664 } |
| 3664 | 3665 |
| 3665 void Element::setInlineStyleProperty(CSSPropertyID propertyID, double value, CSS
PrimitiveValue::UnitType unit, bool important) | 3666 void Element::setInlineStyleProperty(CSSPropertyID propertyID, double value, CSS
PrimitiveValue::UnitType unit, bool important) |
| 3666 { | 3667 { |
| 3667 setInlineStyleProperty(propertyID, CSSPrimitiveValue::create(value, unit), i
mportant); | 3668 setInlineStyleProperty(propertyID, CSSPrimitiveValue::create(value, unit), i
mportant); |
| 3668 } | 3669 } |
| 3669 | 3670 |
| 3670 void Element::setInlineStyleProperty(CSSPropertyID propertyID, const CSSValue* v
alue, bool important) | 3671 void Element::setInlineStyleProperty(CSSPropertyID propertyID, const CSSValue* v
alue, bool important) |
| 3671 { | 3672 { |
| 3672 DCHECK(isStyledElement()); | 3673 DCHECK(isStyledElement()); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3708 synchronizeAllAttributes(); | 3709 synchronizeAllAttributes(); |
| 3709 // ShareableElementData doesn't store presentation attribute style, so make
sure we have a UniqueElementData. | 3710 // ShareableElementData doesn't store presentation attribute style, so make
sure we have a UniqueElementData. |
| 3710 UniqueElementData& elementData = ensureUniqueElementData(); | 3711 UniqueElementData& elementData = ensureUniqueElementData(); |
| 3711 elementData.m_presentationAttributeStyleIsDirty = false; | 3712 elementData.m_presentationAttributeStyleIsDirty = false; |
| 3712 elementData.m_presentationAttributeStyle = computePresentationAttributeStyle
(*this); | 3713 elementData.m_presentationAttributeStyle = computePresentationAttributeStyle
(*this); |
| 3713 } | 3714 } |
| 3714 | 3715 |
| 3715 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, CSSValueID identifier) | 3716 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, CSSValueID identifier) |
| 3716 { | 3717 { |
| 3717 DCHECK(isStyledElement()); | 3718 DCHECK(isStyledElement()); |
| 3718 style->setProperty(propertyID, *CSSPrimitiveValue::createIdentifier(identifi
er)); | 3719 style->setProperty(propertyID, *CSSIdentifierValue::create(identifier)); |
| 3719 } | 3720 } |
| 3720 | 3721 |
| 3721 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, double value, CSSPrimitiveValue::UnitType unit) | 3722 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, double value, CSSPrimitiveValue::UnitType unit) |
| 3722 { | 3723 { |
| 3723 DCHECK(isStyledElement()); | 3724 DCHECK(isStyledElement()); |
| 3724 style->setProperty(propertyID, *CSSPrimitiveValue::create(value, unit)); | 3725 style->setProperty(propertyID, *CSSPrimitiveValue::create(value, unit)); |
| 3725 } | 3726 } |
| 3726 | 3727 |
| 3727 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, const String& value) | 3728 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s
tyle, CSSPropertyID propertyID, const String& value) |
| 3728 { | 3729 { |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3837 | 3838 |
| 3838 DEFINE_TRACE_WRAPPERS(Element) | 3839 DEFINE_TRACE_WRAPPERS(Element) |
| 3839 { | 3840 { |
| 3840 if (hasRareData()) { | 3841 if (hasRareData()) { |
| 3841 visitor->traceWrappers(elementRareData()); | 3842 visitor->traceWrappers(elementRareData()); |
| 3842 } | 3843 } |
| 3843 ContainerNode::traceWrappers(visitor); | 3844 ContainerNode::traceWrappers(visitor); |
| 3844 } | 3845 } |
| 3845 | 3846 |
| 3846 } // namespace blink | 3847 } // namespace blink |
| OLD | NEW |