Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: third_party/WebKit/Source/core/dom/Element.cpp

Issue 2346193002: Split CSSPrimitiveValue into CSSPrimitiveValue and CSSIdentifierValue (Closed)
Patch Set: Fixed tests Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 3593 matching lines...) Expand 10 before | Expand all | Expand 10 after
3644 oldValue = attribute->value(); 3645 oldValue = attribute->value();
3645 recipients->enqueueMutationRecord(MutationRecord::createAttributes(this, styleAttr, oldValue)); 3646 recipients->enqueueMutationRecord(MutationRecord::createAttributes(this, styleAttr, oldValue));
3646 // Need to synchronize every time so that following MutationRecords will 3647 // Need to synchronize every time so that following MutationRecords will
3647 // have correct oldValues. 3648 // have correct oldValues.
3648 synchronizeAttribute(styleAttr); 3649 synchronizeAttribute(styleAttr);
3649 } 3650 }
3650 } 3651 }
3651 3652
3652 void Element::setInlineStyleProperty(CSSPropertyID propertyID, CSSValueID identi fier, bool important) 3653 void Element::setInlineStyleProperty(CSSPropertyID propertyID, CSSValueID identi fier, bool important)
3653 { 3654 {
3654 setInlineStyleProperty(propertyID, CSSPrimitiveValue::createIdentifier(ident ifier), important); 3655 setInlineStyleProperty(propertyID, CSSIdentifierValue::create(identifier), i mportant);
3655 } 3656 }
3656 3657
3657 void Element::setInlineStyleProperty(CSSPropertyID propertyID, double value, CSS PrimitiveValue::UnitType unit, bool important) 3658 void Element::setInlineStyleProperty(CSSPropertyID propertyID, double value, CSS PrimitiveValue::UnitType unit, bool important)
3658 { 3659 {
3659 setInlineStyleProperty(propertyID, CSSPrimitiveValue::create(value, unit), i mportant); 3660 setInlineStyleProperty(propertyID, CSSPrimitiveValue::create(value, unit), i mportant);
3660 } 3661 }
3661 3662
3662 void Element::setInlineStyleProperty(CSSPropertyID propertyID, const CSSValue* v alue, bool important) 3663 void Element::setInlineStyleProperty(CSSPropertyID propertyID, const CSSValue* v alue, bool important)
3663 { 3664 {
3664 DCHECK(isStyledElement()); 3665 DCHECK(isStyledElement());
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
3700 synchronizeAllAttributes(); 3701 synchronizeAllAttributes();
3701 // ShareableElementData doesn't store presentation attribute style, so make sure we have a UniqueElementData. 3702 // ShareableElementData doesn't store presentation attribute style, so make sure we have a UniqueElementData.
3702 UniqueElementData& elementData = ensureUniqueElementData(); 3703 UniqueElementData& elementData = ensureUniqueElementData();
3703 elementData.m_presentationAttributeStyleIsDirty = false; 3704 elementData.m_presentationAttributeStyleIsDirty = false;
3704 elementData.m_presentationAttributeStyle = computePresentationAttributeStyle (*this); 3705 elementData.m_presentationAttributeStyle = computePresentationAttributeStyle (*this);
3705 } 3706 }
3706 3707
3707 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s tyle, CSSPropertyID propertyID, CSSValueID identifier) 3708 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s tyle, CSSPropertyID propertyID, CSSValueID identifier)
3708 { 3709 {
3709 DCHECK(isStyledElement()); 3710 DCHECK(isStyledElement());
3710 style->setProperty(propertyID, *CSSPrimitiveValue::createIdentifier(identifi er)); 3711 style->setProperty(propertyID, *CSSIdentifierValue::create(identifier));
3711 } 3712 }
3712 3713
3713 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s tyle, CSSPropertyID propertyID, double value, CSSPrimitiveValue::UnitType unit) 3714 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s tyle, CSSPropertyID propertyID, double value, CSSPrimitiveValue::UnitType unit)
3714 { 3715 {
3715 DCHECK(isStyledElement()); 3716 DCHECK(isStyledElement());
3716 style->setProperty(propertyID, *CSSPrimitiveValue::create(value, unit)); 3717 style->setProperty(propertyID, *CSSPrimitiveValue::create(value, unit));
3717 } 3718 }
3718 3719
3719 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s tyle, CSSPropertyID propertyID, const String& value) 3720 void Element::addPropertyToPresentationAttributeStyle(MutableStylePropertySet* s tyle, CSSPropertyID propertyID, const String& value)
3720 { 3721 {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
3829 3830
3830 DEFINE_TRACE_WRAPPERS(Element) 3831 DEFINE_TRACE_WRAPPERS(Element)
3831 { 3832 {
3832 if (hasRareData()) { 3833 if (hasRareData()) {
3833 visitor->traceWrappers(elementRareData()); 3834 visitor->traceWrappers(elementRareData());
3834 } 3835 }
3835 ContainerNode::traceWrappers(visitor); 3836 ContainerNode::traceWrappers(visitor);
3836 } 3837 }
3837 3838
3838 } // namespace blink 3839 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698