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

Side by Side Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 1276183004: Oilpan: Unship oilpan from temporary animation objects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 667
668 if (state.style()->hasRemUnits()) 668 if (state.style()->hasRemUnits())
669 document().styleEngine().setUsesRemUnit(true); 669 document().styleEngine().setUsesRemUnit(true);
670 670
671 // Now return the style. 671 // Now return the style.
672 return state.takeStyle(); 672 return state.takeStyle();
673 } 673 }
674 674
675 // This function is used by the WebAnimations JavaScript API method animate(). 675 // This function is used by the WebAnimations JavaScript API method animate().
676 // FIXME: Remove this when animate() switches away from resolution-dependent par sing. 676 // FIXME: Remove this when animate() switches away from resolution-dependent par sing.
677 PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnap shot(Element& element, const ComputedStyle* baseStyle, CSSPropertyID property, C SSValue* value) 677 PassRefPtr<AnimatableValue> StyleResolver::createAnimatableValueSnapshot(Element & element, const ComputedStyle* baseStyle, CSSPropertyID property, CSSValue* val ue)
678 { 678 {
679 StyleResolverState state(element.document(), &element); 679 StyleResolverState state(element.document(), &element);
680 state.setStyle(baseStyle ? ComputedStyle::clone(*baseStyle) : ComputedStyle: :create()); 680 state.setStyle(baseStyle ? ComputedStyle::clone(*baseStyle) : ComputedStyle: :create());
681 return createAnimatableValueSnapshot(state, property, value); 681 return createAnimatableValueSnapshot(state, property, value);
682 } 682 }
683 683
684 PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnap shot(StyleResolverState& state, CSSPropertyID property, CSSValue* value) 684 PassRefPtr<AnimatableValue> StyleResolver::createAnimatableValueSnapshot(StyleRe solverState& state, CSSPropertyID property, CSSValue* value)
685 { 685 {
686 if (value) { 686 if (value) {
687 StyleBuilder::applyProperty(property, state, value); 687 StyleBuilder::applyProperty(property, state, value);
688 state.fontBuilder().createFont(state.document().styleEngine().fontSelect or(), state.mutableStyleRef()); 688 state.fontBuilder().createFont(state.document().styleEngine().fontSelect or(), state.mutableStyleRef());
689 } 689 }
690 return CSSAnimatableValueFactory::create(property, *state.style()); 690 return CSSAnimatableValueFactory::create(property, *state.style());
691 } 691 }
692 692
693 PassRefPtrWillBeRawPtr<PseudoElement> StyleResolver::createPseudoElement(Element * parent, PseudoId pseudoId) 693 PassRefPtrWillBeRawPtr<PseudoElement> StyleResolver::createPseudoElement(Element * parent, PseudoId pseudoId)
694 { 694 {
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 resolvers.append(scopedResolver); 1002 resolvers.append(scopedResolver);
1003 1003
1004 for (size_t i = 0; i < resolvers.size(); ++i) { 1004 for (size_t i = 0; i < resolvers.size(); ++i) {
1005 if (StyleRuleKeyframes* keyframesRule = resolvers[i]->keyframeStylesForA nimation(animationName.impl())) 1005 if (StyleRuleKeyframes* keyframesRule = resolvers[i]->keyframeStylesForA nimation(animationName.impl()))
1006 return keyframesRule; 1006 return keyframesRule;
1007 } 1007 }
1008 return nullptr; 1008 return nullptr;
1009 } 1009 }
1010 1010
1011 template <CSSPropertyPriority priority> 1011 template <CSSPropertyPriority priority>
1012 void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Wil lBeHeapHashMap<PropertyHandle, RefPtrWillBeMember<Interpolation>>& activeInterpo lations) 1012 void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Has hMap<PropertyHandle, RefPtr<Interpolation>>& activeInterpolations)
1013 { 1013 {
1014 for (const auto& interpolationEntry : activeInterpolations) { 1014 for (const auto& interpolationEntry : activeInterpolations) {
1015 if (!interpolationEntry.key.isCSSProperty()) 1015 if (!interpolationEntry.key.isCSSProperty())
1016 continue; 1016 continue;
1017 CSSPropertyID property = interpolationEntry.key.cssProperty(); 1017 CSSPropertyID property = interpolationEntry.key.cssProperty();
1018 if (!CSSPropertyPriorityData<priority>::propertyHasPriority(property)) 1018 if (!CSSPropertyPriorityData<priority>::propertyHasPriority(property))
1019 continue; 1019 continue;
1020 const StyleInterpolation* interpolation = toStyleInterpolation(interpola tionEntry.value.get()); 1020 const StyleInterpolation* interpolation = toStyleInterpolation(interpola tionEntry.value.get());
1021 interpolation->apply(state); 1021 interpolation->apply(state);
1022 } 1022 }
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 visitor->trace(m_watchedSelectorsRules); 1537 visitor->trace(m_watchedSelectorsRules);
1538 visitor->trace(m_treeBoundaryCrossingScopes); 1538 visitor->trace(m_treeBoundaryCrossingScopes);
1539 visitor->trace(m_styleResourceLoader); 1539 visitor->trace(m_styleResourceLoader);
1540 visitor->trace(m_styleSharingLists); 1540 visitor->trace(m_styleSharingLists);
1541 visitor->trace(m_pendingStyleSheets); 1541 visitor->trace(m_pendingStyleSheets);
1542 visitor->trace(m_document); 1542 visitor->trace(m_document);
1543 #endif 1543 #endif
1544 } 1544 }
1545 1545
1546 } // namespace blink 1546 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698