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

Side by Side Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 298043007: Support unknown property strings in transition-property (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 6 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) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 list->append(cssValuePool().createIdentifierValue(CSSValueSpan)); 930 list->append(cssValuePool().createIdentifierValue(CSSValueSpan));
931 list->append(cssValuePool().createValue(position.spanPosition(), CSSPrim itiveValue::CSS_NUMBER)); 931 list->append(cssValuePool().createValue(position.spanPosition(), CSSPrim itiveValue::CSS_NUMBER));
932 } else 932 } else
933 list->append(cssValuePool().createValue(position.integerPosition(), CSSP rimitiveValue::CSS_NUMBER)); 933 list->append(cssValuePool().createValue(position.integerPosition(), CSSP rimitiveValue::CSS_NUMBER));
934 934
935 if (!position.namedGridLine().isNull()) 935 if (!position.namedGridLine().isNull())
936 list->append(cssValuePool().createValue(position.namedGridLine(), CSSPri mitiveValue::CSS_STRING)); 936 list->append(cssValuePool().createValue(position.namedGridLine(), CSSPri mitiveValue::CSS_STRING));
937 return list; 937 return list;
938 } 938 }
939 939
940 static PassRefPtrWillBeRawPtr<CSSValue> createTransitionPropertyValue(CSSTransit ionData::TransitionProperty property) 940 static PassRefPtrWillBeRawPtr<CSSValue> createTransitionPropertyValue(const CSST ransitionData::TransitionProperty& property)
941 { 941 {
942 if (property.propertyType == CSSTransitionData::TransitionNone) 942 if (property.propertyType == CSSTransitionData::TransitionNone)
943 return cssValuePool().createIdentifierValue(CSSValueNone); 943 return cssValuePool().createIdentifierValue(CSSValueNone);
944 if (property.propertyType == CSSTransitionData::TransitionAll) 944 if (property.propertyType == CSSTransitionData::TransitionAll)
945 return cssValuePool().createIdentifierValue(CSSValueAll); 945 return cssValuePool().createIdentifierValue(CSSValueAll);
946 if (property.propertyType == CSSTransitionData::TransitionUnknown)
947 return cssValuePool().createValue(property.propertyString, CSSPrimitiveV alue::CSS_STRING);
946 ASSERT(property.propertyType == CSSTransitionData::TransitionSingleProperty) ; 948 ASSERT(property.propertyType == CSSTransitionData::TransitionSingleProperty) ;
947 return cssValuePool().createValue(getPropertyNameString(property.propertyId) , CSSPrimitiveValue::CSS_STRING); 949 return cssValuePool().createValue(getPropertyNameString(property.propertyId) , CSSPrimitiveValue::CSS_STRING);
948 } 950 }
949 951
950 static PassRefPtrWillBeRawPtr<CSSValue> valueForTransitionProperty(const CSSTran sitionData* transitionData) 952 static PassRefPtrWillBeRawPtr<CSSValue> valueForTransitionProperty(const CSSTran sitionData* transitionData)
951 { 953 {
952 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated() ; 954 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated() ;
953 if (transitionData) { 955 if (transitionData) {
954 for (size_t i = 0; i < transitionData->propertyList().size(); ++i) 956 for (size_t i = 0; i < transitionData->propertyList().size(); ++i)
955 list->append(createTransitionPropertyValue(transitionData->propertyL ist()[i])); 957 list->append(createTransitionPropertyValue(transitionData->propertyL ist()[i]));
(...skipping 2104 matching lines...) Expand 10 before | Expand all | Expand 10 after
3060 return list.release(); 3062 return list.release();
3061 } 3063 }
3062 3064
3063 void CSSComputedStyleDeclaration::trace(Visitor* visitor) 3065 void CSSComputedStyleDeclaration::trace(Visitor* visitor)
3064 { 3066 {
3065 visitor->trace(m_node); 3067 visitor->trace(m_node);
3066 CSSStyleDeclaration::trace(visitor); 3068 CSSStyleDeclaration::trace(visitor);
3067 } 3069 }
3068 3070
3069 } // namespace WebCore 3071 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/animation/css/CSSTransitionData.h ('k') | Source/core/css/StylePropertyShorthandCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698