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 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1555 | 1555 |
1556 return; | 1556 return; |
1557 } | 1557 } |
1558 applyInheritedOnly = true; | 1558 applyInheritedOnly = true; |
1559 } | 1559 } |
1560 | 1560 |
1561 // TODO(leviw): We need the proper bit for tracking whether we need to do th
is work. | 1561 // TODO(leviw): We need the proper bit for tracking whether we need to do th
is work. |
1562 applyMatchedProperties<ResolveVariables>(state, matchResult.authorRules(), f
alse, applyInheritedOnly); | 1562 applyMatchedProperties<ResolveVariables>(state, matchResult.authorRules(), f
alse, applyInheritedOnly); |
1563 applyMatchedProperties<ResolveVariables>(state, matchResult.authorRules(), t
rue, applyInheritedOnly); | 1563 applyMatchedProperties<ResolveVariables>(state, matchResult.authorRules(), t
rue, applyInheritedOnly); |
1564 // TODO(leviw): stop recalculating every time | 1564 // TODO(leviw): stop recalculating every time |
1565 CSSVariableResolver::resolveVariableDefinitions(state.style()->variables()); | 1565 CSSVariableResolver::resolveVariableDefinitions(state); |
1566 | 1566 |
1567 if (RuntimeEnabledFeatures::cssApplyAtRulesEnabled()) { | 1567 if (RuntimeEnabledFeatures::cssApplyAtRulesEnabled()) { |
1568 if (cacheCustomPropertiesForApplyAtRules(state, matchResult.authorRules(
))) { | 1568 if (cacheCustomPropertiesForApplyAtRules(state, matchResult.authorRules(
))) { |
1569 applyMatchedProperties<ResolveVariables>(state, matchResult.authorRu
les(), false, applyInheritedOnly); | 1569 applyMatchedProperties<ResolveVariables>(state, matchResult.authorRu
les(), false, applyInheritedOnly); |
1570 applyMatchedProperties<ResolveVariables>(state, matchResult.authorRu
les(), true, applyInheritedOnly); | 1570 applyMatchedProperties<ResolveVariables>(state, matchResult.authorRu
les(), true, applyInheritedOnly); |
1571 CSSVariableResolver::resolveVariableDefinitions(state.style()->varia
bles()); | 1571 CSSVariableResolver::resolveVariableDefinitions(state); |
1572 } | 1572 } |
1573 } | 1573 } |
1574 | 1574 |
1575 // Now we have all of the matched rules in the appropriate order. Walk the r
ules and apply | 1575 // Now we have all of the matched rules in the appropriate order. Walk the r
ules and apply |
1576 // high-priority properties first, i.e., those properties that other propert
ies depend on. | 1576 // high-priority properties first, i.e., those properties that other propert
ies depend on. |
1577 // The order is (1) high-priority not important, (2) high-priority important
, (3) normal not important | 1577 // The order is (1) high-priority not important, (2) high-priority important
, (3) normal not important |
1578 // and (4) normal important. | 1578 // and (4) normal important. |
1579 applyMatchedProperties<HighPropertyPriority>(state, matchResult.allRules(),
false, applyInheritedOnly); | 1579 applyMatchedProperties<HighPropertyPriority>(state, matchResult.allRules(),
false, applyInheritedOnly); |
1580 for (auto range : ImportantAuthorRanges(matchResult)) | 1580 for (auto range : ImportantAuthorRanges(matchResult)) |
1581 applyMatchedProperties<HighPropertyPriority>(state, range, true, applyIn
heritedOnly); | 1581 applyMatchedProperties<HighPropertyPriority>(state, range, true, applyIn
heritedOnly); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1744 visitor->trace(m_siblingRuleSet); | 1744 visitor->trace(m_siblingRuleSet); |
1745 visitor->trace(m_uncommonAttributeRuleSet); | 1745 visitor->trace(m_uncommonAttributeRuleSet); |
1746 visitor->trace(m_watchedSelectorsRules); | 1746 visitor->trace(m_watchedSelectorsRules); |
1747 visitor->trace(m_treeBoundaryCrossingScopes); | 1747 visitor->trace(m_treeBoundaryCrossingScopes); |
1748 visitor->trace(m_styleSharingLists); | 1748 visitor->trace(m_styleSharingLists); |
1749 visitor->trace(m_pendingStyleSheets); | 1749 visitor->trace(m_pendingStyleSheets); |
1750 visitor->trace(m_document); | 1750 visitor->trace(m_document); |
1751 } | 1751 } |
1752 | 1752 |
1753 } // namespace blink | 1753 } // namespace blink |
OLD | NEW |