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

Side by Side Diff: third_party/WebKit/Source/core/css/SelectorChecker.cpp

Issue 2500813003: Parser support for >>> (shadow-piercing descendant) combinator. (Closed)
Patch Set: Address timloh's comments. Created 4 years, 1 month 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 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 context.element->treeScope()) 390 context.element->treeScope())
391 return SelectorFailsCompletely; 391 return SelectorFailsCompletely;
392 392
393 Element* shadowHost = context.element->ownerShadowHost(); 393 Element* shadowHost = context.element->ownerShadowHost();
394 if (!shadowHost) 394 if (!shadowHost)
395 return SelectorFailsCompletely; 395 return SelectorFailsCompletely;
396 nextContext.element = shadowHost; 396 nextContext.element = shadowHost;
397 return matchSelector(nextContext, result); 397 return matchSelector(nextContext, result);
398 } 398 }
399 399
400 case CSSSelector::ShadowPiercingDescendant:
400 case CSSSelector::ShadowDeep: { 401 case CSSSelector::ShadowDeep: {
401 if (!m_isUARule && !m_isQuerySelector) 402 if (!m_isUARule && !m_isQuerySelector)
402 Deprecation::countDeprecation(context.element->document(), 403 Deprecation::countDeprecation(context.element->document(),
403 UseCounter::CSSDeepCombinator); 404 UseCounter::CSSDeepCombinator);
404 if (ShadowRoot* root = context.element->containingShadowRoot()) { 405 if (ShadowRoot* root = context.element->containingShadowRoot()) {
405 if (root->type() == ShadowRootType::UserAgent) 406 if (root->type() == ShadowRootType::UserAgent)
406 return SelectorFailsCompletely; 407 return SelectorFailsCompletely;
407 } 408 }
408 409
409 if (context.selector->relationIsAffectedByPseudoContent()) { 410 if (context.selector->relationIsAffectedByPseudoContent()) {
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 } 1278 }
1278 1279
1279 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) { 1280 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) {
1280 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element), 1281 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element),
1281 CSSSelector::PseudoFocus)) 1282 CSSSelector::PseudoFocus))
1282 return true; 1283 return true;
1283 return element.isFocused() && isFrameFocused(element); 1284 return element.isFocused() && isFrameFocused(element);
1284 } 1285 }
1285 1286
1286 } // namespace blink 1287 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSSelector.cpp ('k') | third_party/WebKit/Source/core/css/SelectorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698