OLD | NEW |
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 2672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2683 return hasRareData() ? elementRareData()->pseudoElement(pseudoId) : 0; | 2683 return hasRareData() ? elementRareData()->pseudoElement(pseudoId) : 0; |
2684 } | 2684 } |
2685 | 2685 |
2686 RenderObject* Element::pseudoElementRenderer(PseudoId pseudoId) const | 2686 RenderObject* Element::pseudoElementRenderer(PseudoId pseudoId) const |
2687 { | 2687 { |
2688 if (PseudoElement* element = pseudoElement(pseudoId)) | 2688 if (PseudoElement* element = pseudoElement(pseudoId)) |
2689 return element->renderer(); | 2689 return element->renderer(); |
2690 return 0; | 2690 return 0; |
2691 } | 2691 } |
2692 | 2692 |
2693 bool Element::webkitMatchesSelector(const String& selector, ExceptionState& exce
ptionState) | 2693 bool Element::matches(const String& selectors, ExceptionState& exceptionState) |
2694 { | 2694 { |
2695 if (selector.isEmpty()) { | 2695 SelectorQuery* selectorQuery = document().selectorQueryCache().add(selectors
, document(), exceptionState); |
2696 exceptionState.throwUninformativeAndGenericDOMException(SyntaxError); | |
2697 return false; | |
2698 } | |
2699 | |
2700 SelectorQuery* selectorQuery = document().selectorQueryCache().add(selector,
document(), exceptionState); | |
2701 if (!selectorQuery) | 2696 if (!selectorQuery) |
2702 return false; | 2697 return false; |
2703 return selectorQuery->matches(*this); | 2698 return selectorQuery->matches(*this); |
2704 } | 2699 } |
2705 | 2700 |
2706 DOMTokenList* Element::classList() | 2701 DOMTokenList* Element::classList() |
2707 { | 2702 { |
2708 ElementRareData& rareData = ensureElementRareData(); | 2703 ElementRareData& rareData = ensureElementRareData(); |
2709 if (!rareData.classList()) | 2704 if (!rareData.classList()) |
2710 rareData.setClassList(ClassList::create(this)); | 2705 rareData.setClassList(ClassList::create(this)); |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3536 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems | 3531 // Before doing so, we need to resolve issues in HTMLSelectElement::recalcLi
stItems |
3537 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 | 3532 // and RenderMenuList::setText. See also https://bugs.webkit.org/show_bug.cg
i?id=88405 |
3538 if (hasTagName(optionTag) || hasTagName(optgroupTag)) | 3533 if (hasTagName(optionTag) || hasTagName(optgroupTag)) |
3539 return false; | 3534 return false; |
3540 if (FullscreenElementStack::isActiveFullScreenElement(this)) | 3535 if (FullscreenElementStack::isActiveFullScreenElement(this)) |
3541 return false; | 3536 return false; |
3542 return true; | 3537 return true; |
3543 } | 3538 } |
3544 | 3539 |
3545 } // namespace WebCore | 3540 } // namespace WebCore |
OLD | NEW |