OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 const CSSSelector* next = this->next(current); | 72 const CSSSelector* next = this->next(current); |
73 if (!next) | 73 if (!next) |
74 return kNotFound; | 74 return kNotFound; |
75 return next - m_selectorArray; | 75 return next - m_selectorArray; |
76 } | 76 } |
77 | 77 |
78 bool selectorsNeedNamespaceResolution(); | 78 bool selectorsNeedNamespaceResolution(); |
79 | 79 |
80 bool selectorNeedsUpdatedDistribution(size_t index) const; | 80 bool selectorNeedsUpdatedDistribution(size_t index) const; |
81 | 81 |
82 // TODO(kochi): "ShadowDistributed" means the selector has ::content pseudo
element. | |
83 // Once ::slotted is introduced, come up with more readable name. | |
84 bool selectorHasShadowDistributed(size_t index) const; | 82 bool selectorHasShadowDistributed(size_t index) const; |
| 83 bool selectorHasShadowSlotted(size_t index) const; |
85 bool selectorUsesDeepCombinatorOrShadowPseudo(size_t index) const; | 84 bool selectorUsesDeepCombinatorOrShadowPseudo(size_t index) const; |
86 | 85 |
87 String selectorsText() const; | 86 String selectorsText() const; |
88 | 87 |
89 private: | 88 private: |
90 unsigned length() const; | 89 unsigned length() const; |
91 | 90 |
92 void deleteSelectorsIfNeeded() | 91 void deleteSelectorsIfNeeded() |
93 { | 92 { |
94 if (m_selectorArray) | 93 if (m_selectorArray) |
(...skipping 14 matching lines...) Expand all Loading... |
109 // Skip subparts of compound selectors. | 108 // Skip subparts of compound selectors. |
110 const CSSSelector* last = ¤t; | 109 const CSSSelector* last = ¤t; |
111 while (!last->isLastInTagHistory()) | 110 while (!last->isLastInTagHistory()) |
112 last++; | 111 last++; |
113 return last->isLastInSelectorList() ? 0 : last + 1; | 112 return last->isLastInSelectorList() ? 0 : last + 1; |
114 } | 113 } |
115 | 114 |
116 } // namespace blink | 115 } // namespace blink |
117 | 116 |
118 #endif // CSSSelectorList_h | 117 #endif // CSSSelectorList_h |
OLD | NEW |