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

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: 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) 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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 BitArray<numCSSProperties> listedProperties; 471 BitArray<numCSSProperties> listedProperties;
472 bool anyTransitionHadTransitionAll = false; 472 bool anyTransitionHadTransitionAll = false;
473 const RenderObject* renderer = element->renderer(); 473 const RenderObject* renderer = element->renderer();
474 if (!animationStyleRecalc && style.display() != NONE && renderer && renderer ->style() && transitionData) { 474 if (!animationStyleRecalc && style.display() != NONE && renderer && renderer ->style() && transitionData) {
475 const RenderStyle& oldStyle = *renderer->style(); 475 const RenderStyle& oldStyle = *renderer->style();
476 476
477 for (size_t i = 0; i < transitionData->propertyList().size(); ++i) { 477 for (size_t i = 0; i < transitionData->propertyList().size(); ++i) {
478 const CSSTransitionData::TransitionProperty& transitionProperty = tr ansitionData->propertyList()[i]; 478 const CSSTransitionData::TransitionProperty& transitionProperty = tr ansitionData->propertyList()[i];
479 CSSTransitionData::TransitionPropertyType mode = transitionProperty. propertyType; 479 CSSTransitionData::TransitionPropertyType mode = transitionProperty. propertyType;
480 CSSPropertyID property = transitionProperty.propertyId; 480 CSSPropertyID property = transitionProperty.propertyId;
481 if (mode == CSSTransitionData::TransitionNone) 481 if (mode == CSSTransitionData::TransitionNone || mode == CSSTransiti onData::TransitionUnknown)
482 continue; 482 continue;
483 483
484 bool animateAll = mode == CSSTransitionData::TransitionAll; 484 bool animateAll = mode == CSSTransitionData::TransitionAll;
485 ASSERT(animateAll || mode == CSSTransitionData::TransitionSingleProp erty); 485 ASSERT(animateAll || mode == CSSTransitionData::TransitionSingleProp erty);
486 if (animateAll) 486 if (animateAll)
487 anyTransitionHadTransitionAll = true; 487 anyTransitionHadTransitionAll = true;
488 const StylePropertyShorthand& propertyList = animateAll ? CSSAnimati ons::animatableProperties() : shorthandForProperty(property); 488 const StylePropertyShorthand& propertyList = animateAll ? CSSAnimati ons::animatableProperties() : shorthandForProperty(property);
489 // If not a shorthand we only execute one iteration of this loop, an d refer to the property directly. 489 // If not a shorthand we only execute one iteration of this loop, an d refer to the property directly.
490 for (unsigned j = 0; !j || j < propertyList.length(); ++j) { 490 for (unsigned j = 0; !j || j < propertyList.length(); ++j) {
491 CSSPropertyID id = propertyList.length() ? propertyList.properti es()[j] : property; 491 CSSPropertyID id = propertyList.length() ? propertyList.properti es()[j] : property;
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 void CSSAnimationUpdate::trace(Visitor* visitor) 837 void CSSAnimationUpdate::trace(Visitor* visitor)
838 { 838 {
839 visitor->trace(m_newTransitions); 839 visitor->trace(m_newTransitions);
840 visitor->trace(m_activeInterpolationsForAnimations); 840 visitor->trace(m_activeInterpolationsForAnimations);
841 visitor->trace(m_activeInterpolationsForTransitions); 841 visitor->trace(m_activeInterpolationsForTransitions);
842 visitor->trace(m_newAnimations); 842 visitor->trace(m_newAnimations);
843 visitor->trace(m_cancelledAnimationPlayers); 843 visitor->trace(m_cancelledAnimationPlayers);
844 } 844 }
845 845
846 } // namespace WebCore 846 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/transitions/transitions-parsing-expected.txt ('k') | Source/core/animation/css/CSSTransitionData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698