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

Side by Side Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 298043007: Support unknown property strings in transition-property (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 BitArray<numCSSProperties> listedProperties; 470 BitArray<numCSSProperties> listedProperties;
471 bool anyTransitionHadTransitionAll = false; 471 bool anyTransitionHadTransitionAll = false;
472 const RenderObject* renderer = element->renderer(); 472 const RenderObject* renderer = element->renderer();
473 if (!animationStyleRecalc && style.display() != NONE && renderer && renderer ->style() && transitionData) { 473 if (!animationStyleRecalc && style.display() != NONE && renderer && renderer ->style() && transitionData) {
474 const RenderStyle& oldStyle = *renderer->style(); 474 const RenderStyle& oldStyle = *renderer->style();
475 475
476 for (size_t i = 0; i < transitionData->propertyList().size(); ++i) { 476 for (size_t i = 0; i < transitionData->propertyList().size(); ++i) {
477 const CSSTransitionData::TransitionProperty& transitionProperty = tr ansitionData->propertyList()[i]; 477 const CSSTransitionData::TransitionProperty& transitionProperty = tr ansitionData->propertyList()[i];
478 CSSTransitionData::TransitionPropertyType mode = transitionProperty. propertyType; 478 CSSTransitionData::TransitionPropertyType mode = transitionProperty. propertyType;
479 CSSPropertyID property = transitionProperty.propertyId; 479 CSSPropertyID property = transitionProperty.propertyId;
480 if (mode == CSSTransitionData::TransitionNone) 480 if (mode == CSSTransitionData::TransitionNone || mode == CSSTransiti onData::TransitionUnknown)
481 continue; 481 continue;
482 482
483 bool animateAll = mode == CSSTransitionData::TransitionAll; 483 bool animateAll = mode == CSSTransitionData::TransitionAll;
484 ASSERT(animateAll || mode == CSSTransitionData::TransitionSingleProp erty); 484 ASSERT(animateAll || mode == CSSTransitionData::TransitionSingleProp erty);
485 if (animateAll) 485 if (animateAll)
486 anyTransitionHadTransitionAll = true; 486 anyTransitionHadTransitionAll = true;
487 const StylePropertyShorthand& propertyList = animateAll ? CSSAnimati ons::animatableProperties() : shorthandForProperty(property); 487 const StylePropertyShorthand& propertyList = animateAll ? CSSAnimati ons::animatableProperties() : shorthandForProperty(property);
488 // If not a shorthand we only execute one iteration of this loop, an d refer to the property directly. 488 // If not a shorthand we only execute one iteration of this loop, an d refer to the property directly.
489 for (unsigned j = 0; !j || j < propertyList.length(); ++j) { 489 for (unsigned j = 0; !j || j < propertyList.length(); ++j) {
490 CSSPropertyID id = propertyList.length() ? propertyList.properti es()[j] : property; 490 CSSPropertyID id = propertyList.length() ? propertyList.properti es()[j] : property;
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 void CSSAnimationUpdate::trace(Visitor* visitor) 836 void CSSAnimationUpdate::trace(Visitor* visitor)
837 { 837 {
838 visitor->trace(m_newTransitions); 838 visitor->trace(m_newTransitions);
839 visitor->trace(m_activeInterpolationsForAnimations); 839 visitor->trace(m_activeInterpolationsForAnimations);
840 visitor->trace(m_activeInterpolationsForTransitions); 840 visitor->trace(m_activeInterpolationsForTransitions);
841 visitor->trace(m_newAnimations); 841 visitor->trace(m_newAnimations);
842 visitor->trace(m_cancelledAnimationPlayers); 842 visitor->trace(m_cancelledAnimationPlayers);
843 } 843 }
844 844
845 } // namespace WebCore 845 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698