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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSSelectorList.h

Issue 1523843004: Add support for new CSS ::slotted() pseudo element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase / fix comments for tests (FYI) Created 4 years, 11 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
OLDNEW
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
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
109 // Skip subparts of compound selectors. 108 // Skip subparts of compound selectors.
110 const CSSSelector* last = &current; 109 const CSSSelector* last = &current;
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSelector.cpp ('k') | third_party/WebKit/Source/core/css/CSSSelectorList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698