| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 bool HTMLContentElement::validateSelect() const | 91 bool HTMLContentElement::validateSelect() const |
| 92 { | 92 { |
| 93 ASSERT(!m_shouldParseSelect); | 93 ASSERT(!m_shouldParseSelect); |
| 94 | 94 |
| 95 if (m_select.isNull() || m_select.isEmpty()) | 95 if (m_select.isNull() || m_select.isEmpty()) |
| 96 return true; | 96 return true; |
| 97 | 97 |
| 98 if (!m_selectorList.isValid()) | 98 if (!m_selectorList.isValid()) |
| 99 return false; | 99 return false; |
| 100 | 100 |
| 101 bool allowAnyPseudoClasses = RuntimeEnabledFeatures::pseudoClassesInMatching
CriteriaInAuthorShadowTreesEnabled() || (containingShadowRoot() && containingSha
dowRoot()->type() == ShadowRoot::UserAgentShadowRoot); | 101 bool allowAnyPseudoClasses = RuntimeEnabledFeatures::pseudoClassesInMatching
CriteriaInAuthorShadowTreesEnabled() || (containingShadowRoot() && containingSha
dowRoot()->type() == ShadowRoot::ClosedShadowRoot); |
| 102 | 102 |
| 103 for (const CSSSelector* selector = m_selectorList.first(); selector; selecto
r = m_selectorList.next(*selector)) { | 103 for (const CSSSelector* selector = m_selectorList.first(); selector; selecto
r = m_selectorList.next(*selector)) { |
| 104 if (!selector->isCompound()) | 104 if (!selector->isCompound()) |
| 105 return false; | 105 return false; |
| 106 if (allowAnyPseudoClasses) | 106 if (allowAnyPseudoClasses) |
| 107 continue; | 107 continue; |
| 108 for (const CSSSelector* subSelector = selector; subSelector; subSelector
= subSelector->tagHistory()) { | 108 for (const CSSSelector* subSelector = selector; subSelector; subSelector
= subSelector->tagHistory()) { |
| 109 if (includesDisallowedPseudoClass(*subSelector)) | 109 if (includesDisallowedPseudoClass(*subSelector)) |
| 110 return false; | 110 return false; |
| 111 } | 111 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 125 bool HTMLContentElement::matchSelector(const WillBeHeapVector<RawPtrWillBeMember
<Node>, 32>& siblings, int nth) const | 125 bool HTMLContentElement::matchSelector(const WillBeHeapVector<RawPtrWillBeMember
<Node>, 32>& siblings, int nth) const |
| 126 { | 126 { |
| 127 for (const CSSSelector* selector = selectorList().first(); selector; selecto
r = CSSSelectorList::next(*selector)) { | 127 for (const CSSSelector* selector = selectorList().first(); selector; selecto
r = CSSSelectorList::next(*selector)) { |
| 128 if (checkOneSelector(*selector, siblings, nth)) | 128 if (checkOneSelector(*selector, siblings, nth)) |
| 129 return true; | 129 return true; |
| 130 } | 130 } |
| 131 return false; | 131 return false; |
| 132 } | 132 } |
| 133 | 133 |
| 134 } | 134 } |
| OLD | NEW |