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 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 { | 44 { |
45 if (selector.m_match == CSSSelector::Tag | 45 if (selector.m_match == CSSSelector::Tag |
46 || selector.m_match == CSSSelector::Id | 46 || selector.m_match == CSSSelector::Id |
47 || selector.isAttributeSelector()) | 47 || selector.isAttributeSelector()) |
48 return true; | 48 return true; |
49 if (selector.m_match == CSSSelector::PseudoElement) { | 49 if (selector.m_match == CSSSelector::PseudoElement) { |
50 switch (selector.m_pseudoType) { | 50 switch (selector.m_pseudoType) { |
51 case CSSSelector::PseudoBefore: | 51 case CSSSelector::PseudoBefore: |
52 case CSSSelector::PseudoAfter: | 52 case CSSSelector::PseudoAfter: |
53 case CSSSelector::PseudoBackdrop: | 53 case CSSSelector::PseudoBackdrop: |
| 54 case CSSSelector::PseudoShadow: |
54 return true; | 55 return true; |
55 default: | 56 default: |
56 return false; | 57 return false; |
57 } | 58 } |
58 } | 59 } |
59 if (selector.m_match != CSSSelector::PseudoClass) | 60 if (selector.m_match != CSSSelector::PseudoClass) |
60 return false; | 61 return false; |
61 switch (selector.pseudoType()) { | 62 switch (selector.pseudoType()) { |
62 case CSSSelector::PseudoEmpty: | 63 case CSSSelector::PseudoEmpty: |
63 case CSSSelector::PseudoFirstChild: | 64 case CSSSelector::PseudoFirstChild: |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // FIXME: next up: Tag and Id. | 112 // FIXME: next up: Tag and Id. |
112 if (component->m_match == CSSSelector::Class || component->isAttributeSe
lector()) { | 113 if (component->m_match == CSSSelector::Class || component->isAttributeSe
lector()) { |
113 if (!foundDescendantRelation) | 114 if (!foundDescendantRelation) |
114 foundIdent = true; | 115 foundIdent = true; |
115 } else if (!isSkippableComponentForInvalidation(*component)) { | 116 } else if (!isSkippableComponentForInvalidation(*component)) { |
116 return foundDescendantRelation ? UseLocalStyleChange : UseSubtreeSty
leChange; | 117 return foundDescendantRelation ? UseLocalStyleChange : UseSubtreeSty
leChange; |
117 } | 118 } |
118 switch (component->relation()) { | 119 switch (component->relation()) { |
119 case CSSSelector::Descendant: | 120 case CSSSelector::Descendant: |
120 case CSSSelector::Child: | 121 case CSSSelector::Child: |
121 case CSSSelector::Shadow: | 122 case CSSSelector::ShadowPseudo: |
122 case CSSSelector::ShadowDeep: | 123 case CSSSelector::ShadowDeep: |
123 foundDescendantRelation = true; | 124 foundDescendantRelation = true; |
124 // Fall through! | 125 // Fall through! |
125 case CSSSelector::SubSelector: | 126 case CSSSelector::SubSelector: |
126 continue; | 127 continue; |
127 default: | 128 default: |
128 return UseLocalStyleChange; | 129 return UseLocalStyleChange; |
129 } | 130 } |
130 } | 131 } |
131 return foundIdent ? AddFeatures : UseLocalStyleChange; | 132 return foundIdent ? AddFeatures : UseLocalStyleChange; |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 if (node->isElementNode()) | 394 if (node->isElementNode()) |
394 m_pendingInvalidationMap.remove(toElement(node)); | 395 m_pendingInvalidationMap.remove(toElement(node)); |
395 } | 396 } |
396 | 397 |
397 RuleFeatureSet::PendingInvalidationMap& RuleFeatureSet::pendingInvalidationMap() | 398 RuleFeatureSet::PendingInvalidationMap& RuleFeatureSet::pendingInvalidationMap() |
398 { | 399 { |
399 return m_pendingInvalidationMap; | 400 return m_pendingInvalidationMap; |
400 } | 401 } |
401 | 402 |
402 } // namespace WebCore | 403 } // namespace WebCore |
OLD | NEW |