Index: Source/core/rendering/RenderFieldset.cpp |
diff --git a/Source/core/rendering/RenderFieldset.cpp b/Source/core/rendering/RenderFieldset.cpp |
index 2537a9d45d712c6b71f7f9c059f47de17fe81a8f..b83c82479839db1dd35592323c74a59ec0334267 100644 |
--- a/Source/core/rendering/RenderFieldset.cpp |
+++ b/Source/core/rendering/RenderFieldset.cpp |
@@ -26,6 +26,7 @@ |
#include "CSSPropertyNames.h" |
#include "HTMLNames.h" |
+#include "core/html/HTMLLegendElement.h" |
#include "core/rendering/PaintInfo.h" |
#include "platform/graphics/GraphicsContextStateSaver.h" |
@@ -129,7 +130,7 @@ RenderBox* RenderFieldset::findLegend(FindLegendOption option) const |
if (option == IgnoreFloatingOrOutOfFlow && legend->isFloatingOrOutOfFlowPositioned()) |
continue; |
- if (legend->node() && (legend->node()->hasTagName(legendTag))) |
+ if (isHTMLLegendElement(legend->node())) |
return toRenderBox(legend); |
} |
return 0; |