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

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

Issue 2517043002: Add a UseCounter for '>>>' combinator. (Closed)
Patch Set: Created 4 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 | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | 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) 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 if (match == SelectorMatches || match == SelectorFailsCompletely) 441 if (match == SelectorMatches || match == SelectorFailsCompletely)
442 return match; 442 return match;
443 if (nextSelectorExceedsScope(nextContext)) 443 if (nextSelectorExceedsScope(nextContext))
444 return SelectorFailsCompletely; 444 return SelectorFailsCompletely;
445 } 445 }
446 return SelectorFailsCompletely; 446 return SelectorFailsCompletely;
447 } 447 }
448 448
449 case CSSSelector::ShadowPiercingDescendant: { 449 case CSSSelector::ShadowPiercingDescendant: {
450 DCHECK(m_isQuerySelector); 450 DCHECK(m_isQuerySelector);
451 UseCounter::count(context.element->document(),
452 UseCounter::CSSShadowPiercingDescendantCombinator);
451 // TODO(kochi): parentOrOpenShadowHostElement() is necessary because 453 // TODO(kochi): parentOrOpenShadowHostElement() is necessary because
452 // SelectorQuery can pass V0 shadow roots. All closed shadow roots are 454 // SelectorQuery can pass V0 shadow roots. All closed shadow roots are
453 // already filtered out, thus once V0 is removed this logic can use 455 // already filtered out, thus once V0 is removed this logic can use
454 // parentOrShadowHostElement() instead. 456 // parentOrShadowHostElement() instead.
455 for (nextContext.element = 457 for (nextContext.element =
456 parentOrOpenShadowHostElement(*context.element); 458 parentOrOpenShadowHostElement(*context.element);
457 nextContext.element; 459 nextContext.element;
458 nextContext.element = 460 nextContext.element =
459 parentOrOpenShadowHostElement(*nextContext.element)) { 461 parentOrOpenShadowHostElement(*nextContext.element)) {
460 Match match = matchSelector(nextContext, result); 462 Match match = matchSelector(nextContext, result);
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 } 1307 }
1306 1308
1307 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) { 1309 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) {
1308 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element), 1310 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element),
1309 CSSSelector::PseudoFocus)) 1311 CSSSelector::PseudoFocus))
1310 return true; 1312 return true;
1311 return element.isFocused() && isFrameFocused(element); 1313 return element.isFocused() && isFrameFocused(element);
1312 } 1314 }
1313 1315
1314 } // namespace blink 1316 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698