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

Side by Side Diff: Source/core/svg/SVGElement.cpp

Issue 211033002: Add runtime feature and property names for unprefixed CSS Transforms (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/UseCounter.cpp ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org> 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde .org>
3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
4 * Copyright (C) 2008 Apple Inc. All rights reserved. 4 * Copyright (C) 2008 Apple Inc. All rights reserved.
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> 6 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au>
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 Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "wtf/TemporaryChange.h" 51 #include "wtf/TemporaryChange.h"
52 52
53 namespace WebCore { 53 namespace WebCore {
54 54
55 using namespace HTMLNames; 55 using namespace HTMLNames;
56 using namespace SVGNames; 56 using namespace SVGNames;
57 57
58 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName ToIdMap, const QualifiedName& attrName) 58 void mapAttributeToCSSProperty(HashMap<StringImpl*, CSSPropertyID>* propertyName ToIdMap, const QualifiedName& attrName)
59 { 59 {
60 // FIXME: when CSS supports "transform-origin" the special case for transfor m_originAttr can be removed. 60 // FIXME: when CSS supports "transform-origin" the special case for transfor m_originAttr can be removed.
61 // FIXME: It's not clear the above is strictly true, as -webkit-transform-or igin has non-standard behavior.
61 CSSPropertyID propertyId = cssPropertyID(attrName.localName()); 62 CSSPropertyID propertyId = cssPropertyID(attrName.localName());
62 if (!propertyId && attrName == transform_originAttr) 63 if (!propertyId && attrName == transform_originAttr)
63 propertyId = CSSPropertyWebkitTransformOrigin; // cssPropertyID("-webkit -transform-origin") 64 propertyId = CSSPropertyWebkitTransformOrigin; // cssPropertyID("-webkit -transform-origin")
65 if (propertyId == CSSPropertyTransformOrigin) {
66 ASSERT(RuntimeEnabledFeatures::cssTransformsUnprefixedEnabled());
no longer working on chromium 2014/03/26 17:19:24 This line of code consistently crashes the tab on
67 propertyId = CSSPropertyWebkitTransformOrigin;
68 }
64 ASSERT(propertyId > 0); 69 ASSERT(propertyId > 0);
65 propertyNameToIdMap->set(attrName.localName().impl(), propertyId); 70 propertyNameToIdMap->set(attrName.localName().impl(), propertyId);
66 } 71 }
67 72
68 SVGElement::SVGElement(const QualifiedName& tagName, Document& document, Constru ctionType constructionType) 73 SVGElement::SVGElement(const QualifiedName& tagName, Document& document, Constru ctionType constructionType)
69 : Element(tagName, &document, constructionType) 74 : Element(tagName, &document, constructionType)
70 #if !ASSERT_DISABLED 75 #if !ASSERT_DISABLED
71 , m_inRelativeLengthClientsInvalidation(false) 76 , m_inRelativeLengthClientsInvalidation(false)
72 #endif 77 #endif
73 // |m_isContextElement| must be initialized before |m_className|, as SVGAnim atedString tear-off c-tor currently set this to true. 78 // |m_isContextElement| must be initialized before |m_className|, as SVGAnim atedString tear-off c-tor currently set this to true.
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 animatableAttributes.add(SVGNames::zAttr); 1132 animatableAttributes.add(SVGNames::zAttr);
1128 } 1133 }
1129 1134
1130 if (name == classAttr) 1135 if (name == classAttr)
1131 return true; 1136 return true;
1132 1137
1133 return animatableAttributes.contains(name); 1138 return animatableAttributes.contains(name);
1134 } 1139 }
1135 #endif 1140 #endif
1136 } 1141 }
OLDNEW
« no previous file with comments | « Source/core/frame/UseCounter.cpp ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698