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

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

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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) 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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 688
689 loadPendingResources(state); 689 loadPendingResources(state);
690 690
691 didAccess(); 691 didAccess();
692 692
693 return state.takeStyle(); 693 return state.takeStyle();
694 } 694 }
695 695
696 // This function is used by the WebAnimations JavaScript API method animate(). 696 // This function is used by the WebAnimations JavaScript API method animate().
697 // FIXME: Remove this when animate() switches away from resolution-dependent par sing. 697 // FIXME: Remove this when animate() switches away from resolution-dependent par sing.
698 PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnap shot(Element& element, const ComputedStyle* baseStyle, CSSPropertyID property, C SSValue* value) 698 AnimatableValue* StyleResolver::createAnimatableValueSnapshot(Element& element, const ComputedStyle* baseStyle, CSSPropertyID property, CSSValue* value)
699 { 699 {
700 StyleResolverState state(element.document(), &element); 700 StyleResolverState state(element.document(), &element);
701 state.setStyle(baseStyle ? ComputedStyle::clone(*baseStyle) : ComputedStyle: :create()); 701 state.setStyle(baseStyle ? ComputedStyle::clone(*baseStyle) : ComputedStyle: :create());
702 return createAnimatableValueSnapshot(state, property, value); 702 return createAnimatableValueSnapshot(state, property, value);
703 } 703 }
704 704
705 PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnap shot(StyleResolverState& state, CSSPropertyID property, CSSValue* value) 705 AnimatableValue* StyleResolver::createAnimatableValueSnapshot(StyleResolverState & state, CSSPropertyID property, CSSValue* value)
706 { 706 {
707 if (value) { 707 if (value) {
708 StyleBuilder::applyProperty(property, state, value); 708 StyleBuilder::applyProperty(property, state, value);
709 state.fontBuilder().createFont(state.document().styleEngine().fontSelect or(), state.mutableStyleRef()); 709 state.fontBuilder().createFont(state.document().styleEngine().fontSelect or(), state.mutableStyleRef());
710 } 710 }
711 return CSSAnimatableValueFactory::create(property, *state.style()); 711 return CSSAnimatableValueFactory::create(property, *state.style());
712 } 712 }
713 713
714 PassRefPtrWillBeRawPtr<PseudoElement> StyleResolver::createPseudoElement(Element * parent, PseudoId pseudoId) 714 PassRefPtrWillBeRawPtr<PseudoElement> StyleResolver::createPseudoElement(Element * parent, PseudoId pseudoId)
715 { 715 {
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 resolvers.append(scopedResolver); 999 resolvers.append(scopedResolver);
1000 1000
1001 for (size_t i = 0; i < resolvers.size(); ++i) { 1001 for (size_t i = 0; i < resolvers.size(); ++i) {
1002 if (StyleRuleKeyframes* keyframesRule = resolvers[i]->keyframeStylesForA nimation(animationName.impl())) 1002 if (StyleRuleKeyframes* keyframesRule = resolvers[i]->keyframeStylesForA nimation(animationName.impl()))
1003 return keyframesRule; 1003 return keyframesRule;
1004 } 1004 }
1005 return nullptr; 1005 return nullptr;
1006 } 1006 }
1007 1007
1008 template <CSSPropertyPriority priority> 1008 template <CSSPropertyPriority priority>
1009 void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Wil lBeHeapHashMap<PropertyHandle, RefPtrWillBeMember<Interpolation>>& activeInterpo lations) 1009 void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Hea pHashMap<PropertyHandle, Member<Interpolation>>& activeInterpolations)
1010 { 1010 {
1011 for (const auto& interpolationEntry : activeInterpolations) { 1011 for (const auto& interpolationEntry : activeInterpolations) {
1012 if (!interpolationEntry.key.isCSSProperty()) 1012 if (!interpolationEntry.key.isCSSProperty())
1013 continue; 1013 continue;
1014 CSSPropertyID property = interpolationEntry.key.cssProperty(); 1014 CSSPropertyID property = interpolationEntry.key.cssProperty();
1015 if (!CSSPropertyPriorityData<priority>::propertyHasPriority(property)) 1015 if (!CSSPropertyPriorityData<priority>::propertyHasPriority(property))
1016 continue; 1016 continue;
1017 const StyleInterpolation* interpolation = toStyleInterpolation(interpola tionEntry.value.get()); 1017 const StyleInterpolation* interpolation = toStyleInterpolation(interpola tionEntry.value.get());
1018 interpolation->apply(state); 1018 interpolation->apply(state);
1019 } 1019 }
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 visitor->trace(m_watchedSelectorsRules); 1505 visitor->trace(m_watchedSelectorsRules);
1506 visitor->trace(m_treeBoundaryCrossingRules); 1506 visitor->trace(m_treeBoundaryCrossingRules);
1507 visitor->trace(m_styleResourceLoader); 1507 visitor->trace(m_styleResourceLoader);
1508 visitor->trace(m_styleSharingLists); 1508 visitor->trace(m_styleSharingLists);
1509 visitor->trace(m_pendingStyleSheets); 1509 visitor->trace(m_pendingStyleSheets);
1510 visitor->trace(m_document); 1510 visitor->trace(m_document);
1511 #endif 1511 #endif
1512 } 1512 }
1513 1513
1514 } // namespace blink 1514 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698