Add first()/last() to ElementIteratorAdapters
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Sep 2013 20:20:56 +0000 (20:20 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Sep 2013 20:20:56 +0000 (20:20 +0000)
commit7c428f41f1f38199b35cc0c2d7a4bd9512d129ac
tree8183f3d9c56fedb8ec32378bc07edd95eadc4625
parent9cb01c1213feac0a56c28ff51f85d7670064b3d0
Add first()/last() to ElementIteratorAdapters
https://bugs.webkit.org/show_bug.cgi?id=122067

Reviewed by Darin Adler.

Add a convenient way for getting the first and last element if it exists.

Use it in some places.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* dom/Document.cpp:
(WebCore::Document::childrenChanged):
(WebCore::Document::removeTitle):
* dom/ElementChildIterator.h:
(WebCore::::first):
(WebCore::::last):
* dom/ElementDescendantIterator.h:
(WebCore::::first):
(WebCore::::last):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::legend):
* html/HTMLLegendElement.cpp:
(WebCore::HTMLLegendElement::associatedControl):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::finishParsingChildren):
(WebCore::HTMLMediaElement::selectMediaResource):
* svg/SVGElement.cpp:
(WebCore::SVGElement::title):
* svg/SVGFontFaceElement.cpp:
(WebCore::SVGFontFaceElement::rebuildFontFace):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::hasSingleSecurityOrigin):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/css/CSSFontFaceSource.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/ElementChildIterator.h
Source/WebCore/dom/ElementDescendantIterator.h
Source/WebCore/html/HTMLFieldSetElement.cpp
Source/WebCore/html/HTMLLegendElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/svg/SVGElement.cpp
Source/WebCore/svg/SVGFontFaceElement.cpp
Source/WebCore/svg/graphics/SVGImage.cpp