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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 AtomicString id; | 170 AtomicString id; |
171 AtomicString className; | 171 AtomicString className; |
172 AtomicString customPseudoElementName; | 172 AtomicString customPseudoElementName; |
173 AtomicString tagName; | 173 AtomicString tagName; |
174 | 174 |
175 #ifndef NDEBUG | 175 #ifndef NDEBUG |
176 m_allRules.append(ruleData); | 176 m_allRules.append(ruleData); |
177 #endif | 177 #endif |
178 | 178 |
179 const CSSSelector* it = &component; | 179 const CSSSelector* it = &component; |
180 for (; it->relation() == CSSSelector::SubSelector; it = it->tagHistory()) { | 180 for (; it && it->relation() == CSSSelector::SubSelector; it = it->tagHistory ()) { |
181 extractValuesforSelector(it, id, className, customPseudoElementName, tag Name); | 181 extractValuesforSelector(it, id, className, customPseudoElementName, tag Name); |
182 } | 182 } |
183 extractValuesforSelector(it, id, className, customPseudoElementName, tagName ); | 183 if (it) |
ojan
2014/04/01 21:20:50
This makes me sad. I'm OK with the patch to fix th
chrishtr
2014/04/01 21:27:58
Done.
| |
184 extractValuesforSelector(it, id, className, customPseudoElementName, tag Name); | |
184 | 185 |
185 // Prefer rule sets in order of most likely to apply infrequently. | 186 // Prefer rule sets in order of most likely to apply infrequently. |
186 if (!id.isEmpty()) { | 187 if (!id.isEmpty()) { |
187 addToRuleSet(id, ensurePendingRules()->idRules, ruleData); | 188 addToRuleSet(id, ensurePendingRules()->idRules, ruleData); |
188 return true; | 189 return true; |
189 } | 190 } |
190 if (!className.isEmpty()) { | 191 if (!className.isEmpty()) { |
191 addToRuleSet(className, ensurePendingRules()->classRules, ruleData); | 192 addToRuleSet(className, ensurePendingRules()->classRules, ruleData); |
192 return true; | 193 return true; |
193 } | 194 } |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
406 | 407 |
407 #ifndef NDEBUG | 408 #ifndef NDEBUG |
408 void RuleSet::show() | 409 void RuleSet::show() |
409 { | 410 { |
410 for (WillBeHeapVector<RuleData>::const_iterator it = m_allRules.begin(); it != m_allRules.end(); ++it) | 411 for (WillBeHeapVector<RuleData>::const_iterator it = m_allRules.begin(); it != m_allRules.end(); ++it) |
411 it->selector().show(); | 412 it->selector().show(); |
412 } | 413 } |
413 #endif | 414 #endif |
414 | 415 |
415 } // namespace WebCore | 416 } // namespace WebCore |
OLD | NEW |