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

Side by Side Diff: third_party/WebKit/Source/core/animation/StringKeyframe.cpp

Issue 1681553002: Add support for 'href' (w/o XLink NS) for various SVG elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove invalid assert. Created 4 years, 10 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/animation/StringKeyframe.h" 5 #include "core/animation/StringKeyframe.h"
6 6
7 #include "core/StylePropertyShorthand.h" 7 #include "core/StylePropertyShorthand.h"
8 #include "core/XLinkNames.h"
9 #include "core/animation/CSSColorInterpolationType.h" 8 #include "core/animation/CSSColorInterpolationType.h"
10 #include "core/animation/CSSFontWeightInterpolationType.h" 9 #include "core/animation/CSSFontWeightInterpolationType.h"
11 #include "core/animation/CSSImageInterpolationType.h" 10 #include "core/animation/CSSImageInterpolationType.h"
12 #include "core/animation/CSSImageListInterpolationType.h" 11 #include "core/animation/CSSImageListInterpolationType.h"
13 #include "core/animation/CSSLengthInterpolationType.h" 12 #include "core/animation/CSSLengthInterpolationType.h"
14 #include "core/animation/CSSLengthListInterpolationType.h" 13 #include "core/animation/CSSLengthListInterpolationType.h"
15 #include "core/animation/CSSNumberInterpolationType.h" 14 #include "core/animation/CSSNumberInterpolationType.h"
16 #include "core/animation/CSSPaintInterpolationType.h" 15 #include "core/animation/CSSPaintInterpolationType.h"
17 #include "core/animation/CSSPathInterpolationType.h" 16 #include "core/animation/CSSPathInterpolationType.h"
18 #include "core/animation/CSSShadowListInterpolationType.h" 17 #include "core/animation/CSSShadowListInterpolationType.h"
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 applicableTypes->append(adoptPtr(new SVGRectInterpolationType(attrib ute))); 376 applicableTypes->append(adoptPtr(new SVGRectInterpolationType(attrib ute)));
378 } else if (attribute == SVGNames::gradientTransformAttr 377 } else if (attribute == SVGNames::gradientTransformAttr
379 || attribute == SVGNames::patternTransformAttr 378 || attribute == SVGNames::patternTransformAttr
380 || attribute == SVGNames::transformAttr) { 379 || attribute == SVGNames::transformAttr) {
381 applicableTypes->append(adoptPtr(new SVGTransformListInterpolationTy pe(attribute))); 380 applicableTypes->append(adoptPtr(new SVGTransformListInterpolationTy pe(attribute)));
382 } else if (attribute == HTMLNames::classAttr 381 } else if (attribute == HTMLNames::classAttr
383 || attribute == SVGNames::clipPathUnitsAttr 382 || attribute == SVGNames::clipPathUnitsAttr
384 || attribute == SVGNames::edgeModeAttr 383 || attribute == SVGNames::edgeModeAttr
385 || attribute == SVGNames::filterUnitsAttr 384 || attribute == SVGNames::filterUnitsAttr
386 || attribute == SVGNames::gradientUnitsAttr 385 || attribute == SVGNames::gradientUnitsAttr
386 || attribute == SVGNames::hrefAttr
387 || attribute == SVGNames::inAttr 387 || attribute == SVGNames::inAttr
388 || attribute == SVGNames::in2Attr 388 || attribute == SVGNames::in2Attr
389 || attribute == SVGNames::lengthAdjustAttr 389 || attribute == SVGNames::lengthAdjustAttr
390 || attribute == SVGNames::markerUnitsAttr 390 || attribute == SVGNames::markerUnitsAttr
391 || attribute == SVGNames::maskContentUnitsAttr 391 || attribute == SVGNames::maskContentUnitsAttr
392 || attribute == SVGNames::maskUnitsAttr 392 || attribute == SVGNames::maskUnitsAttr
393 || attribute == SVGNames::methodAttr 393 || attribute == SVGNames::methodAttr
394 || attribute == SVGNames::modeAttr 394 || attribute == SVGNames::modeAttr
395 || attribute == SVGNames::operatorAttr 395 || attribute == SVGNames::operatorAttr
396 || attribute == SVGNames::patternContentUnitsAttr 396 || attribute == SVGNames::patternContentUnitsAttr
397 || attribute == SVGNames::patternUnitsAttr 397 || attribute == SVGNames::patternUnitsAttr
398 || attribute == SVGNames::preserveAlphaAttr 398 || attribute == SVGNames::preserveAlphaAttr
399 || attribute == SVGNames::preserveAspectRatioAttr 399 || attribute == SVGNames::preserveAspectRatioAttr
400 || attribute == SVGNames::primitiveUnitsAttr 400 || attribute == SVGNames::primitiveUnitsAttr
401 || attribute == SVGNames::resultAttr 401 || attribute == SVGNames::resultAttr
402 || attribute == SVGNames::spacingAttr 402 || attribute == SVGNames::spacingAttr
403 || attribute == SVGNames::spreadMethodAttr 403 || attribute == SVGNames::spreadMethodAttr
404 || attribute == SVGNames::stitchTilesAttr 404 || attribute == SVGNames::stitchTilesAttr
405 || attribute == SVGNames::targetAttr 405 || attribute == SVGNames::targetAttr
406 || attribute == SVGNames::typeAttr 406 || attribute == SVGNames::typeAttr
407 || attribute == SVGNames::xChannelSelectorAttr 407 || attribute == SVGNames::xChannelSelectorAttr
408 || attribute == SVGNames::yChannelSelectorAttr 408 || attribute == SVGNames::yChannelSelectorAttr) {
409 || attribute == XLinkNames::hrefAttr) {
410 // Use default SVGValueInterpolationType. 409 // Use default SVGValueInterpolationType.
411 } else { 410 } else {
412 fallbackToLegacy = true; 411 fallbackToLegacy = true;
413 } 412 }
414 413
415 if (!fallbackToLegacy) 414 if (!fallbackToLegacy)
416 applicableTypes->append(adoptPtr(new SVGValueInterpolationType(attri bute))); 415 applicableTypes->append(adoptPtr(new SVGValueInterpolationType(attri bute)));
417 } 416 }
418 417
419 auto addResult = applicableTypesMap.add(property, fallbackToLegacy ? nullptr : applicableTypes.release()); 418 auto addResult = applicableTypesMap.add(property, fallbackToLegacy ? nullptr : applicableTypes.release());
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 } 618 }
620 619
621 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation( PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element* , const ComputedStyle*) const 620 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation( PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element* , const ComputedStyle*) const
622 { 621 {
623 const InterpolationTypes* applicableTypes = applicableTypesForProperty(prope rtyHandle); 622 const InterpolationTypes* applicableTypes = applicableTypesForProperty(prope rtyHandle);
624 ASSERT(applicableTypes); 623 ASSERT(applicableTypes);
625 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes, *this, end); 624 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes, *this, end);
626 } 625 }
627 626
628 } // namespace blink 627 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698