Chromium Code Reviews| 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. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. |
| 6 * All rights reserved. | 6 * All rights reserved. |
| 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 605 // presence of custom property animations that don't affect pre-animated | 605 // presence of custom property animations that don't affect pre-animated |
| 606 // computed values. | 606 // computed values. |
| 607 return nullptr; | 607 return nullptr; |
| 608 } | 608 } |
| 609 | 609 |
| 610 return elementAnimations->baseComputedStyle(); | 610 return elementAnimations->baseComputedStyle(); |
| 611 } | 611 } |
| 612 | 612 |
| 613 static void updateBaseComputedStyle(StyleResolverState& state, | 613 static void updateBaseComputedStyle(StyleResolverState& state, |
| 614 Element* animatingElement) { | 614 Element* animatingElement) { |
| 615 if (!animatingElement || state.isAnimatingCustomProperties()) | 615 if (!animatingElement) |
| 616 return; | 616 return; |
| 617 | 617 |
| 618 ElementAnimations* elementAnimations = animatingElement->elementAnimations(); | 618 ElementAnimations* elementAnimations = animatingElement->elementAnimations(); |
| 619 if (elementAnimations) | 619 if (elementAnimations) { |
| 620 elementAnimations->updateBaseComputedStyle(state.style()); | 620 if (state.isAnimatingCustomProperties()) { |
| 621 elementAnimations->clearBaseComputedStyle(); | |
|
suzyh_UTC10 (ex-contributor)
2017/03/17 03:03:13
Sanity-check question: Is it possible instead to n
alancutter (OOO until 2018)
2017/03/17 03:36:50
I did think of that, to not set the baseComputedSt
| |
| 622 } else { | |
| 623 elementAnimations->updateBaseComputedStyle(state.style()); | |
| 624 } | |
| 625 } | |
| 621 } | 626 } |
| 622 | 627 |
| 623 PassRefPtr<ComputedStyle> StyleResolver::styleForElement( | 628 PassRefPtr<ComputedStyle> StyleResolver::styleForElement( |
| 624 Element* element, | 629 Element* element, |
| 625 const ComputedStyle* defaultParent, | 630 const ComputedStyle* defaultParent, |
| 626 const ComputedStyle* defaultLayoutParent, | 631 const ComputedStyle* defaultLayoutParent, |
| 627 StyleSharingBehavior sharingBehavior, | 632 StyleSharingBehavior sharingBehavior, |
| 628 RuleMatchingBehavior matchingBehavior) { | 633 RuleMatchingBehavior matchingBehavior) { |
| 629 DCHECK(document().frame()); | 634 DCHECK(document().frame()); |
| 630 DCHECK(document().settings()); | 635 DCHECK(document().settings()); |
| (...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1946 | 1951 |
| 1947 DEFINE_TRACE(StyleResolver) { | 1952 DEFINE_TRACE(StyleResolver) { |
| 1948 visitor->trace(m_matchedPropertiesCache); | 1953 visitor->trace(m_matchedPropertiesCache); |
| 1949 visitor->trace(m_selectorFilter); | 1954 visitor->trace(m_selectorFilter); |
| 1950 visitor->trace(m_styleSharingLists); | 1955 visitor->trace(m_styleSharingLists); |
| 1951 visitor->trace(m_document); | 1956 visitor->trace(m_document); |
| 1952 visitor->trace(m_tracker); | 1957 visitor->trace(m_tracker); |
| 1953 } | 1958 } |
| 1954 | 1959 |
| 1955 } // namespace blink | 1960 } // namespace blink |
| OLD | NEW |