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

Side by Side Diff: Source/core/dom/Element.cpp

Issue 1153873004: Handle ::content and :host-context correctly in SelectorQuery. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test naming. Created 5 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 2764 matching lines...) Expand 10 before | Expand all | Expand 10 after
2775 2775
2776 LayoutObject* Element::pseudoElementLayoutObject(PseudoId pseudoId) const 2776 LayoutObject* Element::pseudoElementLayoutObject(PseudoId pseudoId) const
2777 { 2777 {
2778 if (PseudoElement* element = pseudoElement(pseudoId)) 2778 if (PseudoElement* element = pseudoElement(pseudoId))
2779 return element->layoutObject(); 2779 return element->layoutObject();
2780 return nullptr; 2780 return nullptr;
2781 } 2781 }
2782 2782
2783 bool Element::matches(const String& selectors, ExceptionState& exceptionState) 2783 bool Element::matches(const String& selectors, ExceptionState& exceptionState)
2784 { 2784 {
2785 updateDistribution();
2786 SelectorQuery* selectorQuery = document().selectorQueryCache().add(AtomicStr ing(selectors), document(), exceptionState); 2785 SelectorQuery* selectorQuery = document().selectorQueryCache().add(AtomicStr ing(selectors), document(), exceptionState);
2787 if (!selectorQuery) 2786 if (!selectorQuery)
2788 return false; 2787 return false;
2789 return selectorQuery->matches(*this); 2788 return selectorQuery->matches(*this);
2790 } 2789 }
2791 2790
2792 Element* Element::closest(const String& selectors, ExceptionState& exceptionStat e) 2791 Element* Element::closest(const String& selectors, ExceptionState& exceptionStat e)
2793 { 2792 {
2794 SelectorQuery* selectorQuery = document().selectorQueryCache().add(AtomicStr ing(selectors), document(), exceptionState); 2793 SelectorQuery* selectorQuery = document().selectorQueryCache().add(AtomicStr ing(selectors), document(), exceptionState);
2795 if (!selectorQuery) 2794 if (!selectorQuery)
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 { 3469 {
3471 #if ENABLE(OILPAN) 3470 #if ENABLE(OILPAN)
3472 if (hasRareData()) 3471 if (hasRareData())
3473 visitor->trace(elementRareData()); 3472 visitor->trace(elementRareData());
3474 visitor->trace(m_elementData); 3473 visitor->trace(m_elementData);
3475 #endif 3474 #endif
3476 ContainerNode::trace(visitor); 3475 ContainerNode::trace(visitor);
3477 } 3476 }
3478 3477
3479 } // namespace blink 3478 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698