OLD | NEW |
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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 } | 793 } |
794 | 794 |
795 // This function is used by the WebAnimations JavaScript API method animate(). | 795 // This function is used by the WebAnimations JavaScript API method animate(). |
796 // FIXME: Remove this when animate() switches away from resolution-dependent par
sing. | 796 // FIXME: Remove this when animate() switches away from resolution-dependent par
sing. |
797 PassRefPtrWillBeRawPtr<KeyframeEffectModel> StyleResolver::createKeyframeEffectM
odel(Element& element, const Vector<RefPtr<MutableStylePropertySet> >& propertyS
etVector, KeyframeEffectModel::KeyframeVector& keyframes) | 797 PassRefPtrWillBeRawPtr<KeyframeEffectModel> StyleResolver::createKeyframeEffectM
odel(Element& element, const Vector<RefPtr<MutableStylePropertySet> >& propertyS
etVector, KeyframeEffectModel::KeyframeVector& keyframes) |
798 { | 798 { |
799 ASSERT(propertySetVector.size() == keyframes.size()); | 799 ASSERT(propertySetVector.size() == keyframes.size()); |
800 | 800 |
801 StyleResolverState state(element.document(), &element); | 801 StyleResolverState state(element.document(), &element); |
802 state.setStyle(RenderStyle::create()); | 802 state.setStyle(RenderStyle::create()); |
| 803 state.fontBuilder().initForStyleResolve(state.document(), state.style(), sta
te.useSVGZoomRules()); |
803 | 804 |
804 for (unsigned i = 0; i < propertySetVector.size(); ++i) { | 805 for (unsigned i = 0; i < propertySetVector.size(); ++i) { |
805 for (unsigned j = 0; j < propertySetVector[i]->propertyCount(); ++j) { | 806 for (unsigned j = 0; j < propertySetVector[i]->propertyCount(); ++j) { |
806 CSSPropertyID id = propertySetVector[i]->propertyAt(j).id(); | 807 CSSPropertyID id = propertySetVector[i]->propertyAt(j).id(); |
807 StyleBuilder::applyProperty(id, state, propertySetVector[i]->getProp
ertyCSSValue(id).get()); | 808 StyleBuilder::applyProperty(id, state, propertySetVector[i]->getProp
ertyCSSValue(id).get()); |
808 keyframes[i]->setPropertyValue(id, CSSAnimatableValueFactory::create
(id, *state.style()).get()); | 809 keyframes[i]->setPropertyValue(id, CSSAnimatableValueFactory::create
(id, *state.style()).get()); |
809 } | 810 } |
810 } | 811 } |
811 return KeyframeEffectModel::create(keyframes); | 812 return KeyframeEffectModel::create(keyframes); |
812 } | 813 } |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1408 bool StyleResolver::mediaQueryAffectedByViewportChange() const | 1409 bool StyleResolver::mediaQueryAffectedByViewportChange() const |
1409 { | 1410 { |
1410 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { | 1411 for (unsigned i = 0; i < m_viewportDependentMediaQueryResults.size(); ++i) { |
1411 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio
n) != m_viewportDependentMediaQueryResults[i]->m_result) | 1412 if (m_medium->eval(&m_viewportDependentMediaQueryResults[i]->m_expressio
n) != m_viewportDependentMediaQueryResults[i]->m_result) |
1412 return true; | 1413 return true; |
1413 } | 1414 } |
1414 return false; | 1415 return false; |
1415 } | 1416 } |
1416 | 1417 |
1417 } // namespace WebCore | 1418 } // namespace WebCore |
OLD | NEW |