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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 private: | 88 private: |
89 void DeleteSelectorsIfNeeded() { | 89 void DeleteSelectorsIfNeeded() { |
90 if (selector_array_) | 90 if (selector_array_) |
91 DeleteSelectors(); | 91 DeleteSelectors(); |
92 } | 92 } |
93 void DeleteSelectors(); | 93 void DeleteSelectors(); |
94 | 94 |
95 CSSSelectorList(const CSSSelectorList&) = delete; | 95 CSSSelectorList(const CSSSelectorList&) = delete; |
96 CSSSelectorList& operator=(const CSSSelectorList&) = delete; | 96 CSSSelectorList& operator=(const CSSSelectorList&) = delete; |
97 | 97 |
98 // End of a multipart selector is indicated by m_isLastInTagHistory bit in the | 98 // End of a multipart selector is indicated by is_last_in_tag_history_ bit in |
99 // last item. End of the array is indicated by m_isLastInSelectorList bit in | 99 // the last item. End of the array is indicated by is_last_in_selector_list_ |
100 // the last item. | 100 // bit in the last item. |
101 CSSSelector* selector_array_; | 101 CSSSelector* selector_array_; |
102 }; | 102 }; |
103 | 103 |
104 inline const CSSSelector* CSSSelectorList::Next(const CSSSelector& current) { | 104 inline const CSSSelector* CSSSelectorList::Next(const CSSSelector& current) { |
105 // Skip subparts of compound selectors. | 105 // Skip subparts of compound selectors. |
106 const CSSSelector* last = ¤t; | 106 const CSSSelector* last = ¤t; |
107 while (!last->IsLastInTagHistory()) | 107 while (!last->IsLastInTagHistory()) |
108 last++; | 108 last++; |
109 return last->IsLastInSelectorList() ? 0 : last + 1; | 109 return last->IsLastInSelectorList() ? 0 : last + 1; |
110 } | 110 } |
111 | 111 |
112 } // namespace blink | 112 } // namespace blink |
113 | 113 |
114 #endif // CSSSelectorList_h | 114 #endif // CSSSelectorList_h |
OLD | NEW |