Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: Source/core/html/HTMLContentElement.cpp

Issue 935283002: Rename {Author,UserAgent}ShadowRoot to {Open,Closed}ShadowRoot. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix inspector tests Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLButtonElement.h ('k') | Source/core/html/HTMLDetailsElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLButtonElement.h ('k') | Source/core/html/HTMLDetailsElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698