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

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

Issue 1575363006: Implement matching part of ::slotted() pseudo element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink_slotted_parser
Patch Set: rebase 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) 1999-2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * 1999 Waldo Bastian (bastian@kde.org) 3 * 1999 Waldo Bastian (bastian@kde.org)
4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 void setSelectorList(PassOwnPtr<CSSSelectorList>); 249 void setSelectorList(PassOwnPtr<CSSSelectorList>);
250 250
251 void setNth(int a, int b); 251 void setNth(int a, int b);
252 bool matchNth(int count) const; 252 bool matchNth(int count) const;
253 253
254 bool isAdjacentSelector() const { return m_relation == DirectAdjacent || m_r elation == IndirectAdjacent; } 254 bool isAdjacentSelector() const { return m_relation == DirectAdjacent || m_r elation == IndirectAdjacent; }
255 bool isShadowSelector() const { return m_relation == ShadowPseudo || m_relat ion == ShadowDeep; } 255 bool isShadowSelector() const { return m_relation == ShadowPseudo || m_relat ion == ShadowDeep; }
256 bool isSiblingSelector() const; 256 bool isSiblingSelector() const;
257 bool isAttributeSelector() const { return m_match >= FirstAttributeSelectorM atch; } 257 bool isAttributeSelector() const { return m_match >= FirstAttributeSelectorM atch; }
258 bool isHostPseudoClass() const { return m_pseudoType == PseudoHost || m_pseu doType == PseudoHostContext; } 258 bool isHostPseudoClass() const { return m_pseudoType == PseudoHost || m_pseu doType == PseudoHostContext; }
259 bool isInsertionPointCrossing() const { return m_pseudoType == PseudoHostCon text || m_pseudoType == PseudoContent; } 259 bool isInsertionPointCrossing() const { return m_pseudoType == PseudoHostCon text || m_pseudoType == PseudoContent || m_pseudoType == PseudoSlotted; }
260 260
261 Relation relation() const { return static_cast<Relation>(m_relation); } 261 Relation relation() const { return static_cast<Relation>(m_relation); }
262 void setRelation(Relation relation) 262 void setRelation(Relation relation)
263 { 263 {
264 m_relation = relation; 264 m_relation = relation;
265 ASSERT(static_cast<Relation>(m_relation) == relation); // using a bitfie ld. 265 ASSERT(static_cast<Relation>(m_relation) == relation); // using a bitfie ld.
266 } 266 }
267 267
268 Match match() const { return static_cast<Match>(m_match); } 268 Match match() const { return static_cast<Match>(m_match); }
269 void setMatch(Match match) 269 void setMatch(Match match)
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 if (m_hasRareData) 491 if (m_hasRareData)
492 return m_data.m_rareData->m_serializingValue; 492 return m_data.m_rareData->m_serializingValue;
493 // AtomicString is really just a StringImpl* so the cast below is safe. 493 // AtomicString is really just a StringImpl* so the cast below is safe.
494 // FIXME: Perhaps call sites could be changed to accept StringImpl? 494 // FIXME: Perhaps call sites could be changed to accept StringImpl?
495 return *reinterpret_cast<const AtomicString*>(&m_data.m_value); 495 return *reinterpret_cast<const AtomicString*>(&m_data.m_value);
496 } 496 }
497 497
498 } // namespace blink 498 } // namespace blink
499 499
500 #endif // CSSSelector_h 500 #endif // CSSSelector_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698