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 26 matching lines...) Expand all Loading... |
37 #include "core/css/invalidation/DescendantInvalidationSet.h" | 37 #include "core/css/invalidation/DescendantInvalidationSet.h" |
38 #include "core/dom/Element.h" | 38 #include "core/dom/Element.h" |
39 #include "core/dom/Node.h" | 39 #include "core/dom/Node.h" |
40 #include "platform/RuntimeEnabledFeatures.h" | 40 #include "platform/RuntimeEnabledFeatures.h" |
41 #include "wtf/BitVector.h" | 41 #include "wtf/BitVector.h" |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
45 static bool isSkippableComponentForInvalidation(const CSSSelector& selector) | 45 static bool isSkippableComponentForInvalidation(const CSSSelector& selector) |
46 { | 46 { |
47 if (selector.match() == CSSSelector::Tag | 47 if (selector.match() == CSSSelector::Tag) { |
48 || selector.match() == CSSSelector::Id | 48 ASSERT(selector.tagQName().localName() == starAtom); |
49 || selector.isAttributeSelector()) | |
50 return true; | 49 return true; |
| 50 } |
51 if (selector.match() == CSSSelector::PseudoElement) { | 51 if (selector.match() == CSSSelector::PseudoElement) { |
52 switch (selector.pseudoType()) { | 52 switch (selector.pseudoType()) { |
53 case CSSSelector::PseudoBefore: | 53 case CSSSelector::PseudoBefore: |
54 case CSSSelector::PseudoAfter: | 54 case CSSSelector::PseudoAfter: |
55 case CSSSelector::PseudoBackdrop: | 55 case CSSSelector::PseudoBackdrop: |
56 case CSSSelector::PseudoShadow: | 56 case CSSSelector::PseudoShadow: |
57 return true; | 57 return true; |
58 default: | 58 default: |
59 return selector.isCustomPseudoElement(); | 59 ASSERT(!selector.isCustomPseudoElement()); |
| 60 return false; |
60 } | 61 } |
61 } | 62 } |
62 if (selector.match() != CSSSelector::PseudoClass) | 63 if (selector.match() != CSSSelector::PseudoClass) |
63 return false; | 64 return false; |
64 switch (selector.pseudoType()) { | 65 switch (selector.pseudoType()) { |
65 case CSSSelector::PseudoEmpty: | 66 case CSSSelector::PseudoEmpty: |
66 case CSSSelector::PseudoFirstChild: | 67 case CSSSelector::PseudoFirstChild: |
67 case CSSSelector::PseudoFirstOfType: | 68 case CSSSelector::PseudoFirstOfType: |
68 case CSSSelector::PseudoLastChild: | 69 case CSSSelector::PseudoLastChild: |
69 case CSSSelector::PseudoLastOfType: | 70 case CSSSelector::PseudoLastOfType: |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 visitor->trace(uncommonAttributeRules); | 524 visitor->trace(uncommonAttributeRules); |
524 visitor->trace(m_classInvalidationSets); | 525 visitor->trace(m_classInvalidationSets); |
525 visitor->trace(m_attributeInvalidationSets); | 526 visitor->trace(m_attributeInvalidationSets); |
526 visitor->trace(m_idInvalidationSets); | 527 visitor->trace(m_idInvalidationSets); |
527 visitor->trace(m_pseudoInvalidationSets); | 528 visitor->trace(m_pseudoInvalidationSets); |
528 visitor->trace(m_styleInvalidator); | 529 visitor->trace(m_styleInvalidator); |
529 #endif | 530 #endif |
530 } | 531 } |
531 | 532 |
532 } // namespace blink | 533 } // namespace blink |
OLD | NEW |