summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderFieldset.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/RenderFieldset.cpp')
-rw-r--r--Source/WebCore/rendering/RenderFieldset.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/WebCore/rendering/RenderFieldset.cpp b/Source/WebCore/rendering/RenderFieldset.cpp
index c180c8536..d663c3b5b 100644
--- a/Source/WebCore/rendering/RenderFieldset.cpp
+++ b/Source/WebCore/rendering/RenderFieldset.cpp
@@ -123,10 +123,13 @@ RenderObject* RenderFieldset::layoutSpecialExcludedChild(bool relayoutChildren)
return legend;
}
-RenderBox* RenderFieldset::findLegend() const
+RenderBox* RenderFieldset::findLegend(FindLegendOption option) const
{
for (RenderObject* legend = firstChild(); legend; legend = legend->nextSibling()) {
- if (!legend->isFloatingOrOutOfFlowPositioned() && legend->node() && (legend->node()->hasTagName(legendTag)))
+ if (option == IgnoreFloatingOrOutOfFlow && legend->isFloatingOrOutOfFlowPositioned())
+ continue;
+
+ if (legend->node() && (legend->node()->hasTagName(legendTag)))
return toRenderBox(legend);
}
return 0;