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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 return false; | 109 return false; |
110 } | 110 } |
111 | 111 |
112 // This method is somewhat conservative in what it accepts. | 112 // This method is somewhat conservative in what it accepts. |
113 RuleFeatureSet::InvalidationSetMode RuleFeatureSet::supportsClassDescendantInval
idation(const CSSSelector& selector) | 113 RuleFeatureSet::InvalidationSetMode RuleFeatureSet::supportsClassDescendantInval
idation(const CSSSelector& selector) |
114 { | 114 { |
115 bool foundDescendantRelation = false; | 115 bool foundDescendantRelation = false; |
116 bool foundIdent = false; | 116 bool foundIdent = false; |
117 for (const CSSSelector* component = &selector; component; component = compon
ent->tagHistory()) { | 117 for (const CSSSelector* component = &selector; component; component = compon
ent->tagHistory()) { |
118 | 118 |
119 // FIXME: We should allow pseudo elements, but we need to change how the
y hook | |
120 // into recalcStyle by moving them to recalcOwnStyle instead of recalcCh
ildStyle. | |
121 | |
122 // FIXME: next up: Tag and Id. | 119 // FIXME: next up: Tag and Id. |
123 if (component->m_match == CSSSelector::Class) { | 120 if (component->m_match == CSSSelector::Class) { |
124 if (!foundDescendantRelation) | 121 if (!foundDescendantRelation) |
125 foundIdent = true; | 122 foundIdent = true; |
126 } else if (!isSkippableComponentForInvalidation(*component)) { | 123 } else if (!isSkippableComponentForInvalidation(*component)) { |
127 return foundDescendantRelation ? UseLocalStyleChange : UseSubtreeSty
leChange; | 124 return foundDescendantRelation ? UseLocalStyleChange : UseSubtreeSty
leChange; |
128 } | 125 } |
129 // FIXME: We can probably support ShadowAll and ShadowDeep. | 126 // FIXME: We can probably support ShadowAll and ShadowDeep. |
130 switch (component->relation()) { | 127 switch (component->relation()) { |
131 case CSSSelector::Descendant: | 128 case CSSSelector::Descendant: |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 } | 459 } |
463 | 460 |
464 invalidationClasses.remove(oldSize, invalidationClasses.size() - oldSize); | 461 invalidationClasses.remove(oldSize, invalidationClasses.size() - oldSize); |
465 element->clearChildNeedsStyleInvalidation(); | 462 element->clearChildNeedsStyleInvalidation(); |
466 element->clearNeedsStyleInvalidation(); | 463 element->clearNeedsStyleInvalidation(); |
467 | 464 |
468 return thisElementNeedsStyleRecalc; | 465 return thisElementNeedsStyleRecalc; |
469 } | 466 } |
470 | 467 |
471 } // namespace WebCore | 468 } // namespace WebCore |
OLD | NEW |