summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderAncestorIterator.h
diff options
context:
space:
mode:
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