<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[165805] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/165805">165805</a></dd>
<dt>Author</dt> <dd>akling@apple.com</dd>
<dt>Date</dt> <dd>2014-03-18 02:42:58 -0700 (Tue, 18 Mar 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Rename ElementDescendantIterator to TypedElementDescendantIterator.
Romper-stubbed by Antti "Latte Lung" Koivisto.
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* dom/ElementDescendantIterator.h: Removed.
* dom/ElementIterator.h:
* dom/TypedElementDescendantIterator.h: Added.
(WebCore::TypedElementDescendantIterator<ElementType>::TypedElementDescendantIterator):
(WebCore::TypedElementDescendantIterator<ElementType>::operator):
(WebCore::TypedElementDescendantConstIterator<ElementType>::TypedElementDescendantConstIterator):
(WebCore::TypedElementDescendantConstIterator<ElementType>::operator):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::TypedElementDescendantIteratorAdapter):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::begin):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::end):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::beginAt):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::first):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::last):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::TypedElementDescendantConstIteratorAdapter):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::begin):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::end):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::beginAt):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::first):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::last):
(WebCore::descendantsOfType):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreGNUmakefilelistam">trunk/Source/WebCore/GNUmakefile.list.am</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoredomElementIteratorh">trunk/Source/WebCore/dom/ElementIterator.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoredomTypedElementDescendantIteratorh">trunk/Source/WebCore/dom/TypedElementDescendantIterator.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoredomElementDescendantIteratorh">trunk/Source/WebCore/dom/ElementDescendantIterator.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165804 => 165805)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-18 08:51:55 UTC (rev 165804)
+++ trunk/Source/WebCore/ChangeLog        2014-03-18 09:42:58 UTC (rev 165805)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2014-03-18 Andreas Kling <akling@apple.com>
+
+ Rename ElementDescendantIterator to TypedElementDescendantIterator.
+ Romper-stubbed by Antti "Latte Lung" Koivisto.
+
+ * GNUmakefile.list.am:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/ElementDescendantIterator.h: Removed.
+ * dom/ElementIterator.h:
+ * dom/TypedElementDescendantIterator.h: Added.
+ (WebCore::TypedElementDescendantIterator<ElementType>::TypedElementDescendantIterator):
+ (WebCore::TypedElementDescendantIterator<ElementType>::operator):
+ (WebCore::TypedElementDescendantConstIterator<ElementType>::TypedElementDescendantConstIterator):
+ (WebCore::TypedElementDescendantConstIterator<ElementType>::operator):
+ (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::TypedElementDescendantIteratorAdapter):
+ (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::begin):
+ (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::end):
+ (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::beginAt):
+ (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
+ (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::first):
+ (WebCore::TypedElementDescendantIteratorAdapter<ElementType>::last):
+ (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::TypedElementDescendantConstIteratorAdapter):
+ (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::begin):
+ (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::end):
+ (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::beginAt):
+ (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):
+ (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::first):
+ (WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::last):
+ (WebCore::descendantsOfType):
+
</ins><span class="cx"> 2014-03-18 Ion Rosca <rosca@adobe.com>
</span><span class="cx">
</span><span class="cx"> Add blend mode property to dumped information in GraphicsLayer.
</span></span></pre></div>
<a id="trunkSourceWebCoreGNUmakefilelistam"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/GNUmakefile.list.am (165804 => 165805)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/GNUmakefile.list.am        2014-03-18 08:51:55 UTC (rev 165804)
+++ trunk/Source/WebCore/GNUmakefile.list.am        2014-03-18 09:42:58 UTC (rev 165805)
</span><span class="lines">@@ -2848,7 +2848,6 @@
</span><span class="cx">         Source/WebCore/dom/ElementChildIterator.h \
</span><span class="cx">         Source/WebCore/dom/ElementData.cpp \
</span><span class="cx">         Source/WebCore/dom/ElementData.h \
</span><del>-        Source/WebCore/dom/ElementDescendantIterator.h \
</del><span class="cx">         Source/WebCore/dom/ElementIterator.h \
</span><span class="cx">         Source/WebCore/dom/ElementIteratorAssertions.h \
</span><span class="cx">         Source/WebCore/dom/ElementRareData.cpp \
</span><span class="lines">@@ -3037,6 +3036,7 @@
</span><span class="cx">         Source/WebCore/dom/TreeScopeAdopter.h \
</span><span class="cx">         Source/WebCore/dom/TreeWalker.cpp \
</span><span class="cx">         Source/WebCore/dom/TreeWalker.h \
</span><ins>+        Source/WebCore/dom/TypedElementDescendantIterator.h \
</ins><span class="cx">         Source/WebCore/dom/UIEvent.cpp \
</span><span class="cx">         Source/WebCore/dom/UIEvent.h \
</span><span class="cx">         Source/WebCore/dom/UIEventWithKeyState.cpp \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (165804 => 165805)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-03-18 08:51:55 UTC (rev 165804)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-03-18 09:42:58 UTC (rev 165805)
</span><span class="lines">@@ -20021,7 +20021,7 @@
</span><span class="cx"> <ClInclude Include="..\dom\ElementAncestorIterator.h" />
</span><span class="cx"> <ClInclude Include="..\dom\ElementChildIterator.h" />
</span><span class="cx"> <ClInclude Include="..\dom\ElementData.h" />
</span><del>- <ClInclude Include="..\dom\ElementDescendantIterator.h" />
</del><ins>+ <ClInclude Include="..\dom\TypedElementDescendantIterator.h" />
</ins><span class="cx"> <ClInclude Include="..\dom\ElementIterator.h" />
</span><span class="cx"> <ClInclude Include="..\dom\ElementIteratorAssertions.h" />
</span><span class="cx"> <ClInclude Include="..\dom\ElementTraversal.h" />
</span><span class="lines">@@ -20885,4 +20885,4 @@
</span><span class="cx"> <ImportGroup Label="ExtensionTargets">
</span><span class="cx"> <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</span><span class="cx"> </ImportGroup>
</span><del>-</Project>
</del><span class="cx">\ No newline at end of file
</span><ins>+</Project>
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (165804 => 165805)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-03-18 08:51:55 UTC (rev 165804)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2014-03-18 09:42:58 UTC (rev 165805)
</span><span class="lines">@@ -14493,7 +14493,7 @@
</span><span class="cx"> <ClInclude Include="..\dom\ElementData.h">
</span><span class="cx"> <Filter>dom</Filter>
</span><span class="cx"> </ClInclude>
</span><del>- <ClInclude Include="..\dom\ElementDescendantIterator.h">
</del><ins>+ <ClInclude Include="..\dom\TypedElementDescendantIterator.h">
</ins><span class="cx"> <Filter>dom</Filter>
</span><span class="cx"> </ClInclude>
</span><span class="cx"> <ClInclude Include="..\dom\ElementIterator.h">
</span><span class="lines">@@ -15014,4 +15014,4 @@
</span><span class="cx"> <Filter>platform\win</Filter>
</span><span class="cx"> </MASM>
</span><span class="cx"> </ItemGroup>
</span><del>-</Project>
</del><span class="cx">\ No newline at end of file
</span><ins>+</Project>
</ins></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (165804 => 165805)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-03-18 08:51:55 UTC (rev 165804)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-03-18 09:42:58 UTC (rev 165805)
</span><span class="lines">@@ -6006,7 +6006,7 @@
</span><span class="cx">                 E453904D0EAFD637003695C8 /* WidgetIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = E453903C0EAFD637003695C8 /* WidgetIOS.mm */; };
</span><span class="cx">                 E45390AE0EAFF4B5003695C8 /* SystemMemoryIOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E45390AD0EAFF4B5003695C8 /* SystemMemoryIOS.cpp */; };
</span><span class="cx">                 E462A4A1113E71BE004A4220 /* IntPointHash.h in Headers */ = {isa = PBXBuildFile; fileRef = E462A4A0113E71BE004A4220 /* IntPointHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                E46A2B1C17CA65B9000DBCD8 /* ElementDescendantIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = E46A2B1B17CA65B9000DBCD8 /* ElementDescendantIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                E46A2B1C17CA65B9000DBCD8 /* TypedElementDescendantIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = E46A2B1B17CA65B9000DBCD8 /* TypedElementDescendantIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 E46A2B1E17CA76B1000DBCD8 /* ElementChildIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = E46A2B1D17CA76B1000DBCD8 /* ElementChildIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 E47127CA163438A100ED6F5A /* StyleInvalidationAnalysis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E47A97CE163059FC005DCD99 /* StyleInvalidationAnalysis.cpp */; };
</span><span class="cx">                 E47127CB163438AE00ED6F5A /* StyleInvalidationAnalysis.h in Headers */ = {isa = PBXBuildFile; fileRef = E47A97CF163059FC005DCD99 /* StyleInvalidationAnalysis.h */; };
</span><span class="lines">@@ -13357,7 +13357,7 @@
</span><span class="cx">                 E453903C0EAFD637003695C8 /* WidgetIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WidgetIOS.mm; path = ios/WidgetIOS.mm; sourceTree = "<group>"; };
</span><span class="cx">                 E45390AD0EAFF4B5003695C8 /* SystemMemoryIOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemMemoryIOS.cpp; path = ios/SystemMemoryIOS.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 E462A4A0113E71BE004A4220 /* IntPointHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntPointHash.h; sourceTree = "<group>"; };
</span><del>-                E46A2B1B17CA65B9000DBCD8 /* ElementDescendantIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ElementDescendantIterator.h; sourceTree = "<group>"; };
</del><ins>+                E46A2B1B17CA65B9000DBCD8 /* TypedElementDescendantIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypedElementDescendantIterator.h; sourceTree = "<group>"; };
</ins><span class="cx">                 E46A2B1D17CA76B1000DBCD8 /* ElementChildIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ElementChildIterator.h; sourceTree = "<group>"; };
</span><span class="cx">                 E4778B7D115A581A00B5D372 /* JSCustomEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomEvent.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 E4778B7E115A581A00B5D372 /* JSCustomEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCustomEvent.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -22122,7 +22122,7 @@
</span><span class="cx">                                 E46A2B1D17CA76B1000DBCD8 /* ElementChildIterator.h */,
</span><span class="cx">                                 B5B7A16F17C1080600E4AA0A /* ElementData.cpp */,
</span><span class="cx">                                 B5B7A16E17C1048000E4AA0A /* ElementData.h */,
</span><del>-                                E46A2B1B17CA65B9000DBCD8 /* ElementDescendantIterator.h */,
</del><ins>+                                E46A2B1B17CA65B9000DBCD8 /* TypedElementDescendantIterator.h */,
</ins><span class="cx">                                 E4AE7C1517D1BB950009FB31 /* ElementIterator.h */,
</span><span class="cx">                                 E401C27417CE53EC00C41A35 /* ElementIteratorAssertions.h */,
</span><span class="cx">                                 4FAB48641643A66D00F70C07 /* ElementRareData.cpp */,
</span><span class="lines">@@ -23640,7 +23640,7 @@
</span><span class="cx">                                 E4AE7C1A17D232350009FB31 /* ElementAncestorIterator.h in Headers */,
</span><span class="cx">                                 E46A2B1E17CA76B1000DBCD8 /* ElementChildIterator.h in Headers */,
</span><span class="cx">                                 B5B7A17117C10AC000E4AA0A /* ElementData.h in Headers */,
</span><del>-                                E46A2B1C17CA65B9000DBCD8 /* ElementDescendantIterator.h in Headers */,
</del><ins>+                                E46A2B1C17CA65B9000DBCD8 /* TypedElementDescendantIterator.h in Headers */,
</ins><span class="cx">                                 E4AE7C1617D1BB950009FB31 /* ElementIterator.h in Headers */,
</span><span class="cx">                                 E401C27517CE53EC00C41A35 /* ElementIteratorAssertions.h in Headers */,
</span><span class="cx">                                 63F5D4F70E8C4B7100C0BD04 /* ElementRareData.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementDescendantIteratorh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/dom/ElementDescendantIterator.h (165804 => 165805)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ElementDescendantIterator.h        2014-03-18 08:51:55 UTC (rev 165804)
+++ trunk/Source/WebCore/dom/ElementDescendantIterator.h        2014-03-18 09:42:58 UTC (rev 165805)
</span><span class="lines">@@ -1,239 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ElementDescendantIterator_h
-#define ElementDescendantIterator_h
-
-#include "ElementIterator.h"
-
-namespace WebCore {
-
-template <typename ElementType>
-class ElementDescendantIterator : public ElementIterator<ElementType> {
-public:
- ElementDescendantIterator(const ContainerNode& root);
- ElementDescendantIterator(const ContainerNode& root, ElementType* current);
- ElementDescendantIterator& operator++();
-};
-
-template <typename ElementType>
-class ElementDescendantConstIterator : public ElementConstIterator<ElementType> {
-public:
- ElementDescendantConstIterator(const ContainerNode& root);
- ElementDescendantConstIterator(const ContainerNode& root, const ElementType* current);
- ElementDescendantConstIterator& operator++();
-};
-
-template <typename ElementType>
-class ElementDescendantIteratorAdapter {
-public:
- ElementDescendantIteratorAdapter(ContainerNode& root);
- ElementDescendantIterator<ElementType> begin();
- ElementDescendantIterator<ElementType> end();
- ElementDescendantIterator<ElementType> beginAt(ElementType&);
- ElementDescendantIterator<ElementType> from(Element&);
-
- ElementType* first();
- ElementType* last();
-
-private:
- ContainerNode& m_root;
-};
-
-template <typename ElementType>
-class ElementDescendantConstIteratorAdapter {
-public:
- ElementDescendantConstIteratorAdapter(const ContainerNode& root);
- ElementDescendantConstIterator<ElementType> begin() const;
- ElementDescendantConstIterator<ElementType> end() const;
- ElementDescendantConstIterator<ElementType> beginAt(const ElementType&) const;
- ElementDescendantConstIterator<ElementType> from(const Element&) const;
-
- const ElementType* first() const;
- const ElementType* last() const;
-
-private:
- const ContainerNode& m_root;
-};
-
-template <typename ElementType> ElementDescendantIteratorAdapter<ElementType> descendantsOfType(ContainerNode&);
-template <typename ElementType> ElementDescendantConstIteratorAdapter<ElementType> descendantsOfType(const ContainerNode&);
-
-// ElementDescendantIterator
-
-template <typename ElementType>
-inline ElementDescendantIterator<ElementType>::ElementDescendantIterator(const ContainerNode& root)
- : ElementIterator<ElementType>(&root)
-{
-}
-
-template <typename ElementType>
-inline ElementDescendantIterator<ElementType>::ElementDescendantIterator(const ContainerNode& root, ElementType* current)
- : ElementIterator<ElementType>(&root, current)
-{
-}
-
-template <typename ElementType>
-inline ElementDescendantIterator<ElementType>& ElementDescendantIterator<ElementType>::operator++()
-{
- return static_cast<ElementDescendantIterator<ElementType>&>(ElementIterator<ElementType>::traverseNext());
-}
-
-// ElementDescendantConstIterator
-
-template <typename ElementType>
-inline ElementDescendantConstIterator<ElementType>::ElementDescendantConstIterator(const ContainerNode& root)
- : ElementConstIterator<ElementType>(&root)
-
-{
-}
-
-template <typename ElementType>
-inline ElementDescendantConstIterator<ElementType>::ElementDescendantConstIterator(const ContainerNode& root, const ElementType* current)
- : ElementConstIterator<ElementType>(&root, current)
-{
-}
-
-template <typename ElementType>
-inline ElementDescendantConstIterator<ElementType>& ElementDescendantConstIterator<ElementType>::operator++()
-{
- return static_cast<ElementDescendantConstIterator<ElementType>&>(ElementConstIterator<ElementType>::traverseNext());
-}
-
-// ElementDescendantIteratorAdapter
-
-template <typename ElementType>
-inline ElementDescendantIteratorAdapter<ElementType>::ElementDescendantIteratorAdapter(ContainerNode& root)
- : m_root(root)
-{
-}
-
-template <typename ElementType>
-inline ElementDescendantIterator<ElementType> ElementDescendantIteratorAdapter<ElementType>::begin()
-{
- return ElementDescendantIterator<ElementType>(m_root, Traversal<ElementType>::firstWithin(&m_root));
-}
-
-template <typename ElementType>
-inline ElementDescendantIterator<ElementType> ElementDescendantIteratorAdapter<ElementType>::end()
-{
- return ElementDescendantIterator<ElementType>(m_root);
-}
-
-template <typename ElementType>
-inline ElementDescendantIterator<ElementType> ElementDescendantIteratorAdapter<ElementType>::beginAt(ElementType& descendant)
-{
- ASSERT(descendant.isDescendantOf(&m_root));
- return ElementDescendantIterator<ElementType>(m_root, &descendant);
-}
-
-template <typename ElementType>
-inline ElementDescendantIterator<ElementType> ElementDescendantIteratorAdapter<ElementType>::from(Element& descendant)
-{
- ASSERT(descendant.isDescendantOf(&m_root));
- if (isElementOfType<const ElementType>(descendant))
- return ElementDescendantIterator<ElementType>(m_root, static_cast<ElementType*>(&descendant));
- ElementType* next = Traversal<ElementType>::next(&m_root, &descendant);
- return ElementDescendantIterator<ElementType>(m_root, next);
-}
-
-template <typename ElementType>
-inline ElementType* ElementDescendantIteratorAdapter<ElementType>::first()
-{
- return Traversal<ElementType>::firstWithin(&m_root);
-}
-
-template <typename ElementType>
-inline ElementType* ElementDescendantIteratorAdapter<ElementType>::last()
-{
- return Traversal<ElementType>::lastWithin(&m_root);
-}
-
-// ElementDescendantConstIteratorAdapter
-
-template <typename ElementType>
-inline ElementDescendantConstIteratorAdapter<ElementType>::ElementDescendantConstIteratorAdapter(const ContainerNode& root)
- : m_root(root)
-{
-}
-
-template <typename ElementType>
-inline ElementDescendantConstIterator<ElementType> ElementDescendantConstIteratorAdapter<ElementType>::begin() const
-{
- return ElementDescendantConstIterator<ElementType>(m_root, Traversal<ElementType>::firstWithin(&m_root));
-}
-
-template <typename ElementType>
-inline ElementDescendantConstIterator<ElementType> ElementDescendantConstIteratorAdapter<ElementType>::end() const
-{
- return ElementDescendantConstIterator<ElementType>(m_root);
-}
-
-template <typename ElementType>
-inline ElementDescendantConstIterator<ElementType> ElementDescendantConstIteratorAdapter<ElementType>::beginAt(const ElementType& descendant) const
-{
- ASSERT(descendant.isDescendantOf(&m_root));
- return ElementDescendantConstIterator<ElementType>(m_root, &descendant);
-}
-
-template <typename ElementType>
-inline ElementDescendantConstIterator<ElementType> ElementDescendantConstIteratorAdapter<ElementType>::from(const Element& descendant) const
-{
- ASSERT(descendant.isDescendantOf(&m_root));
- if (isElementOfType<const ElementType>(descendant))
- return ElementDescendantConstIterator<ElementType>(m_root, static_cast<const ElementType*>(&descendant));
- const ElementType* next = Traversal<ElementType>::next(&m_root, &descendant);
- return ElementDescendantConstIterator<ElementType>(m_root, next);
-}
-
-template <typename ElementType>
-inline const ElementType* ElementDescendantConstIteratorAdapter<ElementType>::first() const
-{
- return Traversal<ElementType>::firstWithin(&m_root);
-}
-
-template <typename ElementType>
-inline const ElementType* ElementDescendantConstIteratorAdapter<ElementType>::last() const
-{
- return Traversal<ElementType>::lastWithin(&m_root);
-}
-
-// Standalone functions
-
-template <typename ElementType>
-inline ElementDescendantIteratorAdapter<ElementType> descendantsOfType(ContainerNode& root)
-{
- return ElementDescendantIteratorAdapter<ElementType>(root);
-}
-
-template <typename ElementType>
-inline ElementDescendantConstIteratorAdapter<ElementType> descendantsOfType(const ContainerNode& root)
-{
- return ElementDescendantConstIteratorAdapter<ElementType>(root);
-}
-
-}
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoredomElementIteratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ElementIterator.h (165804 => 165805)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ElementIterator.h        2014-03-18 08:51:55 UTC (rev 165804)
+++ trunk/Source/WebCore/dom/ElementIterator.h        2014-03-18 09:42:58 UTC (rev 165805)
</span><span class="lines">@@ -372,6 +372,6 @@
</span><span class="cx">
</span><span class="cx"> #include "ElementAncestorIterator.h"
</span><span class="cx"> #include "ElementChildIterator.h"
</span><del>-#include "ElementDescendantIterator.h"
</del><ins>+#include "TypedElementDescendantIterator.h"
</ins><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoredomTypedElementDescendantIteratorh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/dom/TypedElementDescendantIterator.h (0 => 165805)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/TypedElementDescendantIterator.h         (rev 0)
+++ trunk/Source/WebCore/dom/TypedElementDescendantIterator.h        2014-03-18 09:42:58 UTC (rev 165805)
</span><span class="lines">@@ -0,0 +1,239 @@
</span><ins>+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef TypedElementDescendantIterator_h
+#define TypedElementDescendantIterator_h
+
+#include "ElementIterator.h"
+
+namespace WebCore {
+
+template <typename ElementType>
+class TypedElementDescendantIterator : public ElementIterator<ElementType> {
+public:
+ TypedElementDescendantIterator(const ContainerNode& root);
+ TypedElementDescendantIterator(const ContainerNode& root, ElementType* current);
+ TypedElementDescendantIterator& operator++();
+};
+
+template <typename ElementType>
+class TypedElementDescendantConstIterator : public ElementConstIterator<ElementType> {
+public:
+ TypedElementDescendantConstIterator(const ContainerNode& root);
+ TypedElementDescendantConstIterator(const ContainerNode& root, const ElementType* current);
+ TypedElementDescendantConstIterator& operator++();
+};
+
+template <typename ElementType>
+class TypedElementDescendantIteratorAdapter {
+public:
+ TypedElementDescendantIteratorAdapter(ContainerNode& root);
+ TypedElementDescendantIterator<ElementType> begin();
+ TypedElementDescendantIterator<ElementType> end();
+ TypedElementDescendantIterator<ElementType> beginAt(ElementType&);
+ TypedElementDescendantIterator<ElementType> from(Element&);
+
+ ElementType* first();
+ ElementType* last();
+
+private:
+ ContainerNode& m_root;
+};
+
+template <typename ElementType>
+class TypedElementDescendantConstIteratorAdapter {
+public:
+ TypedElementDescendantConstIteratorAdapter(const ContainerNode& root);
+ TypedElementDescendantConstIterator<ElementType> begin() const;
+ TypedElementDescendantConstIterator<ElementType> end() const;
+ TypedElementDescendantConstIterator<ElementType> beginAt(const ElementType&) const;
+ TypedElementDescendantConstIterator<ElementType> from(const Element&) const;
+
+ const ElementType* first() const;
+ const ElementType* last() const;
+
+private:
+ const ContainerNode& m_root;
+};
+
+template <typename ElementType> TypedElementDescendantIteratorAdapter<ElementType> descendantsOfType(ContainerNode&);
+template <typename ElementType> TypedElementDescendantConstIteratorAdapter<ElementType> descendantsOfType(const ContainerNode&);
+
+// TypedElementDescendantIterator
+
+template <typename ElementType>
+inline TypedElementDescendantIterator<ElementType>::TypedElementDescendantIterator(const ContainerNode& root)
+ : ElementIterator<ElementType>(&root)
+{
+}
+
+template <typename ElementType>
+inline TypedElementDescendantIterator<ElementType>::TypedElementDescendantIterator(const ContainerNode& root, ElementType* current)
+ : ElementIterator<ElementType>(&root, current)
+{
+}
+
+template <typename ElementType>
+inline TypedElementDescendantIterator<ElementType>& TypedElementDescendantIterator<ElementType>::operator++()
+{
+ return static_cast<TypedElementDescendantIterator<ElementType>&>(ElementIterator<ElementType>::traverseNext());
+}
+
+// TypedElementDescendantConstIterator
+
+template <typename ElementType>
+inline TypedElementDescendantConstIterator<ElementType>::TypedElementDescendantConstIterator(const ContainerNode& root)
+ : ElementConstIterator<ElementType>(&root)
+
+{
+}
+
+template <typename ElementType>
+inline TypedElementDescendantConstIterator<ElementType>::TypedElementDescendantConstIterator(const ContainerNode& root, const ElementType* current)
+ : ElementConstIterator<ElementType>(&root, current)
+{
+}
+
+template <typename ElementType>
+inline TypedElementDescendantConstIterator<ElementType>& TypedElementDescendantConstIterator<ElementType>::operator++()
+{
+ return static_cast<TypedElementDescendantConstIterator<ElementType>&>(ElementConstIterator<ElementType>::traverseNext());
+}
+
+// TypedElementDescendantIteratorAdapter
+
+template <typename ElementType>
+inline TypedElementDescendantIteratorAdapter<ElementType>::TypedElementDescendantIteratorAdapter(ContainerNode& root)
+ : m_root(root)
+{
+}
+
+template <typename ElementType>
+inline TypedElementDescendantIterator<ElementType> TypedElementDescendantIteratorAdapter<ElementType>::begin()
+{
+ return TypedElementDescendantIterator<ElementType>(m_root, Traversal<ElementType>::firstWithin(&m_root));
+}
+
+template <typename ElementType>
+inline TypedElementDescendantIterator<ElementType> TypedElementDescendantIteratorAdapter<ElementType>::end()
+{
+ return TypedElementDescendantIterator<ElementType>(m_root);
+}
+
+template <typename ElementType>
+inline TypedElementDescendantIterator<ElementType> TypedElementDescendantIteratorAdapter<ElementType>::beginAt(ElementType& descendant)
+{
+ ASSERT(descendant.isDescendantOf(&m_root));
+ return TypedElementDescendantIterator<ElementType>(m_root, &descendant);
+}
+
+template <typename ElementType>
+inline TypedElementDescendantIterator<ElementType> TypedElementDescendantIteratorAdapter<ElementType>::from(Element& descendant)
+{
+ ASSERT(descendant.isDescendantOf(&m_root));
+ if (isElementOfType<const ElementType>(descendant))
+ return TypedElementDescendantIterator<ElementType>(m_root, static_cast<ElementType*>(&descendant));
+ ElementType* next = Traversal<ElementType>::next(&m_root, &descendant);
+ return TypedElementDescendantIterator<ElementType>(m_root, next);
+}
+
+template <typename ElementType>
+inline ElementType* TypedElementDescendantIteratorAdapter<ElementType>::first()
+{
+ return Traversal<ElementType>::firstWithin(&m_root);
+}
+
+template <typename ElementType>
+inline ElementType* TypedElementDescendantIteratorAdapter<ElementType>::last()
+{
+ return Traversal<ElementType>::lastWithin(&m_root);
+}
+
+// TypedElementDescendantConstIteratorAdapter
+
+template <typename ElementType>
+inline TypedElementDescendantConstIteratorAdapter<ElementType>::TypedElementDescendantConstIteratorAdapter(const ContainerNode& root)
+ : m_root(root)
+{
+}
+
+template <typename ElementType>
+inline TypedElementDescendantConstIterator<ElementType> TypedElementDescendantConstIteratorAdapter<ElementType>::begin() const
+{
+ return TypedElementDescendantConstIterator<ElementType>(m_root, Traversal<ElementType>::firstWithin(&m_root));
+}
+
+template <typename ElementType>
+inline TypedElementDescendantConstIterator<ElementType> TypedElementDescendantConstIteratorAdapter<ElementType>::end() const
+{
+ return TypedElementDescendantConstIterator<ElementType>(m_root);
+}
+
+template <typename ElementType>
+inline TypedElementDescendantConstIterator<ElementType> TypedElementDescendantConstIteratorAdapter<ElementType>::beginAt(const ElementType& descendant) const
+{
+ ASSERT(descendant.isDescendantOf(&m_root));
+ return TypedElementDescendantConstIterator<ElementType>(m_root, &descendant);
+}
+
+template <typename ElementType>
+inline TypedElementDescendantConstIterator<ElementType> TypedElementDescendantConstIteratorAdapter<ElementType>::from(const Element& descendant) const
+{
+ ASSERT(descendant.isDescendantOf(&m_root));
+ if (isElementOfType<const ElementType>(descendant))
+ return TypedElementDescendantConstIterator<ElementType>(m_root, static_cast<const ElementType*>(&descendant));
+ const ElementType* next = Traversal<ElementType>::next(&m_root, &descendant);
+ return TypedElementDescendantConstIterator<ElementType>(m_root, next);
+}
+
+template <typename ElementType>
+inline const ElementType* TypedElementDescendantConstIteratorAdapter<ElementType>::first() const
+{
+ return Traversal<ElementType>::firstWithin(&m_root);
+}
+
+template <typename ElementType>
+inline const ElementType* TypedElementDescendantConstIteratorAdapter<ElementType>::last() const
+{
+ return Traversal<ElementType>::lastWithin(&m_root);
+}
+
+// Standalone functions
+
+template <typename ElementType>
+inline TypedElementDescendantIteratorAdapter<ElementType> descendantsOfType(ContainerNode& root)
+{
+ return TypedElementDescendantIteratorAdapter<ElementType>(root);
+}
+
+template <typename ElementType>
+inline TypedElementDescendantConstIteratorAdapter<ElementType> descendantsOfType(const ContainerNode& root)
+{
+ return TypedElementDescendantConstIteratorAdapter<ElementType>(root);
+}
+
+}
+
+#endif
</ins></span></pre>
</div>
</div>
</body>
</html>