summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderAncestorIterator.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/rendering/RenderAncestorIterator.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/rendering/RenderAncestorIterator.h')
-rw-r--r--Source/WebCore/rendering/RenderAncestorIterator.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/WebCore/rendering/RenderAncestorIterator.h b/Source/WebCore/rendering/RenderAncestorIterator.h
index 39dd05e72..0cedeefe7 100644
--- a/Source/WebCore/rendering/RenderAncestorIterator.h
+++ b/Source/WebCore/rendering/RenderAncestorIterator.h
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderAncestorIterator_h
-#define RenderAncestorIterator_h
+#pragma once
#include "RenderIterator.h"
@@ -186,7 +185,7 @@ inline RenderAncestorConstIteratorAdapter<T> ancestorsOfType(const RenderObject&
template <typename T>
inline RenderAncestorIteratorAdapter<T> lineageOfType(RenderObject& first)
{
- if (isRendererOfType<const T>(first))
+ if (isRendererOfType<T>(first))
return RenderAncestorIteratorAdapter<T>(static_cast<T*>(&first));
return ancestorsOfType<T>(first);
}
@@ -194,11 +193,9 @@ inline RenderAncestorIteratorAdapter<T> lineageOfType(RenderObject& first)
template <typename T>
inline RenderAncestorConstIteratorAdapter<T> lineageOfType(const RenderObject& first)
{
- if (isRendererOfType<const T>(first))
+ if (isRendererOfType<T>(first))
return RenderAncestorConstIteratorAdapter<T>(static_cast<const T*>(&first));
return ancestorsOfType<T>(first);
}
-}
-
-#endif
+} // namespace WebCore