| 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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 if (state.distributedToInsertionPoint()) { | 686 if (state.distributedToInsertionPoint()) { |
| 687 if (Element* parent = element->parentElement()) { | 687 if (Element* parent = element->parentElement()) { |
| 688 if (ComputedStyle* styleOfShadowHost = parent->mutableComputedStyle()) | 688 if (ComputedStyle* styleOfShadowHost = parent->mutableComputedStyle()) |
| 689 state.style()->setUserModify(styleOfShadowHost->userModify()); | 689 state.style()->setUserModify(styleOfShadowHost->userModify()); |
| 690 } | 690 } |
| 691 } | 691 } |
| 692 | 692 |
| 693 if (element->isLink()) { | 693 if (element->isLink()) { |
| 694 state.style()->setIsLink(true); | 694 state.style()->setIsLink(true); |
| 695 EInsideLink linkState = state.elementLinkState(); | 695 EInsideLink linkState = state.elementLinkState(); |
| 696 if (linkState != NotInsideLink) { | 696 if (linkState != EInsideLink::kNotInsideLink) { |
| 697 bool forceVisited = InspectorInstrumentation::forcePseudoState( | 697 bool forceVisited = InspectorInstrumentation::forcePseudoState( |
| 698 element, CSSSelector::PseudoVisited); | 698 element, CSSSelector::PseudoVisited); |
| 699 if (forceVisited) | 699 if (forceVisited) |
| 700 linkState = InsideVisitedLink; | 700 linkState = EInsideLink::kInsideVisitedLink; |
| 701 } | 701 } |
| 702 state.style()->setInsideLink(linkState); | 702 state.style()->setInsideLink(linkState); |
| 703 } | 703 } |
| 704 | 704 |
| 705 if (!baseComputedStyle) { | 705 if (!baseComputedStyle) { |
| 706 document().styleEngine().ensureUAStyleForElement(*element); | 706 document().styleEngine().ensureUAStyleForElement(*element); |
| 707 | 707 |
| 708 ElementRuleCollector collector(state.elementContext(), m_selectorFilter, | 708 ElementRuleCollector collector(state.elementContext(), m_selectorFilter, |
| 709 state.style()); | 709 state.style()); |
| 710 | 710 |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 state.parentStyle(), wasViewportResized()); | 1107 state.parentStyle(), wasViewportResized()); |
| 1108 CSSAnimations::calculateTransitionUpdate(state.animationUpdate(), | 1108 CSSAnimations::calculateTransitionUpdate(state.animationUpdate(), |
| 1109 animatingElement, *state.style()); | 1109 animatingElement, *state.style()); |
| 1110 | 1110 |
| 1111 CSSAnimations::snapshotCompositorKeyframes( | 1111 CSSAnimations::snapshotCompositorKeyframes( |
| 1112 *element, state.animationUpdate(), *state.style(), state.parentStyle()); | 1112 *element, state.animationUpdate(), *state.style(), state.parentStyle()); |
| 1113 | 1113 |
| 1114 if (state.animationUpdate().isEmpty()) | 1114 if (state.animationUpdate().isEmpty()) |
| 1115 return false; | 1115 return false; |
| 1116 | 1116 |
| 1117 if (state.style()->insideLink() != NotInsideLink) { | 1117 if (state.style()->insideLink() != EInsideLink::kNotInsideLink) { |
| 1118 DCHECK(state.applyPropertyToRegularStyle()); | 1118 DCHECK(state.applyPropertyToRegularStyle()); |
| 1119 state.setApplyPropertyToVisitedLinkStyle(true); | 1119 state.setApplyPropertyToVisitedLinkStyle(true); |
| 1120 } | 1120 } |
| 1121 | 1121 |
| 1122 const ActiveInterpolationsMap& activeInterpolationsMapForAnimations = | 1122 const ActiveInterpolationsMap& activeInterpolationsMapForAnimations = |
| 1123 state.animationUpdate().activeInterpolationsForAnimations(); | 1123 state.animationUpdate().activeInterpolationsForAnimations(); |
| 1124 const ActiveInterpolationsMap& activeInterpolationsMapForTransitions = | 1124 const ActiveInterpolationsMap& activeInterpolationsMapForTransitions = |
| 1125 state.animationUpdate().activeInterpolationsForTransitions(); | 1125 state.animationUpdate().activeInterpolationsForTransitions(); |
| 1126 // TODO(crbug.com/644148): Apply animations on custom properties. | 1126 // TODO(crbug.com/644148): Apply animations on custom properties. |
| 1127 applyAnimatedProperties<HighPropertyPriority>( | 1127 applyAnimatedProperties<HighPropertyPriority>( |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1534 const MatchedPropertiesRange& range, | 1534 const MatchedPropertiesRange& range, |
| 1535 bool isImportant, | 1535 bool isImportant, |
| 1536 bool inheritedOnly, | 1536 bool inheritedOnly, |
| 1537 NeedsApplyPass& needsApplyPass) { | 1537 NeedsApplyPass& needsApplyPass) { |
| 1538 if (range.isEmpty()) | 1538 if (range.isEmpty()) |
| 1539 return; | 1539 return; |
| 1540 | 1540 |
| 1541 if (!shouldUpdateNeedsApplyPass && !needsApplyPass.get(priority, isImportant)) | 1541 if (!shouldUpdateNeedsApplyPass && !needsApplyPass.get(priority, isImportant)) |
| 1542 return; | 1542 return; |
| 1543 | 1543 |
| 1544 if (state.style()->insideLink() != NotInsideLink) { | 1544 if (state.style()->insideLink() != EInsideLink::kNotInsideLink) { |
| 1545 for (const auto& matchedProperties : range) { | 1545 for (const auto& matchedProperties : range) { |
| 1546 unsigned linkMatchType = matchedProperties.m_types.linkMatchType; | 1546 unsigned linkMatchType = matchedProperties.m_types.linkMatchType; |
| 1547 // FIXME: It would be nicer to pass these as arguments but that requires | 1547 // FIXME: It would be nicer to pass these as arguments but that requires |
| 1548 // changes in many places. | 1548 // changes in many places. |
| 1549 state.setApplyPropertyToRegularStyle(linkMatchType & | 1549 state.setApplyPropertyToRegularStyle(linkMatchType & |
| 1550 CSSSelector::MatchLink); | 1550 CSSSelector::MatchLink); |
| 1551 state.setApplyPropertyToVisitedLinkStyle(linkMatchType & | 1551 state.setApplyPropertyToVisitedLinkStyle(linkMatchType & |
| 1552 CSSSelector::MatchVisited); | 1552 CSSSelector::MatchVisited); |
| 1553 | 1553 |
| 1554 applyProperties<priority, shouldUpdateNeedsApplyPass>( | 1554 applyProperties<priority, shouldUpdateNeedsApplyPass>( |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1935 | 1935 |
| 1936 DEFINE_TRACE(StyleResolver) { | 1936 DEFINE_TRACE(StyleResolver) { |
| 1937 visitor->trace(m_matchedPropertiesCache); | 1937 visitor->trace(m_matchedPropertiesCache); |
| 1938 visitor->trace(m_selectorFilter); | 1938 visitor->trace(m_selectorFilter); |
| 1939 visitor->trace(m_styleSharingLists); | 1939 visitor->trace(m_styleSharingLists); |
| 1940 visitor->trace(m_document); | 1940 visitor->trace(m_document); |
| 1941 visitor->trace(m_tracker); | 1941 visitor->trace(m_tracker); |
| 1942 } | 1942 } |
| 1943 | 1943 |
| 1944 } // namespace blink | 1944 } // namespace blink |
| OLD | NEW |