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

Side by Side Diff: Source/core/css/parser/CSSParserValues.cpp

Issue 751023002: Use SubSelector as relation on left-most selector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: SubSelector is not a combinator Created 6 years 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
« no previous file with comments | « Source/core/css/parser/BisonCSSParser-in.cpp ('k') | no next file » | 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) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 end->setRelation(relation); 304 end->setRelation(relation);
305 end->setTagHistory(selector); 305 end->setTagHistory(selector);
306 } 306 }
307 307
308 void CSSParserSelector::prependTagSelector(const QualifiedName& tagQName, bool t agIsForNamespaceRule) 308 void CSSParserSelector::prependTagSelector(const QualifiedName& tagQName, bool t agIsForNamespaceRule)
309 { 309 {
310 OwnPtr<CSSParserSelector> second = adoptPtr(new CSSParserSelector); 310 OwnPtr<CSSParserSelector> second = adoptPtr(new CSSParserSelector);
311 second->m_selector = m_selector.release(); 311 second->m_selector = m_selector.release();
312 second->m_tagHistory = m_tagHistory.release(); 312 second->m_tagHistory = m_tagHistory.release();
313 m_tagHistory = second.release(); 313 m_tagHistory = second.release();
314
315 m_selector = adoptPtr(new CSSSelector(tagQName, tagIsForNamespaceRule)); 314 m_selector = adoptPtr(new CSSSelector(tagQName, tagIsForNamespaceRule));
316 m_selector->setRelation(CSSSelector::SubSelector);
317 } 315 }
318 316
319 bool CSSParserSelector::hasHostPseudoSelector() const 317 bool CSSParserSelector::hasHostPseudoSelector() const
320 { 318 {
321 for (CSSParserSelector* selector = const_cast<CSSParserSelector*>(this); sel ector; selector = selector->tagHistory()) { 319 for (CSSParserSelector* selector = const_cast<CSSParserSelector*>(this); sel ector; selector = selector->tagHistory()) {
322 if (selector->pseudoType() == CSSSelector::PseudoHost || selector->pseud oType() == CSSSelector::PseudoHostContext) 320 if (selector->pseudoType() == CSSSelector::PseudoHost || selector->pseud oType() == CSSSelector::PseudoHostContext)
323 return true; 321 return true;
324 } 322 }
325 return false; 323 return false;
326 } 324 }
327 325
328 } // namespace blink 326 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/parser/BisonCSSParser-in.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698