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