| OLD | NEW |
| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 if (match == SelectorMatches || match == SelectorFailsCompletely) | 442 if (match == SelectorMatches || match == SelectorFailsCompletely) |
| 443 return match; | 443 return match; |
| 444 if (nextSelectorExceedsScope(nextContext)) | 444 if (nextSelectorExceedsScope(nextContext)) |
| 445 return SelectorFailsCompletely; | 445 return SelectorFailsCompletely; |
| 446 } | 446 } |
| 447 return SelectorFailsCompletely; | 447 return SelectorFailsCompletely; |
| 448 } | 448 } |
| 449 | 449 |
| 450 case CSSSelector::ShadowPiercingDescendant: { | 450 case CSSSelector::ShadowPiercingDescendant: { |
| 451 DCHECK(m_isQuerySelector); | 451 DCHECK(m_isQuerySelector); |
| 452 UseCounter::count(context.element->document(), |
| 453 UseCounter::CSSShadowPiercingDescendantCombinator); |
| 452 // TODO(kochi): parentOrOpenShadowHostElement() is necessary because | 454 // TODO(kochi): parentOrOpenShadowHostElement() is necessary because |
| 453 // SelectorQuery can pass V0 shadow roots. All closed shadow roots are | 455 // SelectorQuery can pass V0 shadow roots. All closed shadow roots are |
| 454 // already filtered out, thus once V0 is removed this logic can use | 456 // already filtered out, thus once V0 is removed this logic can use |
| 455 // parentOrShadowHostElement() instead. | 457 // parentOrShadowHostElement() instead. |
| 456 for (nextContext.element = | 458 for (nextContext.element = |
| 457 parentOrOpenShadowHostElement(*context.element); | 459 parentOrOpenShadowHostElement(*context.element); |
| 458 nextContext.element; | 460 nextContext.element; |
| 459 nextContext.element = | 461 nextContext.element = |
| 460 parentOrOpenShadowHostElement(*nextContext.element)) { | 462 parentOrOpenShadowHostElement(*nextContext.element)) { |
| 461 Match match = matchSelector(nextContext, result); | 463 Match match = matchSelector(nextContext, result); |
| (...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1306 } | 1308 } |
| 1307 | 1309 |
| 1308 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) { | 1310 bool SelectorChecker::matchesFocusPseudoClass(const Element& element) { |
| 1309 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element), | 1311 if (InspectorInstrumentation::forcePseudoState(const_cast<Element*>(&element), |
| 1310 CSSSelector::PseudoFocus)) | 1312 CSSSelector::PseudoFocus)) |
| 1311 return true; | 1313 return true; |
| 1312 return element.isFocused() && isFrameFocused(element); | 1314 return element.isFocused() && isFrameFocused(element); |
| 1313 } | 1315 } |
| 1314 | 1316 |
| 1315 } // namespace blink | 1317 } // namespace blink |
| OLD | NEW |