| 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 2327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2338 resetNeedsShadowTreeWalker(); | 2338 resetNeedsShadowTreeWalker(); |
| 2339 } | 2339 } |
| 2340 | 2340 |
| 2341 RenderObject* Element::pseudoElementRenderer(PseudoId pseudoId) const | 2341 RenderObject* Element::pseudoElementRenderer(PseudoId pseudoId) const |
| 2342 { | 2342 { |
| 2343 if (PseudoElement* element = pseudoElement(pseudoId)) | 2343 if (PseudoElement* element = pseudoElement(pseudoId)) |
| 2344 return element->renderer(); | 2344 return element->renderer(); |
| 2345 return 0; | 2345 return 0; |
| 2346 } | 2346 } |
| 2347 | 2347 |
| 2348 // ElementTraversal API | |
| 2349 Element* Element::firstElementChild() const | |
| 2350 { | |
| 2351 return ElementTraversal::firstWithin(this); | |
| 2352 } | |
| 2353 | |
| 2354 Element* Element::lastElementChild() const | |
| 2355 { | |
| 2356 Node* n = lastChild(); | |
| 2357 while (n && !n->isElementNode()) | |
| 2358 n = n->previousSibling(); | |
| 2359 return toElement(n); | |
| 2360 } | |
| 2361 | |
| 2362 unsigned Element::childElementCount() const | |
| 2363 { | |
| 2364 unsigned count = 0; | |
| 2365 Node* n = firstChild(); | |
| 2366 while (n) { | |
| 2367 count += n->isElementNode(); | |
| 2368 n = n->nextSibling(); | |
| 2369 } | |
| 2370 return count; | |
| 2371 } | |
| 2372 | |
| 2373 bool Element::matchesReadOnlyPseudoClass() const | 2348 bool Element::matchesReadOnlyPseudoClass() const |
| 2374 { | 2349 { |
| 2375 return false; | 2350 return false; |
| 2376 } | 2351 } |
| 2377 | 2352 |
| 2378 bool Element::matchesReadWritePseudoClass() const | 2353 bool Element::matchesReadWritePseudoClass() const |
| 2379 { | 2354 { |
| 2380 return false; | 2355 return false; |
| 2381 } | 2356 } |
| 2382 | 2357 |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3160 return 0; | 3135 return 0; |
| 3161 } | 3136 } |
| 3162 | 3137 |
| 3163 Attribute* UniqueElementData::attributeItem(unsigned index) | 3138 Attribute* UniqueElementData::attributeItem(unsigned index) |
| 3164 { | 3139 { |
| 3165 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); | 3140 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); |
| 3166 return &m_attributeVector.at(index); | 3141 return &m_attributeVector.at(index); |
| 3167 } | 3142 } |
| 3168 | 3143 |
| 3169 } // namespace WebCore | 3144 } // namespace WebCore |
| OLD | NEW |