| 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 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 |
| 6 * Apple Inc. All rights reserved. | 6 * Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 8 * (http://www.torchmobile.com/) | 8 * (http://www.torchmobile.com/) |
| 9 * Copyright (C) 2014 Samsung Electronics. All rights reserved. | 9 * Copyright (C) 2014 Samsung Electronics. All rights reserved. |
| 10 * | 10 * |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 24 * Boston, MA 02110-1301, USA. | 24 * Boston, MA 02110-1301, USA. |
| 25 * | 25 * |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef ElementTraversal_h | 28 #ifndef ElementTraversal_h |
| 29 #define ElementTraversal_h | 29 #define ElementTraversal_h |
| 30 | 30 |
| 31 #include "core/dom/Element.h" | 31 #include "core/dom/Element.h" |
| 32 #include "core/dom/NodeTraversal.h" | 32 #include "core/dom/NodeTraversal.h" |
| 33 #include "wtf/Allocator.h" | 33 #include "platform/wtf/Allocator.h" |
| 34 | 34 |
| 35 namespace blink { | 35 namespace blink { |
| 36 | 36 |
| 37 class HasTagName { | 37 class HasTagName { |
| 38 STACK_ALLOCATED(); | 38 STACK_ALLOCATED(); |
| 39 | 39 |
| 40 public: | 40 public: |
| 41 explicit HasTagName(const QualifiedName& tag_name) : tag_name_(tag_name) {} | 41 explicit HasTagName(const QualifiedName& tag_name) : tag_name_(tag_name) {} |
| 42 bool operator()(const Element& element) const { | 42 bool operator()(const Element& element) const { |
| 43 return element.HasTagName(tag_name_); | 43 return element.HasTagName(tag_name_); |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 MatchFunc is_match) { | 541 MatchFunc is_match) { |
| 542 ElementType* element = Traversal<ElementType>::NextSibling(current); | 542 ElementType* element = Traversal<ElementType>::NextSibling(current); |
| 543 while (element && !is_match(*element)) | 543 while (element && !is_match(*element)) |
| 544 element = Traversal<ElementType>::NextSibling(*element); | 544 element = Traversal<ElementType>::NextSibling(*element); |
| 545 return element; | 545 return element; |
| 546 } | 546 } |
| 547 | 547 |
| 548 } // namespace blink | 548 } // namespace blink |
| 549 | 549 |
| 550 #endif | 550 #endif |
| OLD | NEW |