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

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: Rebase Created 5 years, 4 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
« no previous file with comments | « Source/core/css/resolver/StyleResolver.h ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 692
693 if (state.style()->hasRemUnits()) 693 if (state.style()->hasRemUnits())
694 document().styleEngine().setUsesRemUnit(true); 694 document().styleEngine().setUsesRemUnit(true);
695 695
696 // Now return the style. 696 // Now return the style.
697 return state.takeStyle(); 697 return state.takeStyle();
698 } 698 }
699 699
700 // This function is used by the WebAnimations JavaScript API method animate(). 700 // This function is used by the WebAnimations JavaScript API method animate().
701 // FIXME: Remove this when animate() switches away from resolution-dependent par sing. 701 // FIXME: Remove this when animate() switches away from resolution-dependent par sing.
702 PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnap shot(Element& element, const ComputedStyle* baseStyle, CSSPropertyID property, C SSValue* value) 702 AnimatableValue* StyleResolver::createAnimatableValueSnapshot(Element& element, const ComputedStyle* baseStyle, CSSPropertyID property, CSSValue* value)
703 { 703 {
704 StyleResolverState state(element.document(), &element); 704 StyleResolverState state(element.document(), &element);
705 state.setStyle(baseStyle ? ComputedStyle::clone(*baseStyle) : ComputedStyle: :create()); 705 state.setStyle(baseStyle ? ComputedStyle::clone(*baseStyle) : ComputedStyle: :create());
706 return createAnimatableValueSnapshot(state, property, value); 706 return createAnimatableValueSnapshot(state, property, value);
707 } 707 }
708 708
709 PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnap shot(StyleResolverState& state, CSSPropertyID property, CSSValue* value) 709 AnimatableValue* StyleResolver::createAnimatableValueSnapshot(StyleResolverState & state, CSSPropertyID property, CSSValue* value)
710 { 710 {
711 if (value) { 711 if (value) {
712 StyleBuilder::applyProperty(property, state, value); 712 StyleBuilder::applyProperty(property, state, value);
713 state.fontBuilder().createFont(state.document().styleEngine().fontSelect or(), state.mutableStyleRef()); 713 state.fontBuilder().createFont(state.document().styleEngine().fontSelect or(), state.mutableStyleRef());
714 } 714 }
715 return CSSAnimatableValueFactory::create(property, *state.style()); 715 return CSSAnimatableValueFactory::create(property, *state.style());
716 } 716 }
717 717
718 PassRefPtrWillBeRawPtr<PseudoElement> StyleResolver::createPseudoElement(Element * parent, PseudoId pseudoId) 718 PassRefPtrWillBeRawPtr<PseudoElement> StyleResolver::createPseudoElement(Element * parent, PseudoId pseudoId)
719 { 719 {
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 resolvers.append(scopedResolver); 1020 resolvers.append(scopedResolver);
1021 1021
1022 for (size_t i = 0; i < resolvers.size(); ++i) { 1022 for (size_t i = 0; i < resolvers.size(); ++i) {
1023 if (StyleRuleKeyframes* keyframesRule = resolvers[i]->keyframeStylesForA nimation(animationName.impl())) 1023 if (StyleRuleKeyframes* keyframesRule = resolvers[i]->keyframeStylesForA nimation(animationName.impl()))
1024 return keyframesRule; 1024 return keyframesRule;
1025 } 1025 }
1026 return nullptr; 1026 return nullptr;
1027 } 1027 }
1028 1028
1029 template <CSSPropertyPriority priority> 1029 template <CSSPropertyPriority priority>
1030 void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Wil lBeHeapHashMap<PropertyHandle, RefPtrWillBeMember<Interpolation>>& activeInterpo lations) 1030 void StyleResolver::applyAnimatedProperties(StyleResolverState& state, const Hea pHashMap<PropertyHandle, Member<Interpolation>>& activeInterpolations)
1031 { 1031 {
1032 for (const auto& interpolationEntry : activeInterpolations) { 1032 for (const auto& interpolationEntry : activeInterpolations) {
1033 if (!interpolationEntry.key.isCSSProperty()) 1033 if (!interpolationEntry.key.isCSSProperty())
1034 continue; 1034 continue;
1035 CSSPropertyID property = interpolationEntry.key.cssProperty(); 1035 CSSPropertyID property = interpolationEntry.key.cssProperty();
1036 if (!CSSPropertyPriorityData<priority>::propertyHasPriority(property)) 1036 if (!CSSPropertyPriorityData<priority>::propertyHasPriority(property))
1037 continue; 1037 continue;
1038 const StyleInterpolation* interpolation = toStyleInterpolation(interpola tionEntry.value.get()); 1038 const StyleInterpolation* interpolation = toStyleInterpolation(interpola tionEntry.value.get());
1039 interpolation->apply(state); 1039 interpolation->apply(state);
1040 } 1040 }
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 visitor->trace(m_watchedSelectorsRules); 1508 visitor->trace(m_watchedSelectorsRules);
1509 visitor->trace(m_treeBoundaryCrossingScopes); 1509 visitor->trace(m_treeBoundaryCrossingScopes);
1510 visitor->trace(m_styleResourceLoader); 1510 visitor->trace(m_styleResourceLoader);
1511 visitor->trace(m_styleSharingLists); 1511 visitor->trace(m_styleSharingLists);
1512 visitor->trace(m_pendingStyleSheets); 1512 visitor->trace(m_pendingStyleSheets);
1513 visitor->trace(m_document); 1513 visitor->trace(m_document);
1514 #endif 1514 #endif
1515 } 1515 }
1516 1516
1517 } // namespace blink 1517 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleResolver.h ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698